in reply to How to differentiate hash reference and object reference?

Are you doing this in a test suite as the .t suggests? Then use Test::More:
use warnings; use strict; use Test::More qw(no_plan); my $foo = {}; isa_ok($foo, 'My::Object');
which gives:
not ok 1 - The object isa My::Object # Failed test (temp.pl at line 6) # The object isn't a 'My::Object' it's a 'HASH' 1..1 # Looks like you failed 1 test of 1.

Replies are listed 'Best First'.
Re^2: How to differentiate hash reference and object reference?
by tphyahoo (Vicar) on Aug 31, 2005 at 14:18 UTC
    No, I'm thinking more, help users of the module debug fast and obviously. Good tip though.