If you want to find out if an object is blessed and is
a particular class, you would do something like this:
if ( UNIVERSAL::isa( $obj, 'Class::I::am::checking::for' )){ $obj->invoke_method(); }
If you want to know if it is blessed into any old class
at all, you could do something like this:
my $ref = ref($obj); if ( $ref && ($ref !~ /^(SCALAR|HASH|ARRAY)$/) ) { $obj->invoke_method(); }
In reply to Re: has it been blessed?
by ehdonhon
in thread has it been blessed?
by pmc2
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |