Skip to content

Commit

Permalink
made escaping examples more realistic
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Apr 24, 2012
1 parent 3246b9c commit 7dd5c36
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Changes
@@ -1,5 +1,8 @@
This file documents the revision history for Perl extension Mojolicious.

2.89 2012-04-25
- Improved documentation.

2.88 2012-04-24
- Improved documentation.
- Improved tests.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious.pm
Expand Up @@ -33,7 +33,7 @@ has static => sub { Mojolicious::Static->new };
has types => sub { Mojolicious::Types->new };

our $CODENAME = 'Leaf Fluttering In Wind';
our $VERSION = '2.88';
our $VERSION = '2.89';

# "These old doomsday devices are dangerously unstable.
# I'll rest easier not knowing where they are."
Expand Down
6 changes: 3 additions & 3 deletions lib/Mojolicious/Guides/Rendering.pod
Expand Up @@ -99,7 +99,7 @@ Perl code, a naive translation could look like this.
$output .= '<ul>';
for my $j (1 .. $i) {
$output .= '<li>';
$output .= escape scalar $j;
$output .= xml_escape scalar $j;
$output .= '</li>';
}
$output .= '</ul>';
Expand Down Expand Up @@ -464,12 +464,12 @@ A naive translation to Perl code could look like this.
my $name = shift;
my $output = '';
$output .= 'Hello ';
$output .= escape scalar $name;
$output .= xml_escape scalar $name;
$output .= '.';
return Mojo::ByteStream->new($output);
}
for (1 .. 10) {
$output .= escape scalar $block->('Sebastian');
$output .= xml_escape scalar $block->('Sebastian');
}
return $output;

Expand Down

0 comments on commit 7dd5c36

Please sign in to comment.