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

Re^2: useless Useless warning

by aufflick (Deacon)
on Jun 25, 2008 at 01:51 UTC ( #693860=note: print w/replies, xml ) Need Help??

in reply to Re: useless Useless warning
in thread useless Useless warning

Thanks - I hadn't looked at the diagnostics output.

So really the problem is in the assumption that there is no side effect, wheras in fact there is. The side effect is that the variable is made present in a a new scope which prevents the object from being destroyed (and the destructor has side effects).

Hm, or does it. Since I'm not assigning it to a variable the refcount won't be being increased. But surely it can't be destroyed while it's still in scope - in a void context or not...

I'll test it out and report back.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://693860]
[GotToBTru]: I appreciate the ability to highlight matching brackets/ parentheses/ braces, both for my own code and the inconsistently indented code of others
[Corion]: I like editors that automatically highlight the matching parenthesis (like % in vi), but that's roughly the extent to which I like editor support ;)
[GotToBTru]: same here Corion.
[Corion]: I tried for a short time (well, 8 hours now) to get Perl::Tidy set up but then found that it doesn't support (new-style) signatures and then stopped again ;))
[GotToBTru]: changing the font color of the rest of the document just because I typed a single quote character is annoying

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2017-02-27 12:51 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (385 votes). Check out past polls.