X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2FBUILD_in_local_class.t;fp=t%2FBUILD_in_local_class.t;h=ceebd5d138320e90c9eded5b0d96a96aab7919f8;hb=e28467cf29962234a570f8e2553319e659090c6b;hp=0000000000000000000000000000000000000000;hpb=5475faecc8d3305cdc1f48836fffa871f3d1b507;p=gitmo%2FMooseX-Emulate-Class-Accessor-Fast.git diff --git a/t/BUILD_in_local_class.t b/t/BUILD_in_local_class.t new file mode 100644 index 0000000..ceebd5d --- /dev/null +++ b/t/BUILD_in_local_class.t @@ -0,0 +1,19 @@ +{ + package My::Class; + use Moose; + use namespace::clean -except => 'meta'; + + with 'MooseX::Emulate::Class::Accessor::Fast'; + + sub BUILD { + my ($self, $args) = @_; + return $self; + } + + __PACKAGE__->meta->make_immutable; +} + +use Test::More tests => 1; +my $i = My::Class->new(totally_random_not_an_attribute => 1); +is $i->{totally_random_not_an_attribute}, 1, 'Unknown attrs get into hash'; +