Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: using my module.pm in different directory error

by duyet (Friar)
on Aug 10, 2016 at 08:47 UTC ( [id://1169478]=note: print w/replies, xml ) Need Help??


in reply to using my module.pm in different directory error

Add a BEGIN{} to your urs.pl which add paths of your pm files to @INC:
BEGIN { unshift @INC, './path/to/lib/dir1'; unshift @INC, '/full/path/to/lib/dir2'; }

Replies are listed 'Best First'.
Re^2: using my module.pm in different directory error
by t-rex (Scribe) on Aug 10, 2016 at 09:02 UTC
    path to lib which change as in lets say i launch script from /tmp/ something and next i launch it from /home/userx/run_auto.... so the path inside run_auto remains constant but where i launch the script from keeps changing...
      I am not sure to understand. Are you saying that your modules will not always be in the same place? Or the opposite?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2024-04-26 01:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found