else {
AV* av = GvAVn(gv);
sv_magic((SV*)av, Nullsv, 'D', Nullch, 0);
+ SvREADONLY_on(av);
}
goto magicalize;
case '#':
else {
AV* av = GvAVn(gv);
sv_magic((SV*)av, (SV*)av, 'D', Nullch, 0);
+ SvREADONLY_on(av);
}
/* FALL THROUGH */
case '1':
# the format supported by op/regexp.t. If you want to add a test
# that does fit that format, add it to op/re_tests, not here.
-print "1..216\n";
+print "1..220\n";
BEGIN {
chdir 't' if -d 't';
print "ok $test\n";
$test++;
+eval { $+[0] = 13; };
+print "not "
+ if $@ !~ /^Modification of a read-only value attempted/;
+print "ok $test\n";
+$test++;
+
+eval { $-[0] = 13; };
+print "not "
+ if $@ !~ /^Modification of a read-only value attempted/;
+print "ok $test\n";
+$test++;
+
+eval { @+ = (7, 6, 5); };
+print "not "
+ if $@ !~ /^Modification of a read-only value attempted/;
+print "ok $test\n";
+$test++;
+
+eval { @- = qw(foo bar); };
+print "not "
+ if $@ !~ /^Modification of a read-only value attempted/;
+print "ok $test\n";
+$test++;
+
/.(a)(ba*)?/;
print "#$#-..$#+\nnot " if $#+ != 2 or $#- != 1;
print "ok $test\n";