);
}
} 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);
forget to check the return value of your socket() call? See
L<perlfunc/setsockopt>.
-=item Setting $/ to a %s reference is forbidden
-
-(F) You tried to assign a reference to a non integer to C<$/>. In older
-Perls this would have behaved similarly to setting it to a reference to
-a positive integer, where the integer was the address of the reference.
-As of Perl 5.20.0 this is a fatal error, to allow future versions of Perl
-to use non-integer refs for more interesting purposes.
-
=item Setting $/ to a reference to %s as a form of slurp is deprecated, treating as undef
(W deprecated) You assigned a reference to a scalar to C<$/> where the
if you wish to slurp the file. In future versions of Perl assigning
a reference to will throw a fatal error.
+=item Setting $/ to %s reference is forbidden
+
+(F) You tried to assign a reference to a non integer to C<$/>. In older
+Perls this would have behaved similarly to setting it to a reference to
+a positive integer, where the integer was the address of the reference.
+As of Perl 5.20.0 this is a fatal error, to allow future versions of Perl
+to use non-integer refs for more interesting purposes.
+
=item shift on reference is experimental
(S experimental::autoderef) C<shift> with a scalar argument is experimental
} else {
my $msg= $@ || "Zombie Error";
print "ok ",$test_count++," # \$/ = []; should die\n";
- if ($msg!~m!Setting \$\/ to a ARRAY reference is forbidden!) {print "not ";}
+ if ($msg!~m!Setting \$\/ to an ARRAY reference is forbidden!) {
+ print "not ";
+ }
print "ok ",$test_count++," # \$/ = []; produced expected error message\n";
}
if (eval {$/ = {}; 1}) {