Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Module's name and file's name

by sundialsvc4 (Abbot)
on Jan 23, 2013 at 19:57 UTC ( #1015011=note: print w/replies, xml ) Need Help??


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

It is my understanding that the names should agree because Perl looks for module-files by matching the file name.   It reads whatever it finds, of course expecting that the desired package-name will be defined thereby.

However, the formal purpose of the package directive is to introduce a namespace, and once Perl has been cajoled into reading a source-file, it will of course recognize all of the package (namespace) names found therein.   Sometimes there are very good, even compelling, reasons to do just that ... for instance, when you are defining grammars for Parse::RecDescent (and I don’t know offhand if it is strictly necessary ...), or when you simply have a group of classes that you know will always be used together to help one another out.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1015011]
help
Chatterbox?
[shmem]: hmm module takeover... any hints? I'm being lazy wrt searches
[choroba]: Contact the author, ask other to help contacting the author, write to pause admins
[shmem]: ah perlfaq7
[shmem]: thanks choroba, found it. 'Tis about MJD Devel::Trace
[shmem]: I'd like to upload a v0.13
[choroba]: Very nice!

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2018-02-23 14:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (302 votes). Check out past polls.

    Notices?