Mojo::Loader - Loader
use Mojo::Loader; my $loader = Mojo::Loader->new; my $modules = $loader->search('Some::Namespace'); $loader->load($modules->[0]); # Reload Mojo::Loader->reload;
Mojo::Loader is a class loader and plugin framework.
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.
new
reload
my $e = Mojo::Loader->reload;
Reload all Perl files with changes.
search
my $modules = $loader->search('MyApp::Namespace');
Search modules in a namespace.
You can set the MOJO_LOADER_DEBUG environment variable to get some advanced diagnostics information printed to STDERR.
MOJO_LOADER_DEBUG
STDERR
MOJO_LOADER_DEBUG=1
Mojolicious, Mojolicious::Guides, http://mojolicio.us.
To install Mojolicious, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious
CPAN shell
perl -MCPAN -e shell install Mojolicious
For more information on module installation, please visit the detailed CPAN module installation guide.