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.
new
my $loader = Mojo::Loader->new; my $loader = Mojo::Loader->new('MyApp::Namespace');
load
my $e = $loader->load('Foo::Bar');
reload
my $e = Mojo::Loader->reload;
search
my $modules = $loader->search('MyApp::Namespace');
To install Mojo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojo
CPAN shell
perl -MCPAN -e shell install Mojo
For more information on module installation, please visit the detailed CPAN module installation guide.