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
/
metaclasses
/
new_object_BUILD.t
1
#!/usr/bin/env perl
2
use strict;
3
use warnings;
4
use Test::More;
5
6
my $called;
7
{
8
package Foo;
9
use Moose;
10
11
sub BUILD { $called++ }
12
}
13
14
Foo->new;
15
is($called, 1, "BUILD called from ->new");
16
$called = 0;
17
Foo->meta->new_object;
18
is($called, 1, "BUILD called from ->meta->new_object");
19
20
done_testing;