{{ $NEXT }}
- Fixed test failures with JSON 2.90 (thanks Samuel Kaufman!)
+- Use Catalyst's http method matching for REST instead of
+ ActionRole, whose feature went into core in 5.90013, and
+ MatchRequestMethod, whose feature went into 5.90020
2.004004 2012-11-21 12:20:41 Europe/Vienna
- Fixed test failures in t/[rest,rpc]/item.t on newer HTTP::Message versions
[Prereqs]
perl = 5.008006
DBIx::Class = 0.08103
-Catalyst::Runtime = 5.7010
-Catalyst::Controller::ActionRole = 0
-Catalyst::ActionRole::MatchRequestMethod = 0
+Catalyst::Runtime = 5.90020
Catalyst::Action::Serialize = 0.83
CGI::Expand = 2.02
JSON = 2.50
#ABSTRACT: Provides a DBIx::Class web service automagically
use Moose;
-BEGIN { extends 'Catalyst::Controller::ActionRole'; }
+BEGIN { extends 'Catalyst::Controller'; }
use CGI::Expand ();
use DBIx::Class::ResultClass::HashRefInflator;
=cut
-sub update_or_create_objects : Chained('objects_no_id') PathPart('') Does('MatchRequestMethod') Method('POST') Method('PUT') Args(0)
+sub update_or_create_objects : POST PUT Chained('objects_no_id') PathPart('') Args(0)
{
my ( $self, $c ) = @_;
$self->update_or_create($c);
=cut
-sub delete_many_objects : Chained('objects_no_id') PathPart('') Does('MatchRequestMethod') Method('DELETE') Args(0)
+sub delete_many_objects : DELETE Chained('objects_no_id') PathPart('') Args(0)
{
my ( $self, $c ) = @_;
$self->delete($c);
=cut
-sub list_objects : Chained('objects_no_id') PathPart('') Does('MatchRequestMethod') Method('GET') Args(0)
+sub list_objects : GET Chained('objects_no_id') PathPart('') Args(0)
{
my ( $self, $c ) = @_;
$self->list($c);
=cut
-sub update_or_create_one_object : Chained('object_with_id') PathPart('') Does('MatchRequestMethod') Method('POST') Method('PUT') Args(0)
+sub update_or_create_one_object : POST PUT Chained('object_with_id') PathPart('') Args(0)
{
my ( $self, $c ) = @_;
$self->update_or_create($c);
=cut
-sub delete_one_object : Chained('object_with_id') PathPart('') Does('MatchRequestMethod') Method('DELETE') Args(0)
+sub delete_one_object : DELETE Chained('object_with_id') PathPart('') Args(0)
{
my ( $self, $c ) = @_;
$self->delete($c);
=cut
-sub list_one_object : Chained('object_with_id') PathPart('') Does('MatchRequestMethod') Method('GET') Args(0)
+sub list_one_object : GET Chained('object_with_id') PathPart('') Args(0)
{
my ( $self, $c ) = @_;
$self->item($c);