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

Re^6: my least favorite perl feature

by adrianh (Chancellor)
on Feb 06, 2003 at 21:02 UTC ( #233274=note: print w/replies, xml ) Need Help??


in reply to Re^5: my least favorite perl feature
in thread my least favorite perl feature

Remember: it's the referant, not the reference that's blessed - so taking a reference to $obj_var_a can give you an object that overloads ==. Consider:

my $obj_var_a = 42; my $o = bless \$obj_var_a, 'OverloadedClass'; my $ref = \$obj_var_a; print "overloaded" if $ref->isa('OverloadedClass');

Don't you just love exceptions like this :-)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2021-04-19 17:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?