Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Difference in Module loading and install??

by bliako (Monsignor)
on Nov 16, 2021 at 09:38 UTC ( #11138885=note: print w/replies, xml ) Need Help??

in reply to Difference in Module loading and install??

Note that /My/.../This is a directory, not a file. The functionality of use lib "<dir>" (or multiple dirs with: use lib ("<dir1>", "<dir2>"); ) is to tell perl interpreter where to look for packages, which are files. You achieve the same with perl -I"<dir>" -I"<dir2>". That's the @INC - an array of directories to look for package files in. As with any include-files system there are precedence rules in order to resolve what happens in same filenames in different directories. Simply: first-comes-first-served.

package XYZ; is used in Perl as a means to define and implement a module. Which you use (or require) later on.

bw, bliako

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2022-05-18 14:24 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (71 votes). Check out past polls.