Skip to content

Commit

Permalink
fixed readme example
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 23, 2011
1 parent b37602e commit e077135
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.pod
Expand Up @@ -96,10 +96,10 @@ Web development for humans, making hard things possible and everything fun.

# RESTful web service with JSON and text representation
get '/list/:offset' => sub {
my $self = shift;
my $self = shift;
my $numbers = [0 .. $self->param('offset')];
$self->respond_to(
json => {json => $numbers}},
json => {json => $numbers},
txt => {text => join(',', @$numbers)}
);
};
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojolicious/Lite.pm
Expand Up @@ -629,14 +629,14 @@ using them.
get '/counter' => sub {
my $self = shift;
$self->render(counter => ++$self->session->{counter});
$self->session->{counter}++;
};
app->start;
__DATA__
@@ counter.html.ep
Counter: <%= $counter %>
Counter: <%= session 'counter' %>
=head2 Secret
Expand Down

0 comments on commit e077135

Please sign in to comment.