when getopts params attack!

Posted:

File this one under mind-working-against-you dept.

I’m working a program that accepts various command line arguments. I normally like order the commands alphabetically (I don’t know why). I group the ubiquitous help options (‘?’ and ‘h’) together at the front followed by the program-specific options. For this program, the options look like this:

my $opts = {}; getopts(‘?hP:U:d:l:u:v’, $opts);

I hear it all the time: Joe, why do you make so many gay jokes? Is it because you’re afraid you’re gay? That’s when I say: listen VOICE IN MY HEAD, you mind your own bidniz.

(props to Dave Attell.)

[Original use.perl.org post and comments.]