projects
/
gitmo/Moose.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
initialize the metaclass when calling ->does
[gitmo/Moose.git]
/
t
/
immutable
/
immutable_destroy.t
1
use strict;
2
use warnings;
3
use Test::More;
4
5
{
6
package FooBar;
7
use Moose;
8
9
has 'name' => ( is => 'ro' );
10
11
sub DESTROY { shift->name }
12
13
local $SIG{__WARN__} = sub {};
14
__PACKAGE__->meta->make_immutable;
15
}
16
17
my $f = FooBar->new( name => 'SUSAN' );
18
19
is( $f->DESTROY, 'SUSAN', 'Did moose overload DESTROY?' );
20
21
done_testing;