NAME

MooseX::Alien - Extend a non-Moose class with Moose

SYNOPSIS

package MyApp::Context;

use Moose;
extends 'Mojolicious::Context';
with 'MooseX::Alien;

DESCRIPTION

The fact that Moose objects are hashrefs means it is easy to use Moose to extend non-Moose classes, as long as they too are hash references.

This role usses an approach similar to the defined in Moose::Cookbook::FAQ. However this role will call BUILDARGS and BUILDALL

This approach may not work for all classes. The alien class must be implemented using a HASHREF and the constructor must accept either a list of name/value pairs or a HASHREF

SEE ALSO

Moose::Cookbook::FAQ MooseX::NonMoose

AUTHOR

Graham Barr <gbarr@cpan.org>

COPYRIGHT & LICENSE

Copyright (C) 2009 Graham Barr

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.