Skip Menu |
 

This queue is for tickets about the MooX-ClassAttribute CPAN distribution.

Report information
The Basics
Id: 86209
Status: stalled
Priority: 0/
Queue: MooX-ClassAttribute

People
Owner: perl [...] toby.ink
Requestors: rsimoes [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Issues with class attribute inheritance
Download (untitled) / with headers
text/plain 463b
Creating an attribute "stub" in a role doesn't appear to work with MooX::ClassAttribute. See, for example, the following, which yields "Must have an is at /opt/perlbrew/perls/perl-5.16.3/lib/site_perl/5.16.3/Method/Generate/Accessor.pm line 30.": https://gist.github.com/rsimoes/5799805 Changing Moo to Moose (and MooX::ClassAttribute to MooseX::ClassAttribute) yields the expected result. Changing the class attributes to regular object attributes also works.
Download (untitled) / with headers
text/plain 379b
The CAVEATS section in the documentation does explicitly say: Show quoted text
> Overriding class attributes and their accessors > in subclasses is not yet supported. The > implementation, and expected behaviour hasn't > been figured out yet.
For now, a workaround would be to set a *builder* rather than a default in the parent class, and then override the builder in the child class.
Download (untitled) / with headers
text/plain 495b
Guess I should read docs more thoroughly. Sorry! On Mon Jun 17 16:25:30 2013, TOBYINK wrote: Show quoted text
> The CAVEATS section in the documentation does explicitly say: >
> > Overriding class attributes and their accessors > > in subclasses is not yet supported. The > > implementation, and expected behaviour hasn't > > been figured out yet.
> > For now, a workaround would be to set a *builder* rather than a > default in the parent class, and then override the builder in the > child class.
Download (untitled) / with headers
text/plain 107b
No problem. I'm keeping this bug open because, documented or not, it is an issue that needs to be resolved.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.