Hope that clarify things

#!/usr/bin/perl -w

package Foo;

use Moose::Role;

sub foo {
    print "I am foo\n";
};


package Bar;

use Moose::Role;

sub foo {
    print "I am bar\n";
};


package Baz;

use Moose;

with
    'Foo' => { excludes => [ 'foo' ] } ,
    'Bar' => {};

# or
#with
#    'Foo' => { excludes => 'foo' } ,
#    'Bar' => {};

package main;

my $baz = Baz->new;
$baz->foo;


On Fri, Apr 24, 2009 at 9:13 AM, Elliot Shank <p...@galumph.com> wrote:

> Call me confused about what's going on with multiple roles with methods
> having the same name.  I thought exclude should resolve this situation.
>  However, this complains about Baz having to implement foo(); what am I not
> understanding?
>
>
> package Foo;
>
> use Moose::Role;
>
> sub foo {};
>
>
> package Bar;
>
> use Moose::Role;
>
> sub foo {};
>
>
> package Baz;
>
> use Moose;
>
> with
>  Foo => { exclude => 'foo' },
>  Bar => {};
>
>


-- 
Regards,
Mikhail

Reply via email to