Commit | Line | Data |
---|---|---|
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 | ||
16 | use Test::More tests => 1; | |
17 | my $i = My::Class->new(totally_random_not_an_attribute => 1); | |
18 | is $i->{totally_random_not_an_attribute}, 1, 'Unknown attrs get into hash'; | |
19 |