From: Rafael Garcia-Suarez Date: Thu, 8 Oct 2009 12:56:56 +0000 (+0200) Subject: Simplify code that sets $VERSION on the "package" line X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e92f586bd3fd45336a351e251027401d8d4a7135;p=p5sagit%2Fp5-mst-13.2.git Simplify code that sets $VERSION on the "package" line --- diff --git a/op.c b/op.c index 740e464..1ccd512 100644 --- a/op.c +++ b/op.c @@ -3821,10 +3821,7 @@ Perl_package_version( pTHX_ OP *v ) { dVAR; PERL_ARGS_ASSERT_PACKAGE_VERSION; - SV *const version = cSVOPx(v)->op_sv; - SV *const pkgname = sv_mortalcopy(PL_curstname); - sv_catpv(pkgname, "::VERSION"); - sv_setsv( get_sv(SvPV_nolen(pkgname),TRUE), version ); + sv_setsv( GvSV(gv_fetchpvs("VERSION", GV_ADDMULTI, SVt_PV)), cSVOPx(v)->op_sv ); op_free(v); }