Catalyst::Model::InjectionHelpers::Application - Adaptor for application scoped models
package MyApp; use Catalyst 'InjectionHelper'; MyApp->inject_components( 'Model::ApplicationScoped' => { from_class=>'MyApp::Singleton', adaptor=>'Application', roles=>['MyApp::Role::Foo'], method=>sub { my ($adaptor, $class, $app, %args) = @_; return $class->new(aaa=>$args{arg}); }, }); MyApp->config( 'Model::ApplicationScoped' => { aaa=>100 }, ); MyApp->setup;
Injection helper adaptor for application scoped model. See Catalyst::Plugin::InjectionHelpers for details.
John Napiorkowski email:jjnapiork@cpan.org
Catalyst::Plugin::InjectionHelpers Catalyst, Catalyst::Model::InjectionHelpers::Application, Catalyst::Model::InjectionHelpers::Factory, Catalyst::Model::InjectionHelpers::PerRequest Catalyst::ModelRole::InjectionHelpers
Copyright 2016, John Napiorkowski email:jjnapiork@cpan.org
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Catalyst::Plugin::InjectionHelpers, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::Plugin::InjectionHelpers
CPAN shell
perl -MCPAN -e shell install Catalyst::Plugin::InjectionHelpers
For more information on module installation, please visit the detailed CPAN module installation guide.