in reply to How to best pass on the context / wantarray?
I'm probably missing something, but isn't that just
sub frobnicate_position { my $obj = defined wantarray ? $_[0]->copy() : $_[0]; ... calculate new position here, ... set $obj->line() and $obj->column() return $obj };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to best pass on the context / wantarray?
by Corion (Patriarch) on Mar 26, 2006 at 18:20 UTC |