Skip to content

Commit

Permalink
more consistent callback examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed May 15, 2014
1 parent f6488e5 commit 84dbd46
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/Mojo/Log.pm
Expand Up @@ -142,7 +142,7 @@ A callback for formatting log messages.
$log->format(sub {
my ($time, $level, @lines) = @_;
...
return "[Thu May 15 17:47:04 2014] [info] I ♥ Mojolicious.\n";
});
=head2 handle
Expand Down Expand Up @@ -191,7 +191,7 @@ the following new ones.
=head2 append
$log->append($msg);
$log->append("[Thu May 15 17:47:04 2014] [info] I ♥ Mojolicious.\n");
Append message to L</"handle">.
Expand Down
7 changes: 6 additions & 1 deletion lib/Mojo/Template.pm
Expand Up @@ -501,11 +501,16 @@ Encoding used for template files.
=head2 escape
my $cb = $mt->escape;
$mt = $mt->escape(sub { reverse $_[0] });
$mt = $mt->escape(sub {...});
A callback used to escape the results of escaped expressions, defaults to
L<Mojo::Util/"xml_escape">.
$mt->escape(sub {
my $str = shift;
return reverse $str;
});
=head2 escape_mark
my $mark = $mt->escape_mark;
Expand Down

0 comments on commit 84dbd46

Please sign in to comment.