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. :-)
<code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>