"A. Pagaltzis" <[EMAIL PROTECTED]> writes: > The other option I can think of is kind of wild: do the > option specification parsing/processing that has to be done on > every invocation, regardless of the user input, just once, and > then cache the results somewhere – possibly as Perl code in the > __DATA__ of the caller or some such, much like SelfLoader works.
Yes, this thought has crossed my mind more than once, although I'd go for an CLI-parser generator that generates an optimized parser sub. > [...] But I’ve never had any problems with it when I used it > with constant strings solely to defer compilation. If the string is constant, and can be tested, yes. I subroutines are generated dynamically using string eval, the risk I mentioned is much greater. -- Johan