in reply to Is it possible to mimic mod_perl like startup for CGI?
As a fulltime Perl CGI programmer, I can tell you that you are going to have to think 100% backwards from mod_perl. For example, instead of trying to create the function once and only once, look towards generating them on demand.
For example, the package containing all of these functions can have a autoload that will create the function the first time it is requested.
It is hard to say for sure the best path without knowing how you are generating these functions, but also checkout the core modues SelfLoader and AutoLoader. They will delay the compilation of functions until they are first used.
Ted Young($$<<$$=>$$<=>$$<=$$>>$$) always returns 1. :-)