in reply to Re: Perl 5.11.0 now available
in thread Perl 5.11.0 now available
And maybe someone well-versed in technobabble should offer a footnote decoding highlighted terms:It's hard not to suspect that you really do know what these mean, and are speaking up only as a voice for the downtrodden elsewhere; but anyway:Due to the commutativity breakage, code references are no longer treated specially when appearing on the left of the ~~ operator, but like any vulgar scalar.
(because the test succeeds for each key) but not{ a => undef } ~~ sub { $_[0] eq 'a' }
(since the stringification of the subroutine * is not a key of the hash), commutativity has broken. The general idea is that the right-hand side of the match now determines the semantics of the match; such a declaration automatically violates commutativity, since it depends on order prima facie.sub { $_[0] eq 'a' } ~~ { a => undef }
was treated differently from the thing on the left-hand side ofsub { $_[0] eq 'a' } ~~ { a => undef }
even though both are scalars—the former was treated as a “more special” scalar. In Perl 5.10.1 and subsequent releases, it loses this special status and is treated just as any other scalar would be. To call it therefore ‘vulgar’ may seem unnecessary, but it is exactly the classical linguistic sense of the word, and so one should probably not be surprised to see it from a linguist.'b' ~~ { a => undef }
Whomever served up that sentence should be hung up by his meat and two veg until he sees the error of his ways.I think that that answer permits me to point out that, quite aside from the strange content of your sentence, it's ‘Whoever’ you want, not ‘Whomever’.
* At least, I think that's how it works; I don't have an install on which to test. There's a note in the delta that undef no longer undergoes implicit stringification, so that
is always false; I take that to mean, in a what-I-don't-not-say-isn't-not-true way, that other (vulgar) scalars do undergo implicit stringification.undef ~~ \%hash
|
|---|