XP is just a number | |
PerlMonks |
Re: has it been blessed?by dash2 (Hermit) |
on Mar 06, 2002 at 16:17 UTC ( [id://149726]=note: print w/replies, xml ) | Need Help?? |
To check if you are blessed into a particular class:
if (ref ($obj) eq $classname) To check if you are blessed at all... I think if (ref $obj and ref $obj ne 'ARRAY' and ref $obj ne 'HASH') # ... etc. would do it... but if (UNIVERSAL::isa($obj, 'UNIVERSAL')) is probably better.
dave hj~
In Section
Seekers of Perl Wisdom
|
|