Tomas Doran > CatalystX-DynamicComponent-0.000000_01 > CatalystX::DynamicComponent::ModelsFromConfig

Download:
CatalystX-DynamicComponent-0.000000_01.tar.gz

Dependencies

Annotate this POD

Source  

NAME ^

CatalystX::DynamicComponent::ModelsFromConfig - Generate simple Catalyst::Model::Adaptor like models purely from application config.

SYNOPSIS ^

    package MyApp;
    use Moose;
    use namespace::autoclean;
    use Catalyst qw/
        +CatalystX::DynamicComponent::ModelsFromConfig
    /;
    __PACKAGE__->config(
        name => __PACKAGE__,
        'CatalystX::DynamicComponent::ModelsFromConfig' => {
            include => '(One|Two|Three)^',
            exclude => 'Tewnty',
        },
        'Model::One' => {
            class => 'SomeClass', # Name of class to load and construct
            other => 'config',    # Constructor passed other parameters
        },
        'Model::Two' => {
            class => 'SomeOtherClass',
            other => 'config',
        },
        ...
        'Model::TwentyThree' => { # Ignored, as excluded
        ...
    );
    __PACKAGE__->setup;

DESCRIPTION ^

FIXME

LINKS ^

Catalyst, MooseX::MethodAttributes, CatalystX::DynamicComponent.

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.

syntax highlighting: