diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-02-08 17:14:10 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-02-09 11:08:25 -0800 |
commit | a48e42054790d7e52df73e8a2c8b120da9ea6dc4 (patch) | |
tree | 9bc53152d37c696a75e61b3bdf0708cc46aad30e /mg.c | |
parent | a18bab6ebbe98d43ddd701fa7af24cad76eabe8c (diff) | |
download | perl-a48e42054790d7e52df73e8a2c8b120da9ea6dc4.tar.gz |
Use ‘an’ for $/=[] error message
This says ‘an ARRAY’:
$ perl -Mstrict -e '@{"a"}'
Can't use string ("a") as an ARRAY ref while "strict refs" in use at -e line 1.
This says ‘a ARRAY’:
$ ./miniperl -e '$/=[]'
Setting $/ to a ARRAY reference is forbidden at -e line 1.
It ought to say ‘an’.
Diffstat (limited to 'mg.c')
-rw-r--r-- | mg.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -2769,7 +2769,9 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg) ); } } else { - Perl_croak(aTHX_ "Setting $/ to a %s reference is forbidden", reftype); + /* diag_listed_as: Setting $/ to %s reference is forbidden */ + Perl_croak(aTHX_ "Setting $/ to a%s %s reference is forbidden", + *reftype == 'A' ? "n" : "", reftype); } } SvREFCNT_dec(PL_rs); |