Catalyst::Model::CacheFunky::Loader - Load Cache::Funky Modules.
package MyApp::Model::Funky; use strict; use warnings; use base qw/Catalyst::Model::CacheFunky::Loader/; __PACKAGE__->config( class => 'MyApp::CacheFunky', # read all module under MyApp::CacheFunky::* initialize_info => { 'Storage::Simple' => {} }, mrr_args => { path => '/var/www/Common/lib/' } , # option. SEE L<Module::Recursive::Require> new(\%args) ); 1; package MyApp::CacheFunky::Foo; use strict; use warnings; use qw/Cache::Funky/; __PACKAGE__->register( 'foo', sub {`date`} ); 1; package MyAPpCacheFunky::Users; use strict; use warnings; use qw/Cache::Funky/; __PACKAGE__->register( 'user_count', sub { __PACKAGE__->context()->model('DB::Users')->count(); } ); 1; package MyApp::Controller::FooBar; sub foo : Local { my ( $s, $c ) = @_; $c->log->debug( $c->model('Funky::Foo')->foo() ); sleep(1); $c->log->debug( $c->model('Funky::Foo')->foo() ); sleep(1); $c->model('Funky::Foo')->delete('foo'); $c->log->debug( $c->model('Funky::Foo')->foo() ); } 1; [ %c . forward( 'Model::Funky::Foo', 'foo' ) % ]
Load Cache::Funky modules and make them ready for you.
Module::Recursive::Require
Tomohiro Teranishi <tomohiro.teranishi@gmail.com>
Copyright (c) Tomohiro Teranishi, All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
To install Catalyst::Model::CacheFunky::Loader, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::Model::CacheFunky::Loader
CPAN shell
perl -MCPAN -e shell install Catalyst::Model::CacheFunky::Loader
For more information on module installation, please visit the detailed CPAN module installation guide.