Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: dynamically loading modules/maintaining dev v. prod modules

by PrakashK (Pilgrim)
on Jul 28, 2001 at 03:01 UTC ( #100478=note: print w/ replies, xml ) Need Help??


in reply to dynamically loading modules/maintaining dev v. prod modules

Try putting that code in a BEGIN block:

BEGIN { if( index( $ENV{SCRIPT_NAME}, '/dev/' ) == -1 ) { use lib "/blah/perllib/"; } else { use lib "/blah/perldev/"; } }
Update: My apologies too. Should have tested it before posting. As wog said in the node below the code above won't work, since both use lines would be run at compile time. All my votes go to wog. Thanks.


Comment on Re: dynamically loading modules/maintaining dev v. prod modules
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2015-07-31 19:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (280 votes), past polls