in reply to Re: arrays, context, and print - oh my.
in thread arrays, context, and print - oh my.

I can certainly see why one set of warnings specificaly added to a function to address a specific set of common bugs/possible bugs, would lead you to stop advocating warnings.

The warning is intended to warn you that perl and you might have thought differently on how that statment was phrased, it is not intended to babysit you. If you don't like the current warnings then you could probably help out by supplying the code to make print warn on all those cases.


___________
Eric Hodges
  • Comment on Re^2: arrays, context, and print - oh my.

Replies are listed 'Best First'.
Re^3: arrays, context, and print - oh my.
by Anonymous Monk on Aug 10, 2005 at 08:57 UTC
    If you don't like the current warnings then you could probably help out by supplying the code to make print warn on all those cases.
    Believe me, I've tried to make the warnings more sane. I've send in patches. More than once. I've also tried to make remove the warning in its entirely. But if P5P wants to keep the warning as it, how am I supposed to do that?

    BTW, I think perl should print the warning in none of those cases, as all cases I gave there's no error. Although it wouldn't be hard to create some cases where there is an error, but no warning is given.

Re^3: arrays, context, and print - oh my.
by Anonymous Monk on Aug 10, 2005 at 09:03 UTC
    The warning is intended to warn you that perl and you might have thought differently on how that statment was phrased, it is not intended to babysit you.
    But you see, perl and I thought exactly the same on how the statement was "phrased", we both thought that "print (...)" was a function call. It's that perl thought I thought that perl thought differently. And that's where I think it goes too far. Such warnings are wrong too often, and warnings that are wrong too often are worse than not having warnings at all.