From: Vincent Pit Date: Thu, 20 Mar 2008 12:06:47 +0000 (+0100) Subject: Double warning with perl -we '\&$x' X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4052d21cf21adbbdc9b825b0bd88d7c5804670eb;p=p5sagit%2Fp5-mst-13.2.git Double warning with perl -we '\&$x' From: "Vincent Pit" Message-ID: <38561.147.210.17.175.1206011207.squirrel@147.210.17.175> p4raw-id: //depot/perl@33544 --- diff --git a/sv.c b/sv.c index 4d7f32d..603cb3b 100644 --- a/sv.c +++ b/sv.c @@ -7910,7 +7910,7 @@ Perl_sv_2cv(pTHX_ SV *sv, HV **const st, GV **const gvp, const I32 lref) LEAVE; if (!GvCVu(gv)) Perl_croak(aTHX_ "Unable to create sub named \"%"SVf"\"", - SVfARG(sv)); + SVfARG(SvOK(sv) ? sv : &PL_sv_no)); } return GvCVu(gv); } diff --git a/t/lib/warnings/9uninit b/t/lib/warnings/9uninit index bbaba19..9316dc8 100644 --- a/t/lib/warnings/9uninit +++ b/t/lib/warnings/9uninit @@ -1070,8 +1070,6 @@ reset $m1; reset $g1; EXPECT Use of uninitialized value $m1 in subroutine dereference at - line 5. -Use of uninitialized value $m1 in subroutine dereference at - line 5. -Use of uninitialized value $g1 in subroutine dereference at - line 6. Use of uninitialized value $g1 in subroutine dereference at - line 6. Use of uninitialized value $m1 in splice at - line 9. Use of uninitialized value $g1 in splice at - line 9.