Skip to content

Commit

Permalink
many more links in guides
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Oct 11, 2013
1 parent 8536012 commit c7dc48c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

4.46 2013-10-10
4.46 2013-10-11
- Changed default name for generated applications from MyMojoliciousApp to
MyApp.
- Improved performance of route matching in Mojolicious::Routes::Pattern.
Expand Down
6 changes: 4 additions & 2 deletions lib/Mojolicious/Guides/Rendering.pod
Expand Up @@ -812,7 +812,8 @@ applications, plugins make that very simple.

1;

The C<register> method will be called when you load the plugin.
The C<register> method will be called when you load the plugin and to add your
helper to the application you can use L<Mojolicious/"helper">.

use Mojolicious::Lite;

Expand Down Expand Up @@ -1084,7 +1085,8 @@ L<Mojo::Template> contains the whole list of available options.

Maybe you would prefer a different template system than C<ep>, and there is
not already a plugin on CPAN for your favorite one, all you have to do is add
a new C<handler> when C<register> is called.
a new C<handler> with L<Mojolicious::Renderer/"add_handler"> when C<register>
is called.

package Mojolicious::Plugin::MyRenderer;
use Mojo::Base 'Mojolicious::Plugin';
Expand Down
21 changes: 12 additions & 9 deletions lib/Mojolicious/Guides/Routing.pod
Expand Up @@ -146,8 +146,9 @@ Most commonly used features every L<Mojolicious> developer should know about.

=head2 Minimal route

Every L<Mojolicious> application has a router object you can use to generate
route structures, that match in the same order in which they were defined.
The attribute L<Mojolicious/"routes"> contains a router you can use to
generate route structures, they match in the same order in which they were
defined.

# Application
package MyApp;
Expand All @@ -165,8 +166,8 @@ route structures, that match in the same order in which they were defined.

1;

The minimal static route above will load and instantiate the class
C<MyApp::Foo> and call its C<welcome> method.
The minimal route above will load and instantiate the class C<MyApp::Foo> and
call its C<welcome> method.

# Controller
package MyApp::Foo;
Expand Down Expand Up @@ -548,9 +549,9 @@ with L<Mojolicious::Controller/"send"> right away.

=head2 Bridges

Bridge routes can be used to share code with multiple nested routes, because
unlike normal nested routes, they always match and result in additional
dispatch cycles.
Bridge routes created with the method L<Mojolicious::Routes::Route/"bridge">
can be used to share code with multiple nested routes, because unlike normal
nested routes, they always match and result in additional dispatch cycles.

# /foo -> undef
# /foo/bar -> {controller => 'foo', action => 'baz'}
Expand Down Expand Up @@ -604,7 +605,8 @@ operations to finish before reaching the next dispatch cycle.

From the tutorial you should already know L<Mojolicious::Lite> routes, which
are in fact just a small convenience layer around everything described above
and also part of the normal router.
and accessible through methods like L<Mojolicious::Routes::Route/"get"> as
part of the normal router.

# POST /foo -> {controller => 'foo', action => 'abc'}
$r->post('/foo')->to(controller => 'foo', action => 'abc');
Expand Down Expand Up @@ -636,7 +638,8 @@ full L<Mojolicious> applications very straightforward.
$self->render(text => 'Just like a Mojolicious::Lite action.');
});

Even the more abstract concepts are available.
Even the more abstract concepts are available with methods like
L<Mojolicious::Routes::Route/"under">.

# GET /yada
# POST /yada
Expand Down

0 comments on commit c7dc48c

Please sign in to comment.