Rhesa Rozendaal wrote:
Heh, I use Module::Pluggable for that in my startup.pl:

use Module::Pluggable require => 1, search_path => [qw(
  My
  Other::Stuff
)];
__PACKAGE__->plugins;

That would load everything under My::* and Other::Stuff::*.

Can Module::Pluggable be used as an alternative to Module::Find? I load all my Model::DB classes up front in a BEGIN block in MyApp::Base, like this:

BEGIN {
  use Module::Find;

  Module::Find::setmoduledirs('path/to/lib');
  Module::Find::useall MyApp::DB;
}

use Module::Pluggable
  require => 1,
  search_dirs => [ 'path/to/lib/MyApp/DB' ]

For this to work I need the Module::Pluggable equivalent of useall().
--
Richard Jones

#####  CGI::Application community mailing list  ################
##                                                            ##
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp    ##
##                                                            ##
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:          http://cgiapp.erlbaum.net/                 ##
##                                                            ##
################################################################

Reply via email to