Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Difference between use Module::Name and use Module::Name qw /method1 method2/

by choroba (Canon)
on Jan 29, 2013 at 10:06 UTC ( #1015840=note: print w/ replies, xml ) Need Help??


in reply to Difference between use Module::Name and use Module::Name qw /method1 method2/

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.

لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re: Difference between use Module::Name and use Module::Name qw /method1 method2/
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1015840]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2015-07-03 00:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (47 votes), past polls