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.
new
my $loader = Mojo::Loader->new;
my $loader = Mojo::Loader->new('MyApp::Namespace');
Construct a new Mojo::Loader object.
load
my $e = $loader->load('Foo::Bar');
Load a class.
reload
my $e = Mojo::Loader->reload;
Reload all Perl files with changes.
search
my $modules = $loader->search('MyApp::Namespace');
Search modules in a namespace.