The problem I have with isa() is that I either need to use the verbose UNIVERSAL::isa( $foo, 'Object::Foo' ) syntax, or check the return of ref() to be sure that I can do $foo->isa('Object::Foo') without dying.
Wrapping every isa() check in an eval{} seems cumbersome, too.
After a bit of poking, Scalar::Util's blessed() and reftype() look like pretty good options. I suppose I could just import isa(), as well.
TGI says moo
In reply to Re^3: RFC: Perl meta programming
by TGI
in thread RFC: Perl meta programming
by bennymack
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |