Skip to content

Commit

Permalink
removed route name from documentation browser again
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed May 3, 2012
1 parent facfd70 commit d291aac
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 9 deletions.
1 change: 0 additions & 1 deletion Changes
Expand Up @@ -4,7 +4,6 @@ This file documents the revision history for Perl extension Mojolicious.
- Added detach method to Mojolicious::Routes::Route.
- Improved 32bit Perl support of Mojo::Transaction::WebSocket.
(mikemagowan, sri)
- Improved documentation browser to have a route name.
- Improved documentation.
- Improved tests.
- Fixed bug that prevented helper names from starting with "end". (Akron)
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Plugin/Config.pm
Expand Up @@ -176,7 +176,7 @@ Parse configuration file.
=head2 C<register>
$plugin->register;
my $config = $plugin->register;
Register plugin in L<Mojolicious> application.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Plugin/JSONConfig.pm
Expand Up @@ -118,7 +118,7 @@ Process content with C<render> and parse it with L<Mojo::JSON>.
=head2 C<register>
$plugin->register;
my $config = $plugin->register;
Register plugin in L<Mojolicious> application.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Plugin/Mount.pm
Expand Up @@ -64,7 +64,7 @@ and implements the following new ones.
=head2 C<register>
$plugin->register;
my $route = $plugin->register;
Mount L<Mojolicious> application.
Expand Down
7 changes: 3 additions & 4 deletions lib/Mojolicious/Plugin/PODRenderer.pm
Expand Up @@ -39,8 +39,7 @@ sub register {
$app->helper(pod_to_html => sub { shift; b(_pod_to_html(@_)) });

# Perldoc
return if $conf->{no_perldoc};
$app->routes->any(
return $app->routes->any(
'/perldoc/*module' => {module => 'Mojolicious/Guides'} => sub {
my $self = shift;

Expand Down Expand Up @@ -112,7 +111,7 @@ sub register {
$self->render(inline => $PERLDOC, title => $title, parts => \@parts);
$self->res->headers->content_type('text/html;charset="UTF-8"');
}
)->name('perldoc');
) unless $conf->{no_perldoc};
}

sub _pod_to_html {
Expand Down Expand Up @@ -212,7 +211,7 @@ L<Mojolicious::Plugin> and implements the following new ones.
=head2 C<register>
$plugin->register;
my $route = $plugin->register;
Register renderer in L<Mojolicious> application.
Expand Down
2 changes: 1 addition & 1 deletion t/mojolicious/pod_renderer_lite_app.t
Expand Up @@ -15,7 +15,7 @@ use Mojolicious::Lite;
use Test::Mojo;

# POD renderer plugin
plugin 'PODRenderer';
plugin('PODRenderer')->name('perldoc');
ok app->routes->find('perldoc'), 'route found';

# Default layout
Expand Down

0 comments on commit d291aac

Please sign in to comment.