gugod / App-perlbrew

Manage perl installations in your $HOME
https://perlbrew.pl
Other
720 stars 216 forks source link

Silently ignores unrecognised options #745

Open leonerd opened 2 years ago

leonerd commented 2 years ago
$ perlbrew install 5.28.0 --this-is-not-a-real-option
Fetching perl 5.28.0 as /home/leo/perl5/perlbrew/dists/perl-5.28.0.tar.gz
...

I would have expected an error.

This matters, because I just spent a while waiting on a bunch of perlbrew install --debugging to finish, and got very confused why I don't have debug-enabled perls. Turns out the option I wanted was --debug. It would have been nice for the unrecognised option name to complain, rather than be silently ignored.

Leont commented 2 years ago

Yeah, the return value of GetOptions should be checked