NAME

CatalystX::DynamicComponent::ModelsFromConfig::InterfaceRoles - Generate simple Catalyst::Model::Adaptor like models from application config, enforcing roles on the model classes.

SYNOPSIS

package MyApp;
use Moose;
use namespace::autoclean;
use Catalyst qw/
    +CatalystX::DynamicComponent::ModelsFromConfig::InterfaceRoles
/;
__PACKAGE__->config(
    name => __PACKAGE__,
    'CatalystX::DynamicComponent::ModelsFromConfig' => {
        include => 'One^',
    },
    'Model::One' => {
        class => 'SomeClass', # Name of class to load and construct
        other => 'config',    # Constructor passed other parameters
        interface_roles => [qw/ My::Role /], # Your app explodes if SomeClass doesn't do My::Role
    },
    ...
);
__PACKAGE__->setup;

DESCRIPTION

FIXME

LINKS

CatalystX::DynamicComponent::ModelsFromConfig, CatalystX::DynamicComponent, Catalyst.

BUGS

Probably plenty, test suite certainly isn't comprehensive.. Patches welcome.

AUTHOR

Tomas Doran (t0m) <bobtfish@bobtfish.net>

LICENSE

This code is copyright (c) 2009 Tomas Doran. This code is licensed on the same terms as perl itself.