[Catalyst-commits] r13321 -
Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual
hkclark at dev.catalyst.perl.org
hkclark at dev.catalyst.perl.org
Sun May 30 00:19:51 GMT 2010
Author: hkclark
Date: 2010-05-30 01:19:51 +0100 (Sun, 30 May 2010)
New Revision: 13321
Modified:
Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Cookbook.pod
Log:
Fix for RT #56970
Modified: Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Cookbook.pod
===================================================================
--- Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Cookbook.pod 2010-05-29 22:21:29 UTC (rev 13320)
+++ Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Cookbook.pod 2010-05-30 00:19:51 UTC (rev 13321)
@@ -133,7 +133,7 @@
sub add_item : Local {
my ( $self, $c ) = @_;
- my $item_id = $c->req->param("item");
+ my $item_id = $c->req->params->{item};
push @{ $c->session->{items} }, $item_id;
@@ -387,8 +387,8 @@
sub login : Local {
my ($self, $c) = @_;
- if ( my $user = $c->req->param("user")
- and my $password = $c->req->param("password") )
+ if ( my $user = $c->req->params->{user}
+ and my $password = $c->req->param->{password} )
{
if ( $c->authenticate( username => $user, password => $password ) ) {
$c->res->body( "hello " . $c->user->name );
@@ -454,7 +454,7 @@
sub feed_moose : Local {
my ( $self, $c ) = @_;
- $c->model( "Moose" )->eat( $c->req->param("food") );
+ $c->model( "Moose" )->eat( $c->req->params->{food} );
}
With this action, anyone can just come into the moose cage and feed
@@ -476,7 +476,7 @@
my ( $self, $c ) = @_;
if ( $c->check_roles( "moose_feeder" ) ) {
- $c->model( "Moose" )->eat( $c->req->param("food") );
+ $c->model( "Moose" )->eat( $c->req->params->{food} );
} else {
$c->stash->{error} = "unauthorized";
}
More information about the Catalyst-commits
mailing list