Skip Menu |

This queue is for tickets about the MooseX-StrictConstructor CPAN distribution.

Report information
The Basics
Id: 52133
Status: resolved
Priority: 0/
Queue: MooseX-StrictConstructor

People
Owner: Nobody in particular
Requestors: perl [...] froods.org
Cc:
AdminCc:

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



CC: bug-moosex-aliases [...] rt.cpan.org, bug-moosex-strictconstructor [...] rt.cpan.org
Subject: Bug in MooseX::Aliases with MooseX::StrictConstructor?
Date: Fri, 27 Nov 2009 12:04:03 -0800
To: moose [...] perl.org
From: Karen Etheridge <perl [...] froods.org>
There seems to be a bug with the way MooseX::Alias interacts with MooseX::StrictConstructor. Here is a repro case: package Foo; use Moose; use MooseX::StrictConstructor; use MooseX::Aliases; has attr => ( is => 'rw', isa => 'Str', alias => 'alias_attr', ); no Moose; __PACKAGE__->meta->make_immutable; 1; perl -I. -MFoo -wle'my $obj = Foo->new(alias_attr=>"blah"); print $obj->alias_attr' Found unknown attribute(s) passed to the constructor: alias_attr at generated method (unknown origin) line 23 Foo::new('Foo', 'alias_attr', 'blah') called at -e line 1 If the make_immutable call is removed, the problem disappears. My guess is that make_immutable does not take the alias into account when inlining the constructor? -- End random acts of parenting. . . . . . Karen Etheridge, karen@etheridge.ca GCS C+++$ USL+++$ P+++$ w--- M++ http://etheridge.ca/ PS++ PE-- b++ DI++++ e++ h(-)
On Fri Nov 27 15:03:23 2009, perl@froods.org wrote: Show quoted text
> > There seems to be a bug with the way MooseX::Alias interacts with > MooseX::StrictConstructor. Here is a repro case:
I'm not sure how to fix this unless MooseX::Alias provides some introspectability. There is a similar problem with MX::MultiInitArg, although that module does provide introspectability. Ideally, there'd be some standard API all these extensions would share that MX::SC could then use.
I'm not sure what happened, but this seems to be a duplicate of https://rt.cpan.org/Ticket/Display.html?id=52132. However, doy says 52132 is fixed, but autarch expresses concern about the issue in this ticket...
On Wed Oct 27 17:19:03 2010, ETHER wrote: Show quoted text
> I'm not sure what happened, but this seems to be a duplicate of > https://rt.cpan.org/Ticket/Display.html?id=52132. > > However, doy says 52132 is fixed, but autarch expresses concern about > the issue in this ticket...
Ah never mind, the dupe was opened because I cc'd RT when I wrote to the mailing list.