Re: nested roles are badly limited
[email protected] Sat, 22 Nov 2014 11:42:31 +0100
| Newsgroups | perl.moose |
|---|---|
| Message-ID | <[email protected]> |
Hej John, Am 21.11.2014 um 22:32 schrieb John Macdonald: > ==== cat test1.pl > package BRole; > use Moose::Role; > > requires 'b'; > > package ARole; > use Moose::Role; > > has 'b' => ( is => 'ro', isa => 'Scalar' ); > > package main; > use Moose; > with 'ARole', 'BRole'; > ==== just change it to this: package BRole; use Moose::Role; requires 'b'; package ARole; use Moose::Role; has 'b' => (is => 'ro', isa => 'Scalar'); package main; use Moose; with 'ARole'; with 'BRole'; And you're done. Kind regards -- Marco