Subject: | Incorrect parameter escaping leaves --as entirelyt unquoted |
perlbrew install perl-5.21.10 -v --as ' --bogus '
This generates a shell command line of:
(cd /home/vagrant/perl5/perlbrew/build/perl-5.21.10 && rm -f config.sh Policy.sh && patchperl && sh Configure -de '-Dprefix=/home/vagrant/perl5/perlbrew/perls/ --bogus' '-Dusedevel' '-A'eval:scriptdir=/home/vagrant/perl5/perlbrew/perls/ --bogus/bin'' && make && make test_harness && make install)
Take careful note of the '-A' quoting:
'-A'eval:scriptdir=/home/vagrant/perl5/perlbrew/perls/ --bogus/bin''
|xx|----------------||
xx parts are quoted.
-- parts are unquoted.
This means things as simple as spaces are enough to cause perlbrew to change where it passes its script dir, and instead pass an unintentionally shorter one, followed by an extraneous argument.