Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'd like to get some opinions from you guys about this piece of code I found:
sub to_xml { return shift->to_html(@_); }
It's short, elegant, and gets the job done. But is this something I should try to avoid emulating in my own code? Will it confuse people, and is it just bad practice in general to rely on the order of evaluations?
Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: One line accessor method style.
by Tanktalus (Canon) on Feb 23, 2005 at 18:02 UTC | |
by Anonymous Monk on Feb 23, 2005 at 22:52 UTC | |
by Tanktalus (Canon) on Feb 23, 2005 at 23:01 UTC | |
|
Re: One line accessor method style.
by friedo (Prior) on Feb 23, 2005 at 16:50 UTC | |
|
Re: One line accessor method style.
by Anonymous Monk on Feb 23, 2005 at 17:39 UTC | |
by dragonchild (Archbishop) on Feb 23, 2005 at 18:09 UTC | |
by Anonymous Monk on Feb 23, 2005 at 22:33 UTC |