This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Do not try to load a feature bundle when doing "no VERSION"
authorRafael Garcia-Suarez <rgs@consttype.org>
Wed, 19 May 2010 18:36:12 +0000 (20:36 +0200)
committerRafael Garcia-Suarez <rgs@consttype.org>
Thu, 20 May 2010 14:06:49 +0000 (16:06 +0200)
pp_ctl.c

index 6d487ac..05c5310 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -3357,8 +3357,9 @@ PP(pp_require)
            }
        }
 
-        /* We do this only with use, not require. */
+       /* We do this only with "use", not "require" or "no". */
        if (PL_compcv &&
+               !(cUNOP->op_first->op_private & OPpCONST_NOVER) &&
          /* If we request a version >= 5.9.5, load feature.pm with the
           * feature bundle that corresponds to the required version. */
                vcmp(sv, sv_2mortal(upg_version(newSVnv(5.009005), FALSE))) >= 0) {