-
-
21 Sep 2009 13:45:44 UTC
- Distribution: MooseX-Alien
- Module version: 1.01
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (0)
- Testers (743 / 3 / 0)
- Kwalitee
Bus factor: 0- % Coverage
- License: unknown
- Activity
24 month- Tools
- Download (3.26KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
++ed by:1 non-PAUSE user- Dependencies
- Moose
- Test::More
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
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.
Module Install Instructions
To install MooseX::Alien, copy and paste the appropriate command in to your terminal.
cpanm MooseX::Alien
perl -MCPAN -e shell install MooseX::Alien
For more information on module installation, please visit the detailed CPAN module installation guide.