Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: Bad return value from a block with variable localization

by BrowserUk (Patriarch)
on Apr 10, 2006 at 08:59 UTC ( #542235=note: print w/replies, xml ) Need Help??

in reply to Bad return value from a block with variable localization

As a temporary workaround until the bug is fixed, the following seems to 'cure' it and I can't see any other side effects:

sub bar { if (@_) { return my $x = do { my $dummy; 1; }; } return 0; }

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.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2022-05-23 14:57 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (82 votes). Check out past polls.