summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-02-08 17:14:10 -0800
committerFather Chrysostomos <sprout@cpan.org>2014-02-09 11:08:25 -0800
commita48e42054790d7e52df73e8a2c8b120da9ea6dc4 (patch)
tree9bc53152d37c696a75e61b3bdf0708cc46aad30e /mg.c
parenta18bab6ebbe98d43ddd701fa7af24cad76eabe8c (diff)
downloadperl-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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mg.c b/mg.c
index 99a63f6844..c9bded4e0b 100644
--- a/mg.c
+++ b/mg.c
@@ -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);