in reply to Re: Best way to handle 'commands'
in thread Best way to handle 'commands'

Why? It's not as if the OP has a lot of options handling to do. For one thing, (for example) apachectl restart is just as nice as (if not nicer than) apachectl --restart, and from the programmer's perspective:

for my $cmd (@ARGV) { &{$dispatch->{$cmd}} or warn "Unrecognized command $cmd!\n"; }

is about as good as:

for my $cmd (keys %$opts) { &{$dispatch->{$cmd}} or warn "Unrecognized command $cmd!\n"; }

In this context, what advantages do the Getopt modules have?

--
F o x t r o t U n i f o r m
Found a typo in this node? /msg me
The hell with paco, vote for Erudil!