Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^3: Context propagation into subs and evals

by repellent (Priest)
on Feb 20, 2012 at 22:18 UTC ( #955166=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Context propagation into subs and evals
in thread Context propagation into subs and evals

Right, I forgot about the return; so I've striked off my question about no_implicit_return.

As for implicit_return, I guess I got confused as to the purpose of the if statement. Both the true and false code paths lead to an implicit return of the call to tst_context. Me thinks why bother having the if at all? :-)


Comment on Re^3: Context propagation into subs and evals
Select or Download Code
Re^4: Context propagation into subs and evals
by LanX (Canon) on Feb 20, 2012 at 22:28 UTC
    The if shows that multiple statements can be returned implicitly and it's not necessarily the undermost statement.

    If you know of a better example illustrating this - at the same time non-trivial and not complex - I'm open for suggestions. :)

    There is a whole bunch of "Flow-Control-Statements" which could play a role here.

    Cheers Rolf

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (12)
As of 2014-07-10 16:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (213 votes), past polls