Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- require statement
June 6, 2011, 12:43 pm
rate this thread
What is the best practice to avoid hard coded paths? Consider
following code snippet,
What is the best way to remove the hard coded paths set in the script?
It should work even if I use relative path while invoking the script
Re: require statement
Command line switches is my favorite. If I am writing a script using a
module which is itself
also a work in progress I just specify its location on the command line
perl -I /some/module/path my_script.pl
This fits my development style well but depending on the OP's use case
it might be
easier to just put them in a standard directory, especially if they
aren't being currently
- » How to setup when "Can't locate Date/Simple.pm in @INC"
- — Next thread in » PERL Discussions