Skip to content

Commit

Permalink
better helper documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 12, 2012
1 parent 122b2d3 commit 0508176
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
1 change: 1 addition & 0 deletions Changes
Expand Up @@ -5,6 +5,7 @@ This file documents the revision history for Perl extension Mojolicious.
Mojolicious::Plugin::DefaultHelpers.
- Made text_area helper a little smarter. (sshaw, sri)
- Improved inactivity timeout logging for WebSockets.
- Improved documentation.
- Fixed escaping bug in select_field and text_area helpers.
- Fixed Windows bug in "asset.t".

Expand Down
19 changes: 13 additions & 6 deletions lib/Mojolicious/Plugin/DefaultHelpers.pm
Expand Up @@ -160,9 +160,13 @@ Alias for L<Mojo/"config">.
=head2 C<content>
%= content foo => begin
test
% end
%= content 'foo'
%= content
Insert content into a layout template.
Store content and retrieve it.
=head2 C<content_for>
Expand Down Expand Up @@ -193,15 +197,16 @@ EXPERIMENTAL and might change without warning!
=head2 C<dumper>
%= dumper $foo
%= dumper {some => 'data'}
Dump a Perl data structure using L<Data::Dumper>.
=head2 C<extends>
% extends 'foo';
% extends 'blue';
% extends 'blue', title => 'Blue!';
Extend a template.
Extend a template, all arguments get merged into the stash.
=head2 C<flash>
Expand All @@ -220,8 +225,9 @@ only available in the partial template.
=head2 C<layout>
% layout 'green';
% layout 'green', title => 'Green!';
Render this template with a layout.
Render this template with a layout, all arguments get merged into the stash.
=head2 C<memorize>
Expand Down Expand Up @@ -262,9 +268,10 @@ Alias for L<Mojolicious::Controller/"stash">.
=head2 C<title>
% title 'Welcome!';
% title 'Welcome!', foo => 'bar';
%= title
Page title.
Page title, all arguments get merged into the stash.
=head2 C<url_for>
Expand Down

0 comments on commit 0508176

Please sign in to comment.