Skip to content
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

B::C ignores ISA #426

Closed
constantined opened this issue Nov 11, 2018 · 3 comments
Closed

B::C ignores ISA #426

constantined opened this issue Nov 11, 2018 · 3 comments

Comments

@constantined
Copy link

constantined commented Nov 11, 2018

testcase:

package Net::DNS::Domain;
sub new { warn "new" };

package Net::DNS::DomainName1035;
our @ISA = qw(Net::DNS::Domain);

package main;

Net::DNS::DomainName1035->new();

Compiled binary dies with Can't locate object method "new" via package "Net::DNS::DomainName1035"

@constantined constantined changed the title Multiple packages in a single module B::C ignores ISA Nov 11, 2018
@rurban
Copy link
Owner

rurban commented Nov 11, 2018

Can you try adding a sub to the subclass? There was a limitation with empty classes in the walker as far as I remember.

@a-parser
Copy link

a-parser commented Nov 11, 2018

Adding a sub doesn't help, the problem even worse, the compiler doesn't see our @ISA = (...) during CHECK phase:

package B::isabugcompiler;
sub compile {
	warn "compile";
	warn "ISA: ", @Net::DNS::DomainName1035::ISA;
}

1;
perl -I. -MO=isabugcompiler isa-bug.pl
compile
ISA: 

The workaround is to move @ISA initialization to BEGIN phase:

use base 'Net::DNS::Domain';

But this is impossible because a huge amount of code already use direct @ISA manipulation

ENV: cperl 5.26 mingw

@constantined
Copy link
Author

Sorry, it was invalid bug report. See #427

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants