[Chicago-talk] faster -h

Whitney Jackson whjackson at gmail.com
Sat May 7 03:38:24 PDT 2005


So I have this Perl program that uses some hefty modules and as a result
it takes a second or two just to get going.  Most of the time I don't
care because it's relatively long running and the loading time isn't
noticeable.  However, it's annoying to have to wait when I just want
usage information.  So I'm wondering if there's some way to do the
GetOptions stuff up front and then avoid the "use SuchAndSuch;" when I
find a -h or usage violation.

Any ideas?

Just to make things a bit more concrete:

$ ./pctrl -h

with all the modules:          2.105 seconds
with a minimal set of modules: 0.318 seconds

Whitney



More information about the Chicago-talk mailing list