in reply to Re^4: New behavior of 'each' with respect to references
in thread New behavior of 'each' with respect to references

Being inconsistent with a buggy and deprecated feature is of no importance to me.
I'm not sure how it's "buggy" -- it does exactly what it claims to do -- but it's clearly not "deprecated," since neither 5.8.9, 5.10.0, nor blead complains, even with -Mwarnings=deprecated. It's clearly a feature you don't like, but that's not the same as it being "deprecated."

Replies are listed 'Best First'.
Re^6: New behavior of 'each' with respect to references
by ikegami (Patriarch) on May 17, 2011 at 20:13 UTC

    exists on array elements has been deprecated since 5.12.0.

    Be aware that calling exists on array values is deprecated and likely to be removed in a future version of Perl.

    Same for delete.

      Okay, so there are several meanings of "deprecated":
      1. "perl -w" will warn, but it probably won't be removed for awhile (e.g. split to @_).
      2. "perl -w" will warn, and it will be removed in the next major release.
      3. "perl -w" won't warn, but the docs call it "deprecated" or possibly "vaguely deprecated;" who knows what will happen?
      delete $a[$n] and exists $a[$n] are deprecated(3), whatever that means.

        Okay, so there are several meanings of "deprecated"

        No, the meaning is always the same: Stop using it.

        1. "perl -w" will warn, but it probably won't be removed for awhile (e.g. split to @_).
        2. "perl -w" will warn, and it will be removed in the next major release.

        There's no such distinction. There's never been a promise that a deprecated feature will be removed in the next version. If you get the warning, it may be gone in the next version, it may be removed later, or it may never be removed.

        By the way, deprecated warnings are now issued even without -w.

        3. "perl -w" won't warn, but the docs call it "deprecated" or possibly "vaguely deprecated;" who knows what will happen?

        A feature won't be removed unless it issued a deprecated warning in the previous version's .0 release, so exists($a[$n]) and delete($a[$n]) won't be removed before 5.18.

        who knows what will happen?

        If you keep using a deprecated feature, the outlook isn't good.

        delete $a[$n] and exists $a[$n] are deprecated(3), whatever that means.

        If you read the rest of the sentence, it clearly defines what that means. They are "likely to be removed in a future version of Perl". I don't follow the confusion.