Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: two lib folders

by Belgarion (Chaplain)
on Dec 05, 2005 at 21:17 UTC ( [id://514240]=note: print w/replies, xml ) Need Help??


in reply to two lib folders

I'm assuming you mean something like:

use lib ('/path/to/your/lib');

That would add /path/to/your/lib to your @INC path. Do a perldoc on lib to find out more information.

Replies are listed 'Best First'.
Re^2: two lib folders
by ikegami (Patriarch) on Dec 05, 2005 at 21:19 UTC
    Here's a link: lib
Re^2: two lib folders
by Anonymous Monk on Dec 05, 2005 at 21:22 UTC
    Is this saying I could make multiple use libs?
    use lib "/path/to/1/"; use lib "/path/to/2/";

      Yes, or you could combine them into one list:

      use lib ('/path/to/1/', '/path/to/2/');

      Each time you do a use lib adds those directories in the list to the @INC array.

        that needs to be
        use lib ('/path/to/2/', '/path/to/1/');
        To be consistent with the above post of
        use lib "/path/to/1/"; use lib "/path/to/2/";
        Full demo:
        [davidrw@host davidrw]$ perl -le 'use lib qw(/path/to/1/); use lib qw( +/path/to/2/); print join " ", @INC[0..1]' /path/to/2/ /path/to/1/ [davidrw@host davidrw]$ perl -le 'use lib qw(/path/to/1/ /path/to/2/); + print join " ", @INC[0..1]' /path/to/1/ /path/to/2/

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://514240]
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-06-21 17:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.