Catalyst::Model::DynamicAdaptor - Dynamically load adaptor modules
0.01
package App::Web::Model::Logic; use base qw/Catalyst::Model::DynamicAdaptor/; __PACKAGE__->config( class => 'App::Logic', # all modules under App::Logic::* will be loaded # config => { foo => 'foo' , bar => 'bar' }, # constractor parameter for each loading module ) # mrr_args => { path => '/foo/bar' } # Module::Recursive::Require parameter. ); 1; package App::Web::Controller::Foo; sub foo : Local { my ( $self, $c ) = @_; # same as App::Logic::Foo->new->foo(); if you have App::Logic::Foo::new # same as App::Logic::Foo->foo(); # if you do not have App::Logic::Foo::new $c->model('Logic::Foo')->foo() ; } 1;
Load modules dynamicaly like L<Catalyst::Model::DBIC::Schema> does.
constructor
Tomohiro Teranishi <tomohiro.teranishi@gmail.com>
masaki
vkgtaro
hidek
hideden
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Catalyst::Model::DynamicAdaptor, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::Model::DynamicAdaptor
CPAN shell
perl -MCPAN -e shell install Catalyst::Model::DynamicAdaptor
For more information on module installation, please visit the detailed CPAN module installation guide.