diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-07-04 06:11:27 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-07-04 08:53:50 -0700 |
commit | a2e392149708327a5f56db7babd3692619a2f08a (patch) | |
tree | 25a6273d6aaa852544c6a16ae8b23b80463dd90c /op.c | |
parent | 8023b71189cc47b06d6a28e1d2e4c213c4d0d4d8 (diff) | |
download | perl-a2e392149708327a5f56db7babd3692619a2f08a.tar.gz |
Use ‘state’ in warning about sort {state $a}
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -9350,8 +9350,10 @@ S_simplify_sort(pTHX_ OP *o) SV * const name = AvARRAY(PL_comppad_name)[kid->op_targ]; if (SvCUR(name) == 2 && *SvPVX(name) == '$' && (SvPVX(name)[1] == 'a' || SvPVX(name)[1] == 'b')) + /* diag_listed_as: "my %s" used in sort comparison */ Perl_warner(aTHX_ packWARN(WARN_SYNTAX), - "\"my %s\" used in sort comparison", + "\"%s %s\" used in sort comparison", + SvPAD_STATE(name) ? "state" : "my", SvPVX(name)); } } while ((kid = kid->op_sibling)); |