App-perlbrew icon indicating copy to clipboard operation
App-perlbrew copied to clipboard

Silently ignores unrecognised options

Open leonerd opened this issue 3 years ago • 1 comments

$ 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.

leonerd avatar May 18 '22 13:05 leonerd

Yeah, the return value of GetOptions should be checked

Leont avatar May 18 '22 20:05 Leont