Fix warnings in latest Moose
[gitmo/MooseX-Emulate-Class-Accessor-Fast.git] / t / BUILD_in_local_class.t
CommitLineData
e28467cf 1{
2 package My::Class;
3 use Moose;
4 use namespace::clean -except => 'meta';
5
6 with 'MooseX::Emulate::Class::Accessor::Fast';
7
8 sub BUILD {
9 my ($self, $args) = @_;
10 return $self;
11 }
12
13 __PACKAGE__->meta->make_immutable;
14}
15
16use Test::More tests => 1;
17my $i = My::Class->new(totally_random_not_an_attribute => 1);
18is $i->{totally_random_not_an_attribute}, 1, 'Unknown attrs get into hash';
19