projects
/
gitmo/Moose.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Remove useless BEGIN and tidy code
[gitmo/Moose.git]
/
t
/
300_immutable
/
015_immutable_destroy.t
1
use strict;
2
use warnings;
3
use Test::More tests => 1;
4
5
{
6
package FooBar;
7
use Moose;
8
9
has 'name' => ( is => 'ro' );
10
11
sub DESTROY { shift->name }
12
13
__PACKAGE__->meta->make_immutable;
14
}
15
16
my $f = FooBar->new( name => "SUSAN" );
17
18
is( $f->DESTROY, "SUSAN", "Did moose overload DESTROY?" );