[Melbourne-pm] issues with Catalyst::Controller::REST example
Malcolm Herbert
melbourne-pm at mjch.net
Mon Jan 17 01:45:15 PST 2011
I'm trying to bootstrap myself up to speed with using
Catalyst::Controller::REST but having issues - the perldoc synopsis
shows a basic set of methods to allow HTTP GET and PUT of 'thing'. In
the case of the PUT method, this appears to be incomplete:
# Answer PUT requests to "thing"
sub thing_PUT {
$radiohead = $req->data->{radiohead};
$self->status_created(
$c,
location => $c->req->uri->as_string,
entity => {
radiohead => $radiohead,
}
);
}
Going by the beginning of thing_GET, I'm assuming I need
my ( $self, $c ) = @_;
and an appropriate 'my' declaration for $radiohead, but I'm not sure
what $req might be (unless this is intended to be passed as a parameter)
... can anyone give me some pointers (or a better example) to get me
started? Thanks
Regards,
Malcolm
--
Malcolm Herbert This brain intentionally
mjch at mjch.net left blank
More information about the Melbourne-pm
mailing list