Thanks much for your response!! Making it more clear.
I want to make tar ball which contains my perl scripts and no other dependencies required. like Net::Rsh,Net::Telnet etc once user untar it, he should be able to run it from anywhere without any extra perl modules. I am thinking that might be Net::Rsh etc is not available on target m/c With above requirement, i want Net::Rsh like modules to be in my lib. Not sure if i need to modify Rsh module to get rid of scoping Net:: I want to simply use this module as "use Rsh;" Can some body let me know if i can make these modules to my lib :0 help much appeciated!!! Regards, a b On Sun, Jan 30, 2011 at 9:07 PM, Rob Dixon <rob.di...@gmx.com> 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; >> >> use lib "lib/test";(here i am placing my Rsh.pm etc modules and some of my >> custom modules) >> use Rsh; >> >> >> Is this possible??? >> >> Please let me know how to go with this approach >> >> My motive is to create a main PM file which will call all small PM >> files(custom and defaults) >> > > I'm not clear what you need to do. What is a 'default routine'? > > At a guess you want to be able to access Net::Rsh as well as your own > custom modules, in which case you probably don't understand how 'use lib' > works, which is simply to add the path(s) you specify to the end of the list > in @INC where perl will search for the modules you use. That means that, > even after you have done 'use lib "lib/test"' you can still 'use Net::Rsh' > and it will be found, as its location is still in @INC. > > 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 > > If this isn't what you're looking for then please post again. > > HTH, > > Rob >