Be very careful calling UNIVERSAL::isa as a function, though, and be sure that's what you want. It's nice in that you can throw any reference at it whether or not it's blessed, but it doesn't allow various facade or delegation patterns that don't rely on @ISA inheritance, but do override isa to signal that they do, indeed, subclass an object through other means. This is probably better (using blessed as recommended):
blessed $obj && $obj->isa('foo')
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
| [reply] [Watch: Dir/Any] [d/l] [select] |