[Catalyst] RFC: Catalyst::Controller::REST::DBIC
Peter Karman
peter at peknet.com
Mon May 5 21:49:10 BST 2008
On 05/05/2008 03:29 PM, J. Shirley wrote:
>
> My vote is hierarchy like:
> /foo
> /{token} # Can be pk1 if you so desire
> /- # - is never acceptable as an identifier
> /create # if you want an empty action here
>
> Now, I do vote against having an explicit create action, since "POST
> /foo" (or "POST /foo/{token}") seems to be a more reasonable create
> action.
fwiw, CX::CRUD::REST uses:
http://search.cpan.org/~karman/CatalystX-CRUD-0.25/lib/CatalystX/CRUD/REST.pm#SYNOPSIS
I use 0 (zero) as my reserved PK value since seq PKs start at 1 and zero evaluates as
false in Perl.
my ($self, $c, $oid) = @_;
if (!$oid) {
# could be absent or zero, either is fine
# ...
}
Also, I adopted drolsky's suggestion of /create_form instead of /create in order to keep
the RESTful no-verb style URIs.
--
Peter Karman . peter at peknet.com . http://peknet.com/
More information about the Catalyst
mailing list