That's the point of resource acquisition/release, sure. Why is it clearer to allow it to silently happen at the closing brace than to explicitly release on the line before the closing brace? The issue isn't whether or not you've used a destructor with a special ability — it's whether you've done so in a way that isn't clear, and thus should trigger a warning.
Also, does a tie matter? Would a tie have caused $foo++ cause warnings::unused to throw a warning?
(I posted this comment earlier, but it seems to have disappeared. Apologies if this makes it show up twice.)
In reply to Re^6: Warnings on unused variables?
by AZed
in thread Warnings on unused variables?
by AZed
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |