Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: How to best pass on the context / wantarray?

by BrowserUk (Pope)
on Mar 26, 2006 at 18:18 UTC ( #539301=note: print w/ replies, xml ) Need Help??

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 };

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Comment on Re: How to best pass on the context / wantarray?
Download Code
Replies are listed 'Best First'.
Re^2: How to best pass on the context / wantarray?
by Corion (Pope) on Mar 26, 2006 at 18:20 UTC

    D'oh - talk about not seeing the forest for the trees :-)

    Of course, any other suggestions are still welcome, but I guess it'll be hard to improve on BrowserUK's suggestion

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://539301]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2015-11-27 04:52 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (718 votes), past polls