At 02:23 PM 5/21/01 -0400, Peter Cline wrote:
>Hello, I am attempting to develop my first module. Because of
>permissions/security, etc.. I cannot store the module in the standard
>perl lib directories. So it is currently living in a subdir called lib in
>my home directory. I use a "use lib" directive to add this directory to
>@INC. this works , but when I try then to use another module that does
>reside in the standard lib directories, I get a "Can't locate object
>method "new" in module "X" at path-specified-in -use-lib-directive.
That's a different problem. You have something like:
use lib qw(/home/me/lib);
use MyModule;
use X;
my $c = new X; # Causes failure
yes? Then it suggests that you have a CPANModule.pm underneath /home/me/lib.
If this doesn't solve it, post a minimal (<20 lines) script that reproduces
the problem, plus an ls -R of your personal lib directory, and for that
module X, whatever it is, show us what this produces:
perl -MX -le 'print $INC{"X.pm"}'
replacing X with the module name (and if it contains any ::, change each ::
to / inside the double quotes.
--
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com