in reply to Require a script not found in @INC array
Try FindBin, it will create the absolute path to the directory where the script is run, and make it accessible in the variable $FindBin::Bin. Eg:
#! /usr/bin/perl use FindBin; use lib "$FindBin::Bin/../moduledir"; use My::Module; my $lister = My::Module->new(); . . .
Where moduledir is where I place my own code (big surprise :). This solved similar problems for me.
Hope this helps!
pernod
--
Mischief. Mayhem. Soap.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Require a script not found in @INC array
by TJD (Initiate) on Oct 07, 2004 at 19:10 UTC |
In Section
Seekers of Perl Wisdom