package DoesBubba; use Moose::Role; sub bubba { ... } 1;
Then in your class:
package Hubba; use Moose; with 'DoesBubba'; # rest of your class here.
The 'bubba' method will be composed into your 'Hubba' class (and any other that consumes this role).
In reply to Re: Moose: Importing methods via Traits
by bruno
in thread Moose: Importing methods via Traits
by morgon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |