locked_user sundialsvc4 has asked for the wisdom of the Perl Monks concerning the following question:
What can cause:
Can't locate object method "new" via package "x::y::z" (perhaps you forgot to load "x::y::z"?
in response to:
my $foo = x::y::z->new(...);
when you can plainly see that the module in question does contain:
use x::y::z;
and that the file x/y/z.pm includes a proper package statement: (all examples match WRT case-sensitivity, etc.)
package x::y::z;
?
This is a case-insensitive filesystem and the module in question can be compiled correctly and can be used. There are no CaSe MiSmAtCh problems. There is no hanky-panky going on with @INC or anything like that. I can, in a command line one-liner, 'use x::y::z; my $foo=x::y::z->new();' and it works.
I know that similar issues have been discussed in the recent past, but this does not seem to be quite the same thing. Is there a previous posting that anyone can point me to on this one? I am genuinely puzzled as to what Perl is trying to tell me.
| Replies are listed 'Best First'. | |
|---|---|
|
Re: "Can't locate object method 'new' but the package IS 'used'
by kennethk (Abbot) on Jun 14, 2011 at 18:40 UTC | |
|
Re: "Can't locate object method 'new' but the package IS 'used'
by ig (Vicar) on Jun 14, 2011 at 18:56 UTC | |
|
Re: "Can't locate object method 'new' but the package IS 'used'
by Anonymous Monk on Jun 14, 2011 at 22:12 UTC | |
by locked_user sundialsvc4 (Abbot) on Jun 15, 2011 at 01:04 UTC | |
by Anonymous Monk on Jun 15, 2011 at 03:11 UTC |