Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: strange args format in module sub

by wog (Curate)
on Sep 16, 2001 at 06:58 UTC ( [id://112678]=note: print w/replies, xml ) Need Help??


in reply to strange args format in module sub

It seems that both the $class and %db_info are getting put together.

This is exactly what happens. When you bless an object, you take a reference (in this case to a hash), and attach a classname to it (which can be easily retrieved with ref.) The reference with the attached classname is is the object. When you call a method on an object the object itself is passed as the first argument.

You may want to look closer at those examples you have seen, or look for better examples. (You might want to try perltoot or perlobj, if you haven't already.)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-25 19:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found