use strict; use warnings; use Scalar::Util 'blessed'; wants_foo_object({}); sub wants_foo_object { die "no object" unless defined(my $obj = shift); die "not an object" unless blessed($obj); die "not a foo" unless $obj->isa('foo'); }
In reply to Re: How to differentiate hash reference and object reference?
by jdhedden
in thread How to differentiate hash reference and object reference?
by tphyahoo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |