Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^3: Perl thread issue (updated)by haukex (Archbishop) |
on Dec 29, 2016 at 11:15 UTC ( [id://1178613]=note: print w/replies, xml ) | Need Help?? |
Hi gurjit, load order shouldn't matter That's true in many cases, but with certain modules, load order can matter. Note that use is equivalent to BEGIN { require Module; Module->import( LIST ); }, and the module's import method can be arbitrary Perl code, and require will essentially eval the file once, also allowing for arbitrary code to be executed. For many modules, they just contain sub definitions and don't execute any code that affects other things in your program, and their import is just Exporter's import and all it does is export certain names, or OO modules may not define an import at all. But a few modules out there can do some pretty complex things upon being used, and in that case, order of loading can make a difference. Regards, Update: Previously, in the above I just talked about the effects of the import method; I've now updated the text to talk about the eval of the code as well.
In Section
Seekers of Perl Wisdom
|
|