Mojo::Loader(3p)      User Contributed Perl Documentation     Mojo::Loader(3p)



NAME
       Mojo::Loader - Loader

SYNOPSIS
         use Mojo::Loader;

         my $loader = Mojo::Loader->new;
         my $modules = $loader->search('Some::Namespace');
         $loader->load($modules->[0]);

         # Reload
         Mojo::Loader->reload;

DESCRIPTION
       Mojo::Loader is a class loader and plugin framework.

METHODS
       Mojo::Loader inherits all methods from Mojo::Base and implements the
       following new ones.

   "load"
         my $e = $loader->load('Foo::Bar');

       Load a class, note that classes are checked for a "new" method to see
       if they are already loaded.

   "reload"
         my $e = Mojo::Loader->reload;

       Reload all Perl files with changes.

   "search"
         my $modules = $loader->search('MyApp::Namespace');

       Search modules in a namespace.

SEE ALSO
       Mojolicious, Mojolicious::Guides, <http://mojolicio.us>.



perl v5.12.2                      2011-03-06                  Mojo::Loader(3p)
