in reply to Passing / evaluating / dieing on one line...
UNLESS YOU ARE WRITING THROW-AWAY CODE, SUCH AS AN OBFUSCATION OR GOLF, DO NOT TRY AND FIT EVERYTHING ON ONE LINE!
Production code (i.e., anything that is used more than once) should be as readable and maintainable as possible. If this means you use 10 lines, then use 10 lines!
should really look something like(my $label_colnum = &column_exists( \@data, $_[1] || 0 )) == -1 and di +e;
Obviously, you'd name $second_value to be something meaningful in your situation. In addition, you're putting on each line one distinct idea.my $second_value = defined $_[1] ? $_[1] : 0; my $label_column = &column_exists(\@data, $second_value); die if $label_column == -1;
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Passing / evaluating / dieing on one line...
by zengargoyle (Deacon) on Apr 05, 2002 at 15:27 UTC | |
by dragonchild (Archbishop) on Apr 05, 2002 at 16:05 UTC | |
by particle (Vicar) on Apr 05, 2002 at 18:45 UTC | |
by dragonchild (Archbishop) on Apr 05, 2002 at 18:59 UTC | |
|
Re: Re: Passing / evaluating / dieing on one line...
by S_Shrum (Pilgrim) on Apr 05, 2002 at 23:56 UTC |