1Mojo::Loader(3)       User Contributed Perl Documentation      Mojo::Loader(3)
2
3
4

NAME

6       Mojo::Loader - Loader
7

SYNOPSIS

9           use Mojo::Loader;
10
11           my $loader = Mojo::Loader->new;
12           my $modules = $loader->search('Some::Namespace');
13           $loader->load($modules->[0]);
14
15           # Reload
16           Mojo::Loader->reload;
17

DESCRIPTION

19       Mojo::Loader is a class loader and plugin framework.
20

METHODS

22       Mojo::Loader inherits all methods from Mojo::Base and implements the
23       following new ones.
24
25   "load"
26           my $e = $loader->load('Foo::Bar');
27
28       Load a class, note that classes are checked for a "new" method to see
29       if they are already loaded.
30
31   "reload"
32           my $e = Mojo::Loader->reload;
33
34       Reload all Perl files with changes.
35
36   "search"
37           my $modules = $loader->search('MyApp::Namespace');
38
39       Search modules in a namespace.
40

SEE ALSO

42       Mojolicious, Mojolicious::Guides, <http://mojolicious.org>.
43
44
45
46perl v5.12.3                      2010-08-12                   Mojo::Loader(3)
Impressum