From: Yitzchak Scott-Thoennes Date: Tue, 6 Jun 2006 22:24:46 +0000 (-0700) Subject: exhausting <> in BEGIN{} gets ARGVOUT used only once warning X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7b8203e3be66f22041237ce6c371ea09ae857f20;p=p5sagit%2Fp5-mst-13.2.git exhausting <> in BEGIN{} gets ARGVOUT used only once warning Message-ID: <20060607052446.GA3240@efn.org> p4raw-id: //depot/perl@28364 --- diff --git a/gv.c b/gv.c index 7d49b83..746b2bb 100644 --- a/gv.c +++ b/gv.c @@ -1002,6 +1002,9 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags, if (strEQ(name2, "RGV")) { IoFLAGS(GvIOn(gv)) |= IOf_ARGV|IOf_START; } + else if (strEQ(name2, "RGVOUT")) { + GvMULTI_on(gv); + } break; case 'E': if (strnEQ(name2, "XPORT", 5)) diff --git a/t/op/readline.t b/t/op/readline.t index d047f16..6dfe695 100644 --- a/t/op/readline.t +++ b/t/op/readline.t @@ -6,7 +6,7 @@ BEGIN { require './test.pl'; } -plan tests => 13; +plan tests => 14; eval { for (\2) { $_ = } }; like($@, 'Modification of a read-only value attempted', '[perl #19566]'); @@ -79,6 +79,10 @@ SKIP: { } } +fresh_perl_is('BEGIN{<>}', '', + { switches => ['-w'], stdin => '', stderr => 1 }, + 'No ARGVOUT used only once warning'); + __DATA__ moo moo