Syntactic Confectionery Delight | |
PerlMonks |
Re: Difference between use Module::Name and use Module::Name qw /method1 method2/by choroba (Cardinal) |
on Jan 29, 2013 at 10:06 UTC ( [id://1015840]=note: print w/replies, xml ) | Need Help?? |
In fact, it depends on the module in question. But, if the module uses Exporter, the second option only imports is_valid into the current namespace. All other functions still exist under their fully qualified names, so the memory should not matter. But, if the module exports a subroutine called "all" or something similarly simple, you can avoid a clash with your own "all" subroutine. The qw way keeps your namespace clean and under better control.
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
In Section
Seekers of Perl Wisdom
|
|