- or download this
if( ref( $obj ) eq $type ) { ...
## or
if( $obj =~ m[=$type$] ) { ...
- or download this
if( ref( $exception ) eq $type )
or grep{ ref( $exception ) eq $_ } @{ $type::ISA } ) { ...
## or
if( $exception =~ m[=$type$]
or grep{ $exception =~ m[=$_] } @{ $type::ISA } ) { ...
- or download this
use Exception::Class (
'MyException',
...
isa => 'MyException'
},