* hobbs/rework-serializer-return-2:
Add tests for Serialize::View error behavior
Add some real error-handling for Serialize::View
View is halfway there. Do we want to poke in $c->error? Maybe not.
Port Serialize classes except for View.
Change Serialize::execute to expect serializers to throw an exception
Change Catalyst::Request::REST to be a mostly empty class, with
all the functionality in Catalyst::TraitFor::Request::REST
+ Simplify _get_allowed_methods method (aristotle)
+
Fri 11 Dec 01:08:00 GMT 2009 - Release 0.79
Cope with invalid (missing required q parameter) header like:
sub _get_allowed_methods {
my ( $self, $controller, $c, $name ) = @_;
my $class = ref($controller) ? ref($controller) : $controller;
- my $methods = Class::Inspector->methods($class);
- my @allowed;
- foreach my $method ( @{$methods} ) {
- if ( $method =~ /^$name\_(.+)$/ ) {
- push( @allowed, $1 );
- }
- }
- return @allowed;
+ my $methods = Class::Inspector->methods($class);
+ return map { /^$name\_(.+)$/ } @$methods;
};
sub _return_options {