Think about Loose Coupling | |
PerlMonks |
Re: Re: Passing / evaluating / dieing on one line...by zengargoyle (Deacon) |
on Apr 05, 2002 at 15:27 UTC ( [id://156951]=note: print w/replies, xml ) | Need Help?? |
Not if it will end up like this:
It's easier to cut-n-paste, it's obvious to a maintainer how to add another colnum variable. If you later want to refactor it's also easier to automate the conversion if the statements are grouped on one line. Simple s/blah (\w) blah (\d) blah die (".*");$/refactorsub(\1,\2,\3);/; or such, no multi-line wierdness ;). I tend to think of long identicalish lines as a template or macro or pseudo sub type of thing. Which would you prefer?
The yaddayaddayadda (...) is going to be one of my favorite operators in Perl 6 ;)
In Section
Seekers of Perl Wisdom
|
|