in reply to Moose: Importing methods via Traits
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).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Moose: Importing methods via Traits
by morgon (Priest) on Apr 27, 2009 at 21:58 UTC |