Catalyst::Plugin::PickComponents

Pick up the components for Catalyst
Download

Catalyst::Plugin::PickComponents Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Fayland Lam
  • Publisher web site:
  • http://search.cpan.org/~fayland/

Catalyst::Plugin::PickComponents Tags


Catalyst::Plugin::PickComponents Description

Pick up the components for Catalyst Catalyst::Plugin::PickComponents is a Perl module to pick up the components for Catalyst.SYNOPSIS use Catalyst qw/ PickComponents /; # configure which dir and modules to be loaded __PACKAGE__->config->{pick_components} = { paths => , modules => , expect_paths => , expect_modules => , } # after ConfigLoader or something else, in YAML myapp.yml or myapp_local.yml pick_components: paths: - ::Controller - ::Model modules: - MyApp::View::TT expect_paths: - ::Controller::Admin - ::Controller::Search expect_modules: - MyApp::Controller::Admin - MyApp::Controller::SearchThis plugin gives you the rights to pick up what modules loaded for a certain application instance.When source perl modules expand quickly, we might want to load different modules into different servers. For sure we can remove useless modules in different servers, but I'm afraid that it's hard to maintain and configure.Example: # http://www.myapp.com/, myapp_local.yml pick_components: paths: - ::Controller - ::Model modules: - MyApp::View::TT expect_paths: - ::Controller::Admin - ::Controller::Search expect_modules: - MyApp::Controller::Admin - MyApp::Controller::Search # http://search.myapp.com/, myapp_local.yml pick_components: paths: - ::Controller::Search - ::Model modules: - MyApp::View::TT - MyApp::Controller::Search - MyApp::Controller::Root expect_paths: - ::Controller::Admin expect_modules: - MyApp::Controller::Admin # http://admin.myapp.com/, myapp_local.yml pick_components: paths: - ::Controller::Admin - ::Model modules: - MyApp::View::TT - MyApp::Controller::Admin - MyApp::Controller::Root expect_paths: - ::Controller::Search expect_modules: - MyApp::Controller::Search Requirements: · Perl


Catalyst::Plugin::PickComponents Related Software