Mouse::Util::does_role() respects $thing->does() method
[gitmo/Mouse.git] / t / 100_bugs / 027_constructor_object_overload.t
1 #!/usr/bin/perl
2 # This is automatically generated by author/import-moose-test.pl.
3 # DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4 use t::lib::MooseCompat;
5 use strict;
6 use warnings;
7 use Test::More;
8
9 {
10     package Foo;
11
12     use Mouse;
13
14     use overload '""' => sub {''};
15
16     sub bug { 'plenty' }
17
18     __PACKAGE__->meta->make_immutable;
19 }
20
21 ok(Foo->new()->bug(), 'call constructor on object reference with overloading');
22
23 done_testing;