Gianni Ceccarelli > CatalystX-ComponentsFromConfig-1.002 > CatalystX::ComponentsFromConfig::Role::AdaptorRole

Download:
CatalystX-ComponentsFromConfig-1.002.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 1.002   Source   Latest Release: CatalystX-ComponentsFromConfig-1.004

NAME ^

CatalystX::ComponentsFromConfig::Role::AdaptorRole - parameterised role for trait-aware component adaptors

VERSION ^

version 1.002

DESCRIPTION ^

Here we document implementation details, see CatalystX::ComponentsFromConfig::ModelAdaptor and CatalystX::ComponentsFromConfig::ViewAdaptor for usage examples.

This role uses MooseX::Traits::Pluggable to allow you to add roles to your model classes via the configuration.

ATTRIBUTES ^

class

The name of the class to adapt.

args

Hashref to pass to the constructor of the adapted class.

traits

Arrayref of traits / roles to apply to the class we're adapting. These will be processed by _build_instance_with_traits in MooseX::Traits::Pluggable (like new_with_traits, see also MooseX::Traits).

METHODS ^

_trait_namespace

Used by MooseX::Traits::Pluggable. Given a "class" of My::App::Special::Class::For::Things loaded into the My::App Catalyst application, the following namespaces will be searched for traits / roles:

On the other hand, if the class name does not start with the application name, just ${class}::TraitFor will be searched.

ROLE PARAMETERS ^

component_type

The type of component to create, in lower case. Usually one of 'model', 'view' or 'controller'. There is no pre-packaged adptor to create controllers, mostly because I could not think of a sensible way to write it.

AUTHORS ^

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2012 by Net-a-porter.com.

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

syntax highlighting: