Catalyst::Helper::Model::Adaptor - helper for the incredibly lazy


Catalyst-Model-Adaptor documentation  | view source Contained in the Catalyst-Model-Adaptor distribution.

Index


NAME

Top

Catalyst::Helper::Model::Adaptor - helper for the incredibly lazy

SYNOPSIS

Top

Running:

    ./script/myapp_create.pl model SomeClass Adaptor MyApp::Backend::SomeClass create

Will create YourApp::Model::SomeClass that looks like:

    package YourApp::Model::SomeClass;
    use strict;
    use warnings;
    use base 'Catalyst::Model::Adaptor';

    __PACKAGE__->config( 
        class       => 'MyApp::Backend::SomeClass',
        constructor => 'create',
    );

    1;

Why you need a script to generate that is beyond me, but here it is.

ARGUMENTS

Top

   ./script/myapp_create.pl model <model_name> Adaptor <class> [<constructor>]

You need to sepecify the model_name (the name of the model), and class, the class being adapted. If $class->new isn't going to do what you want, pass the name of $class's constructor as constructor.

AUTHOR

Top

Jonathan Rockway <jrockway@cpan.org>

LICENSE

Top

This library is free software. You can redistribute it and/or modify it under the same terms as perl itself.

No copyright claim is asserted over the generated code.


Catalyst-Model-Adaptor documentation  | view source Contained in the Catalyst-Model-Adaptor distribution.