New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$ISA[0] assignment does not work #13240
Comments
From @cpansprout$ ./perl -Ilib -e '$ISA[0] = foo' $ ../perl.git/Porting/bisect.pl --end=v5.10.0 --target=miniperl -e '$ISA[0] = "foo"' So this goes back to the mro changes in 5.10. Perl is too trigger-happy when it comes to recursive inheritance. One problem with that error message is that it doesn’t prevent anything bad from happening (like ‘Modification of a read-only value attempted’). It only happens *after* the bad inheritance has already been set up. (The same applies to class hierarchies incompatible with C3.) So the error does not do that much good, even in an eval, since some other benign code might trip up on that same error. Something tells me we have an architectural problem of sorts. Obviously, if you are actually trying to call a method and you have @Foo::ISA = Foo, then the method call should croak. But internal bookkeeping that happens at the time of @ISA adjustment should probably simply be deferred if the hierarchy is nonsensical. Flags: Site configuration information for perl 5.19.4: Configured by sprout at Mon Sep 9 00:16:24 PDT 2013. Summary of my perl5 (revision 5 version 19 subversion 4) configuration: @INC for perl 5.19.4: Environment for perl 5.19.4: |
From zefram@fysh.orgFather Chrysostomos wrote:
More simply, we could just make the linear_isa caching lazy in all So to make the caching lazy we'd have to either withdraw mro::get_isarev() -zefram |
The RT System itself - Status changed from 'new' to 'open' |
From @cpansproutOn Sun, 19 Nov 2017 07:39:27 -0800, zefram@fysh.org wrote:
MRO::Compat provides its own get_isarev and is_universal when invoked on perl 5.8. It also has tests for get_isarev, which may need to be tweaked. And the following modules use at least one of the two functions, usually get_isarev: Test::Class I have not looked into them in detail. -- Father Chrysostomos |
From [Unknown Contact. See original ticket]On Sun, 19 Nov 2017 07:39:27 -0800, zefram@fysh.org wrote:
MRO::Compat provides its own get_isarev and is_universal when invoked on perl 5.8. It also has tests for get_isarev, which may need to be tweaked. And the following modules use at least one of the two functions, usually get_isarev: Test::Class I have not looked into them in detail. -- Father Chrysostomos |
Migrated from rt.perl.org#119803 (status was 'open')
Searchable as RT119803$
The text was updated successfully, but these errors were encountered: