Mouse::Role improved
[gitmo/Mouse.git] / t / 030_roles / 042_compose_overloading.t
1 use strict;
2 use warnings;
3 use Test::More tests => 1;
4
5 {
6     package Foo;
7     use Mouse::Role;
8
9     use overload
10         q{""}    => sub { 42 },
11         fallback => 1;
12
13     no Mouse::Role;
14 }
15
16 {
17     package Bar;
18     use Mouse;
19     with 'Foo';
20     no Mouse;
21 }
22
23 my $bar = Bar->new;
24
25 TODO: {
26     local $TODO = "the special () method isn't properly composed into the class";
27     is("$bar", 42, 'overloading can be composed');
28 }