Re: Catching non-processed attributes

[email protected] (Dave Rolsky)
Newsgroups perl.moose
Message-ID <[email protected]>
On Mon, 25 Feb 2008, [email protected] wrote:

> I want to be able to see if a constructor was called with undefined attributes:
>
> package Foo;
> use Moose;
>
> has 'foo' => ( 'is' => 'ro', 'isa' => 'Str' );
>
> my $obj = Foo->new( 'foo' => 'bar', 'fake' => 'something');
> #I want to be able to see that fake was not processed by the constructor.

Maybe you want MooseX::StrictConstructor?


-dave

/*===================================================
VegGuide.Org                        www.BookIRead.com
Your guide to all that's veg.       My book blog
===================================================*/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.