Do you know where your variables are? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I dislike the idiom because it
promotes ambiguous code. The author of
$obj->new(); hides something that the author
of (ref $obj)->new(); tells you.
Often it makes no real difference and the noise is about who is being forced to write code to accomodate someone else. I try to be more cooperative. Usually I would write your new more like this.
Which gives a message like: Bad class parameter at file.pl line 100 What is it that you find fine about the idiom? In reply to (Re)+: A few Perl OOP questions. (disparaging)
by rir
|
|