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

Auto-generated builder doesn't participate in inheritance. #13

Open
tobyink opened this issue Jan 9, 2021 · 0 comments
Open

Auto-generated builder doesn't participate in inheritance. #13

tobyink opened this issue Jan 9, 2021 · 0 comments

Comments

@tobyink
Copy link
Owner

tobyink commented Jan 9, 2021

Migrated from rt.cpan.org #113304 (status was 'new')

Requestors:

From duff@pobox.com on 2016-03-24 13:27:47
:

The below program outputs "goober\ngoober\n" instead of "goober\nblah\n" . I tried it with perl 5.16.3 + Moops 0.034 and perl 5.22.1 + Moops 0.034 and it fails (outputs "goober\n" x 2) on both. Then I tried it on a system with perl 5.16.3 + Moops 0.031 and it works as expected.

I thought it might be related to the different versions of Moo between the two systems because the system where it worked was using Moo 1.006001 whereas the other systems were using Moo 2.000002. But when I tried the equivalent thing with Moo only, it worked fine everywhere.

So, at this point, I think there was a bug introduced somewhere between Moops 0.031 and 0.034.

thanks,

-Scott

----8<-----8<-----8<-----

use Moops;

class Foo {
has 'a' => ( is => 'rw', isa => Str, builder => method { "goober" } );
}

class Bar extends Foo {
method _build_a { "blah" }
}

say $_->a for Foo->new, Bar->new;

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

1 participant