Jorge Godoy wrote:

> Stas Bekman <[EMAIL PROTECTED]> writes:
> 
> 
>>I think the general advise is to always call require() and not use()
>>in startup.pl, unless you have a reason for calling certain modules'
>>import() method.
>>
> 
> Wouldn't that affect mod_perl's advantage of sharing the modules? I
> mean, would everything be in it's separate namespace and loaded only
> once for every module as it is with use?


Please read the doc for use().

perldoc -f use

               Imports some semantics into the current package
                from the named module, generally by aliasing cer­
                tain subroutine or variable names into your pack­
                age.  It is exactly equivalent to

                    BEGIN { require Module; import Module LIST; }


use == require + import (almost), and we don't need import() to get the 
sharing in place.

Also see:
http://perl.apache.org/guide/perl.html#use_

_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/

Reply via email to