|
You can use the 'caught' method with your base class (which defaults to Exception::Class::Base), and then use 'ref' on the caught exception.
eval { ... };
if (my $e = Exception::Class::Base->caught()) {
print(STDERR "Caught an exception of type ", ref($e), "\n");
}
|