perldoc perlmod also goes to say
<quote>
An exception would be if two modules each tried to "use" each other, and
each also called a function from that other module. In that case, it's easy
to use "require"s instead.
</quote>

anyone knows how/why require is useful in this case ??

|-----Original Message-----
|From: Peter Scott [mailto:[EMAIL PROTECTED]
|Sent: Thursday, April 21, 2005 7:22 PM
|To: beginners@perl.org
|Subject: Re: Require / Use
|
|
|On Thu, 21 Apr 2005 09:39:03 -0400, Chris Devers wrote:
|
|> On Thu, 21 Apr 2005, Paul Kraus wrote:
|>
|>> Not to sound daft but why would you want to do that? What would be
|>> gained or lossed. What would be an advantage of using require?
|>
|> Normally, you wouldn't.
|>
|> Think of 'require' as a vestigal organ from Perl4 that has little or no
|> purpose today with Perl5.
|>
|> For the most part, it's safe to pretend that 'require' doesn't exist.
|
|Ahem.  It is most useful when I want to determine the module to load
|dynamically, or when I want to load a module only if necessary to save the
|time spent compiling it in the cases when it is not needed.
|
|--
|Peter Scott
|http://www.perlmedic.com/
|http://www.perldebugged.com/
|
|
|--
|To unsubscribe, e-mail: [EMAIL PROTECTED]
|For additional commands, e-mail: [EMAIL PROTECTED]
|<http://learn.perl.org/> <http://learn.perl.org/first-response>
|
|


*********************************************************
Disclaimer:

The contents of this E-mail (including the contents of the enclosure(s) or 
attachment(s) if any) are privileged and confidential material of MBT and 
should not be disclosed to, used by or copied in any manner by anyone other 
than the intended addressee(s).   In case you are not the desired addressee, 
you should delete this message and/or re-direct it to the sender.  The views 
expressed in this E-mail message (including the enclosure(s) or attachment(s) 
if any) are those of the individual sender, except where the sender expressly, 
and with authority, states them to be the views of MBT.

This e-mail message including attachment/(s), if any, is believed to be free of 
any virus.  However, it is the responsibility of the recipient to ensure that 
it is virus free and MBT is not responsible for any loss or damage arising in 
any way from its use

*********************************************************

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to