[perl #79024] Bleadperl 80ebaca breaks OVID/Class-Trait-0.31.tar.gz
authorFather Chrysostomos <sprout@cpan.org>
Thu, 11 Nov 2010 14:12:00 +0000 (06:12 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 11 Nov 2010 17:35:19 +0000 (09:35 -0800)
commitaf16de9fb95af5577c9af62f59b791ea3a98d2b9
treecdf7a02ac40e867211c0e2c747ef81570f847403
parent8951c461a5079d86be33a432491eda98c24dc397
[perl #79024] Bleadperl 80ebaca breaks OVID/Class-Trait-0.31.tar.gz

Commit 80ebaca actually exposed an existing bug that Class::Trait was
really close to triggering already:

  undef *ISA; # @ISA no longer magical

Class::Trait’s tests just happened not to call ->isa before making any
changes to @ISA.

Now that the meta->isa cache is created immediately,
Class::Trait fails.

This bug can be reproduced in earlier perls by putting an ->isa call
right after the undef:

  undef *{"Extra::TSpouse::ISA"};
 'Extra::TSpouse'->isa('Class::Trait::Base');
  unshift @{"Extra::TSpouse::ISA"}, Class::Trait::Base;
  warn Extra::TSpouse->isa('Class::Trait::Base'); # something's wrong

This commit modifies gv_fetchpvn_flags to magicalise @ISA whenever it
is fetched.
gv.c
t/mro/basic.t