package top; use Moose::Role; requires 'token'; sub foo { print "foo\n"; } package bottom; use Moose::Role; with 'top' => { -alias =>{ foo => '_foo', }, -excludes => [ 'foo' ], }; sub foo { print "bar\n"; } package something; use Moose; with "bottom"; sub token { print "I don't want to implement token untill the concerete class +but I want to use bottom's version of foo\n"; } package main; my $something = new something; $something->foo;
In reply to Re: Moose Roles and Override
by lune
in thread Moose Roles and Override
by edwinorc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |