Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


in reply to Can't locate object method "new" via package MyNewPkg ...

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://642964]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-25 10:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found