Skip to content

Commit

Permalink
correct doc for ModuleLoader::load_with_params
Browse files Browse the repository at this point in the history
  • Loading branch information
mokko committed Nov 25, 2012
1 parent 38c5de8 commit 3a6b819
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/Dancer/ModuleLoader.pm
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ Runs a "C<use ModuleYouNeed qw(param1 param2 ...)>".
use Dancer::ModuleLoader;
...
Dancer::ModuleLoader->load('Something', qw(param1 param2) )
or die "Couldn't load Something\n";
Dancer::ModuleLoader->load_with_params('Something', qw(param1 param2) )
or die "Couldn't load Something with param1 and param2\n";
my ($res, $error) = Dancer::ModuleLoader->load('Something', @params);
$res or die "Couldn't load Something : '$error'\n";
my ($res, $error) = Dancer::ModuleLoader->load_with_params('Something', @params);
$res or die "Couldn't load Something with @params: '$error'\n";
Takes in arguments the module name, and optionally parameters to pass to the import internal method.
Expand Down Expand Up @@ -213,6 +213,10 @@ Example:
# class == 'Dancer::Template::Tiny
=head1 SEE ALSO
L<Module::Load>, L<Module::New::Loader>
=head1 AUTHOR
Alexis Sukrieh
Expand Down

0 comments on commit 3a6b819

Please sign in to comment.