Commit | Line | Data |
---|---|---|
d244140f | 1 | use strict; |
2 | use warnings; | |
a28e50e4 | 3 | use Test::More; |
d244140f | 4 | |
5 | { | |
6 | package Foo; | |
7 | use Moose::Role; | |
8 | ||
9 | use overload | |
10 | q{""} => sub { 42 }, | |
11 | fallback => 1; | |
12 | ||
13 | no Moose::Role; | |
14 | } | |
15 | ||
16 | { | |
17 | package Bar; | |
18 | use Moose; | |
19 | with 'Foo'; | |
20 | no Moose; | |
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 | } | |
a28e50e4 | 29 | |
30 | done_testing; |