Skip to content

Commit

Permalink
added plugin namespace examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Apr 30, 2012
1 parent e2182b1 commit 1f4af90
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
5 changes: 4 additions & 1 deletion lib/Mojolicious.pm
Expand Up @@ -258,7 +258,7 @@ following new ones.
Command line interface for your application, defaults to a
L<Mojolicious::Commands> object.
# Add another namespace to search for commands
# Add another namespace to load commands from
push @{$app->commands->namespaces}, 'MyApp::Command';
=head2 C<controller_class>
Expand Down Expand Up @@ -302,6 +302,9 @@ The plugin loader, defaults to a L<Mojolicious::Plugins> object. You can
usually leave this alone, see L<Mojolicious::Plugin> if you want to write a
plugin or the C<plugin> method below if you want to load a plugin.
# Add another namespace to load plugins from
push @{$app->plugins->namespaces}, 'MyApp::Plugin';
=head2 C<renderer>
my $renderer = $app->renderer;
Expand Down
6 changes: 3 additions & 3 deletions lib/Mojolicious/Commands.pm
Expand Up @@ -300,10 +300,10 @@ Short usage message shown before listing available commands.
my $namespaces = $commands->namespaces;
$commands = $commands->namespaces(['Mojolicious::Commands']);
Namespaces to search for available commands, defaults to
C<Mojolicious::Command> and C<Mojo::Command>.
Namespaces to load commands from, defaults to C<Mojolicious::Command> and
C<Mojo::Command>.
# Add another namespace to search for commands
# Add another namespace to load commands from
push @{$commands->namespaces}, 'MyApp::Command';
=head1 METHODS
Expand Down
5 changes: 3 additions & 2 deletions lib/Mojolicious/Plugins.pm
Expand Up @@ -90,9 +90,10 @@ L<Mojolicious::Plugins> implements the following attributes.
my $namespaces = $plugins->namespaces;
$plugins = $plugins->namespaces(['Mojolicious::Plugin']);
Namespaces to load plugins from.
Namespaces to load plugins from, defaults to L<Mojolicious::Plugin>.
push @{$plugins->namespaces}, 'MyApp::Plugins';
# Add another namespace to load plugins from
push @{$plugins->namespaces}, 'MyApp::Plugin';
=head1 METHODS
Expand Down

0 comments on commit 1f4af90

Please sign in to comment.