Mouse::Util::does_role() respects $thing->does() method
[gitmo/Mouse.git] / t / 050_metaclasses / 052_new_object_BUILD.t
CommitLineData
6217087a 1#!/usr/bin/env perl
2# This is automatically generated by author/import-moose-test.pl.
3# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4use t::lib::MooseCompat;
5use strict;
6use warnings;
7use Test::More;
8
9my $called;
10{
11 package Foo;
12 use Mouse;
13
14 sub BUILD { $called++ }
15}
16
17Foo->new;
18is($called, 1, "BUILD called from ->new");
19$called = 0;
20Foo->meta->new_object;
21is($called, 1, "BUILD called from ->meta->new_object");
22
23done_testing;