in reply to How do I determine the underlying type of an Object?

my $obj = Module -> new; my ($type) = "$obj" =~ /=(\w+)[(]0x[0-9A-Fa-f]+[)]$/;

Abigail

Replies are listed 'Best First'.
Re: Re: How do I determine the underlying type of an Object?
by chromatic (Archbishop) on Apr 20, 2003 at 01:50 UTC

    This may fail in the rare case where the author has overloaded stringification for the object.

      Oh, but you can always first rebless the object.

      Abigail

        Though you could lose thread-safety if you're not careful. --Dave