On Wed, Jul 14, 2010 at 09:28:35PM -0500, Jesse Luehrs wrote:
> Nope... you can't magically turn a class (even a non-Moose class) into a
> role... roles just don't work like that. Sticking with extends is really
> your only option for dealing with non-Moose code.

I see a few options:

1. copy your framework code into a Moose role (i.e. "refactor")
2. import the functions from the framework into a Moose role, using
Exporter.
3. create a Moose role which has one attribute, an object handle which is
an instantiation of your framework, and use delegations (i.e. the 'handles'
option) to tie methods from the role into the framework class.


-- 
             "If you realize that you aren't as wise today as you
        thought you were yesterday, you're wiser today." - Olin Miller
            .             .            .            .             .
Karen Etheridge, ka...@etheridge.ca       GCS C+++$ USL+++$ P+++$ w--- M++
http://etheridge.ca/                      PS++ PE-- b++ DI++++ e++ h(-)

Reply via email to