in reply to
Re: Command line tool coding style?
in thread Command line tool coding style?
If you look closer, you'll see there is indeed a can $execute $_action up at the top..
I was going to go with the dispatch table hash approach originally, but what irked me was that I had to put either the entire subroutine code above the body of the main program (when what I wanted is to put them below), or write this => \&do_this hash entries which means maintaining an extra list - neither of which I found satisfactory. After looking at my switch-like construct long and hard enough I noticed I had a bunch of veiled method calls.. hence this was the "natural" solution.
Are you sure warnings will do an srand for me? (It is a left-over I forgot to remove from the actual script for this example - there's some password generation in there.) I'd be very surprised if it did..