in reply to Re^2: RFC: Perl meta programming
in thread RFC: Perl meta programming
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: RFC: Perl meta programming
by chromatic (Archbishop) on Oct 20, 2006 at 09:17 UTC | |
by TGI (Parson) on Oct 20, 2006 at 18:50 UTC | |
by diotalevi (Canon) on Oct 22, 2006 at 18:15 UTC | |
by druud (Sexton) on Sep 13, 2009 at 11:20 UTC | |
by diotalevi (Canon) on Oct 22, 2006 at 18:37 UTC | |
by chromatic (Archbishop) on Oct 22, 2006 at 21:11 UTC |