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

Re: Module's name and file's name

by dsheroh (Parson)
on Jan 23, 2013 at 11:09 UTC ( #1014881=note: print w/ replies, xml ) Need Help??

in reply to Module's name and file's name

So long as you remember to refer to things using the correct package name (HR::myFunction) rather than the file name (MyModule::myFunction), the only technical issue is that symbols exported by the package won't work automatically. If it exports anything, you'll have to manually call HR->import; after you use MyModule; because the automatic call to MyModule->import; won't do anything.

Even though it doesn't cause technical problems, it does tend to cause major usability and maintenance problems, so, as a general rule, it shouldn't be done except in very limited circumstances. A package named HR in a file named is not one of those circumstances.

Comment on Re: Module's name and file's name
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2015-10-09 15:10 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (242 votes), past polls