in reply to Re: strange scope
in thread strange scope
first, because it's a bit odd to change the logic of some code to fix a warningI don't think that logic changing is solely for fixing the warnings. The warnings show up because you ask for it, you ask Perl to warn you if it thinks that you might do something you don't intent. Perl is not always right about this, but mostly is. And there's another way to supress the warning if you're sure about what you're doing without changing the logic. Even if the changing is solely for fixing the warning, I don't see it as odd at all. Most Perlers, at least those around here, don't like the warnings show up, and clutter the error log unintentionally (in the case of web applications).
second, it ignores TMTOWTDIHow the logic changing ignores TMTOWTDI? Changing the way something is done is clearly to show another way to do it.
And a solution to the warning was never very interesting to meI think I understand your intent in your OP. You think the elsif is in the equal scope as if but Perl doesn't think so hence the warning. But you're interested in knowing why instead of how to get rid of the warnings. The thing is, if you try to understand what the warnings mean, you'll know how to solve the real problem, and get rid of the warnings as well. Hopefully.
Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!
|
|---|