in reply to How Much Is Too Much (on one line of code)?
I wonder if you mean "too much in a line" or "too much in a statement"? We all know Perl doesn't mind newlines in a statement, so my personal rule that "seventy columns in a line is way too many" can help make the statement more comprehensible. Just add sensible phrasing and indentation.
The ". . . if $country" modifier can be removed, and the hard-coded 'gbr' with it, if we keep a hash of exceptions:
Added: changed uc to a translation escape, just to be different.my %oddball = ( '' => '', gbr => '', ); my $country = $card->country; $country = exists $oddball{$country} ? $oddball{$country} : "[\U$country\E]";
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How Much Is Too Much (on one line of code)?
by demerphq (Chancellor) on Jun 18, 2007 at 16:25 UTC | |
|
Re^2: How Much Is Too Much (on one line of code)?
by barrachois (Pilgrim) on Jun 20, 2007 at 06:56 UTC |