>>>>> "Paul" == Paul Kraus <[EMAIL PROTECTED]> writes:

>> Because you want the action at run-time (require) vs. compile time
>> (use), is the usual reason, I would guess.
Paul> Not to sound daft but why would you want to do that? What would be
Paul> gained or lossed. What would be an advantage of using require?


if ($certain_condition) {
        require Expensive::Module;
        my $object = Expensive::Module->new(blah);
        ...
}

No point in loading Expensive::Module if $certain_condition isn't
true.  That's hard to do with "use" instead of require.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

-- 
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