Welcome to the Monastery | |
PerlMonks |
Re: Re: Re: has it been blessed?by chipmunk (Parson) |
on Mar 07, 2002 at 02:10 UTC ( [id://149913]=note: print w/replies, xml ) | Need Help?? |
Efficiency is nice, but there's something to be said for correctness as well. You've also forgotten REF, CODE, and LVALUE.
Comparing the return value from ref to a list of known types is simply the wrong approach. Either you'll forget something, or a new type will be added in a future version and your code will break. Go with the UNIVERSAL::isa() approach. Really.
In Section
Seekers of Perl Wisdom
|
|