in reply to The trouble with Perl Idiom
Say, what's the deal with transforming every element of @_ after the first but then returning the second element? You never get constant values as parameters?
Anyhow, if you write code as list-processing stuff with nice indentation you get something that even looks Pythony. What could be prettier than that?
sub getRef { shift; # !!! $this is a global return map ref $this->getNodeById( $_ ), grep $_ && not ref, @_; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: The trouble with Perl Idiom
by PodMaster (Abbot) on Aug 27, 2004 at 06:34 UTC | |
|
Re^2: The trouble with Perl Idiom
by demerphq (Chancellor) on Aug 26, 2004 at 19:39 UTC | |
by chromatic (Archbishop) on Aug 26, 2004 at 20:22 UTC |