From: Audrey Tang <cpan@audreyt.org> Date: Sat, 19 Oct 2002 17:51:57 +0000 (+0800) Subject: B/C.pm: make $0 to argv[0] again X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ede8dd12b51a88ac797d7d86b037c6d85d3d8e54;p=p5sagit%2Fp5-mst-13.2.git B/C.pm: make $0 to argv[0] again Message-ID: <20021019095157.GA430@not.autrijus.org> p4raw-id: //depot/perl@18056 --- diff --git a/ext/B/B/C.pm b/ext/B/B/C.pm index 1d195a0..77582d2 100644 --- a/ext/B/B/C.pm +++ b/ext/B/B/C.pm @@ -1615,6 +1615,15 @@ EOT } EOT } + else { + print <<EOT; + if ((tmpgv = gv_fetchpv("0",TRUE, SVt_PV))) {/* $0 */ + tmpsv = GvSV(tmpgv); + sv_setpv(tmpsv, argv[0]); + SvSETMAGIC(tmpsv); + } +EOT + } print <<'EOT'; if ((tmpgv = gv_fetchpv("\030",TRUE, SVt_PV))) {/* $^X */