r49@latte: adam | 2006-12-03 12:30:40 -0800
[catagits/Catalyst-Action-REST.git] / t / lib / SampleREST / Controller / Monkey.pm
CommitLineData
7ad87df9 1package SampleREST::Controller::Monkey;
2
3use strict;
4use warnings;
5use base 'Catalyst::Controller::REST';
6
7sub myindex :Path :Args(0) :ActionClass('REST') {}
8
9sub myindex_GET {
10 my ( $self, $c, $rdata ) = @_;
11
12 $c->stash->{'rest'} = {
13 'monkey' => 'likes chicken!',
14 };
15}
16
17sub myindex_POST {
18 my ( $self, $c, $rdata ) = @_;
19
20 $c->stash->{'rest'} = $c->request->data;
21}
22
231;