Using code like ref($me) eq 'my_class_name' can break inheritance if $me doesn't contain an object of your class, but rather an object of a class that inherits from your class. Far better to use the isa method (from the UNIVERSAL class).
--if (ref($me} && $me->isa('my_class_name')) {
"The first rule of Perl club is you don't talk about Perl club."
In reply to Re: Re: OO Perl: calling a constructor within a class
by davorg
in thread OO Perl: calling a constructor within a class
by fx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |