Welcome to the Monastery | |
PerlMonks |
Re: Can't locate object method "new" via package MyNewPkg ...by Fletch (Bishop) |
on Oct 05, 2007 at 17:09 UTC ( [id://642964]=note: print w/replies, xml ) | Need Help?? |
Well, you're calling a method new in a package which doesn't implement that method. (Just like the error says; strange how that sometimes works . . . ) Look at the documentation (or baring that, the source) and see what methods it implements. Update: Aaah, rereading again it looks like you may be trying to make your own module which has the same contents as another. Check that you also updated the package declaration to match the new module (and file) name. If you don't do that the subs will be declared in the original package despite the filename having been changed. Just remember that the perl package namespace code gets puts into does not have to correspond to the package name you'd build from the filename.
In Section
Seekers of Perl Wisdom
|
|