From d8940893299cd62dcdb1164f85c67ac6279f10b5 Mon Sep 17 00:00:00 2001 From: Abigail Date: Fri, 18 Nov 2016 14:52:18 +0100 Subject: $/ = \-1 will be fatal in Perl 5.28. Setting $/ to a reference of a non-positive integer has been deprecated since 5.20, in which it was special cased to act like you had set to $/ to undef. In Perl 5.28, setting $/ to a reference to a non-positive integer will be a fatal error. --- mg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mg.c') diff --git a/mg.c b/mg.c index 1bcfc4f977..8a00dd2541 100644 --- a/mg.c +++ b/mg.c @@ -2900,7 +2900,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg) if (val <= 0) { tmpsv= &PL_sv_undef; Perl_ck_warner_d(aTHX_ packWARN(WARN_DEPRECATED), - "Setting $/ to a reference to %s as a form of slurp is deprecated, treating as undef", + "Setting $/ to a reference to %s as a form of slurp is deprecated, treating as undef. This will be fatal in Perl 5.28", SvIV(SvRV(sv)) < 0 ? "a negative integer" : "zero" ); } -- cgit v1.2.1