From: Florian Ragwitz Date: Wed, 8 Jul 2009 17:21:00 +0000 (+0200) Subject: Add todo test for composing overloading from roles. X-Git-Tag: 0.88~34 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d244140fececa0261060f2bb018bdc10b8cb4146;p=gitmo%2FMoose.git Add todo test for composing overloading from roles. --- diff --git a/t/030_roles/042_compose_overloading.t b/t/030_roles/042_compose_overloading.t new file mode 100644 index 0000000..cb7bf0c --- /dev/null +++ b/t/030_roles/042_compose_overloading.t @@ -0,0 +1,28 @@ +use strict; +use warnings; +use Test::More tests => 1; + +{ + package Foo; + use Moose::Role; + + use overload + q{""} => sub { 42 }, + fallback => 1; + + no Moose::Role; +} + +{ + package Bar; + use Moose; + with 'Foo'; + no Moose; +} + +my $bar = Bar->new; + +TODO: { + local $TODO = "the special () method isn't properly composed into the class"; + is("$bar", 42, 'overloading can be composed'); +}