Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2014-08-29 13:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (280 votes), past polls