Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Module's name and file's name

by blue_cowdawg (Prior)
on Jan 22, 2013 at 20:04 UTC ( #1014778=note: print w/ replies, xml ) Need Help??


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

      Could you explain me ?

The way Perl is "wired" when you have

use HR; # using your example
it checks all the directories in @INC for a file named "HR.pm" and isn't going to look in "MyModule.pm"


Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg


Comment on Re: Module's name and file's name
Select or Download Code
Re^2: Module's name and file's name
by beurive.denis (Novice) on Jan 22, 2013 at 20:14 UTC

    Hello,

    Thank you.

    I know. That's why I use :

    use MyModule;

    That way, Perl finds the file "MyModule.pm".

    But the the module's name is "HR" (as declared after "package"), not "MyModule".

    I think that it messes up something.

    I may be wrong.

    What do you think ?

    Thank you.

      I think that it messes up something.

      It messes up clarity for the hacker who inherits your code. :P

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2014-07-13 05:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (246 votes), past polls