[tpm] eval oddness
Dave Doyle
dave.s.doyle at gmail.com
Thu Dec 10 05:38:48 PST 2009
I dig that, but since the eval is a runtime construct how would something
like eval "use Module::Name;" differ from eval "require Module::Name"? Is
there any difference in the use of "use" as opposed to "require" in that
context?
--
dave.s.doyle at gmail.com
On Wed, Dec 9, 2009 at 11:38 PM, Liam R E Quin <liam at holoweb.net> wrote:
> On Wed, 2009-12-09 at 22:27 -0500, Dave Doyle wrote:
> [...]
> > Though I'm hardpressed to explain why, using "require" instead of
> > "use" seems to be more canonical when dynamically loading modules.
>
> That's because, in general, "use" is compile-time, and "require" is
> done at run-time.
>
> If you don't know what module you want until run-time, or
> you don't know if a particular module will be needed ,"require"
> is a good option.
>
> Liam
>
>
>
> --
> Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
> Pictures from old books: http://fromoldbooks.org/
> Ankh: irc.sorcery.net irc.gnome.org www.advogato.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/toronto-pm/attachments/20091210/cef9c977/attachment.html>
More information about the toronto-pm
mailing list