[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: for a Perl script to find a module



Nick Lewycky wrote:

use Cwd qw/cwd chdir abs_path/;
use File::Basename qw/dirname/;
use lib abs_path(dirname($0));

use MyModule;

Adapted from http://www.wetware.com/drieux/CS/lang/Perl/PM/useLibHack.html

Nick Lewycky


That's cool, I hadn't seen that before.

But this might be easier:

cat Module.pm >> MyScript.pl


That will work unless you are doing funky stuff with __END__

HTH,
Jeremy



Reply to: