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

Re^3: difference between packages and module

by Anonymous Monk
on Jun 28, 2014 at 08:28 UTC ( [id://1091543]=note: print w/replies, xml ) Need Help??


in reply to Re^2: difference between packages and module
in thread difference between packages and module

And, is that the only place where such a module could be found, or could it also be in a file of a different name and/or in a different subdirectory?

Well, this is just a technicality that only applies to require, not use, but just for completeness: You could take a module, for example Try::Tiny, copy its Tiny.pm to e.g. /tmp, and include it via BEGIN { require "/tmp/Tiny.pm"; Try::Tiny->import() } and it'll work fine - not that it's recommended :-)

If you only use use and modules from CPAN, then yes, the directory structure is pretty well defined (some rare, exotic modules may do things differently). The relevant documentation is use, require and @INC.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (2)
As of 2024-04-20 06:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found