Disable strictures while setting $VERSION in a "package" statement
Rafael Garcia-Suarez [Thu, 8 Oct 2009 18:11:41 +0000 (20:11 +0200)]
op.c

diff --git a/op.c b/op.c
index 64331ee..e341b08 100644 (file)
--- a/op.c
+++ b/op.c
@@ -3820,8 +3820,11 @@ void
 Perl_package_version( pTHX_ OP *v )
 {
     dVAR;
+    U32 savehints = PL_hints;
     PERL_ARGS_ASSERT_PACKAGE_VERSION;
+    PL_hints &= ~HINT_STRICT_VARS;
     sv_setsv( GvSV(gv_fetchpvs("VERSION", GV_ADDMULTI, SVt_PV)), cSVOPx(v)->op_sv );
+    PL_hints = savehints;
     op_free(v);
 }