Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: A simple library question

by trantor (Chaplain)
on Jul 14, 2004 at 11:06 UTC ( #374264=note: print w/replies, xml ) Need Help??

in reply to A simple library question

Another way:
#!/usr/bin/perl -w BEGIN { push @INC, 'path'; } use strict; use modulename;
Update: thanks gellyfish for pointing out that this works as long as the included modules do not depend on XS components or autosplit subroutines. In that case, it would be necessary to push the architecture specific directories as well

Replies are listed 'Best First'.
Re^2: A simple library question
by gellyfish (Monsignor) on Jul 14, 2004 at 11:21 UTC

    As the manpage says this is *almost* the same as use lib but the disadvantage is that it does not add any architecture specific directories under the path you have used, thus it is likely that any module with XS components or autosplit subroutines that have been installed there will not work unless you add the proper sub directories manually.


Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2023-12-10 20:58 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (41 votes). Check out past polls.