This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
ParseXS.pm: Only inc PL_amagic_generation before 5.9
authorFather Chrysostomos <sprout@cpan.org>
Wed, 23 May 2012 05:46:05 +0000 (22:46 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Wed, 23 May 2012 07:56:11 +0000 (00:56 -0700)
Originally, overload would not oven be checked for if
amagic_generation was 0, so it was necessary to do
PL_amagic_generation++, in case this was the first class to have over-
loading.  Ever since perl-5.8.0-87-g439cb1c, PL_amagic_generation++
has been unnecessary, since the boot code for version objects incre-
ments it.  Furthermore, newXS was already doing PL_sub_generation++
before that, and now does mro_method_changed_in.  The code for check-
ing the staleness of the overload tables has always checked
sub_generation (and, later, the stash-specific generation numbers).

dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm

index 883d905..b4999e0 100644 (file)
@@ -949,7 +949,9 @@ EOF
 
   print Q(<<"EOF") if ($self->{Overload});
 #    /* register the overloading (type 'A') magic */
+##if (PERL_REVISION == 5 && PERL_VERSION < 9)
 #    PL_amagic_generation++;
+##endif
 #    /* The magic for overload gets a GV* via gv_fetchmeth as */
 #    /* mentioned above, and looks in the SV* slot of it for */
 #    /* the "fallback" status. */