SPUG: Using import() as init under mod_perl

Andrew Sweger andy at n2h2.com
Fri Aug 6 12:56:24 CDT 1999


How does Perl know to call new() when it encounters a 'use CGI;' (assuming
the module had already been previously loaded elsewhere)? I could just
instruct the module users to call a Module->init(), but I wanted to handle
the issue behind the scenes. import() seemed like a good candidate.

On 08/06/99 @ 17:27, the magnificent El JoPe Magnifico wrote:

:} FYI, CGI.pm deals with mod_perl by doing this in the new() 
:} subroutine, which gets called on every 'use' of the module.

-- 
 Andrew Sweger <andy at n2h2.com>    N2H2, Creators of Bess and SearchOpolis
                                  900 Fourth Avenue, Suite 3400
 No thanks, I'll just have the    Seattle WA 98164-1059
     Linux with a side of Perl    http://www.n2h2.com/  (206) 336-2947




 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    POST TO: spug-list at pm.org        PROBLEMS: owner-spug-list at pm.org
 Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
 SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe
        Email to majordomo at pm.org: ACTION spug-list your_address





More information about the spug-list mailing list