On Sun, Jan 30, 2011 at 03:37:14PM +0000, Rob Dixon wrote: > On 30/01/2011 14:09, a b wrote: > > > >I have a query regarding using lib modules > > > >1) I've some custom modules which uses various default routines like > >"Net::rsh" etc > > > >Now, i want to pack all default routines into my lib and use that lib > >in my custom modules i.e > > > >package MyModule; > >
> For instance, something like > > use warnings; > use strict; > > use lib 'lib/test'; > > use Net::Rsh; > use SpecialModule; > > will find Net/Rsh.pm whereever it is on your machine, as well as > lib/test/SpecialModule.pm Well, as long as perl can see where the Net/Rsh.pm module is. Perl won't search your entire disk for the module, but rather it will look in well known places. :-) You'll want to put your SpecialModule in a well known place too if you want perl to find it. Or you can take a look at local::lib on the CPAN which can help you with precisely this. Jeremiah -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
