Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Re: Re: OO sub, hash or hash reference.

by IOrdy (Friar)
on Feb 18, 2002 at 15:19 UTC ( [id://146161]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: OO sub, hash or hash reference.
in thread OO sub, hash or hash reference.

after seeing the above code I did some reading:

"The reason the original test is fragile ( ref($_[0]) eq 'HASH' ) is that it will make your code refuse to work on a hash if it happens to be blessed."

It was simpler than I thought.
  • Comment on Re: Re: Re: OO sub, hash or hash reference.

Log In?
Username:
Password:

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

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

    No recent polls found