"be consistent" | |
PerlMonks |
Re: Style: buried variables or double referencing?by gryphon (Abbot) |
on Aug 20, 2005 at 15:41 UTC ( [id://485390]=note: print w/replies, xml ) | Need Help?? |
Greetings punch_card_don, Each of your suggested styles has merit depending on the particulars of the situation. Context is everything. There's nothing in your code examples that would make me shiver if I had to maintain it. (Although, "...many lines of code later..." does cause some pause, I have to admit.) A couple key things to consider:
I tend to write really compact code, but I understand that it can be more difficult for someone else to maintain. Here's what I'd be tempted to do:
TMTOWTDI, and you've already posted a few good ways. gryphon
In Section
Seekers of Perl Wisdom
|
|