File: DeserializeMultiPart.pm

package info (click to toggle)
libcatalyst-action-rest-perl 1.04-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 548 kB
  • sloc: perl: 3,851; makefile: 4
file content (22 lines) | stat: -rw-r--r-- 603 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package Test::Catalyst::Action::REST::Controller::DeserializeMultiPart;
use Moose;
use namespace::autoclean;

BEGIN { extends 'Catalyst::Controller' }

__PACKAGE__->config(
    'stash_key' => 'rest',
    'map'       => {
        'text/x-yaml'        => 'YAML',
        'text/x-data-dumper' => [ 'Data::Serializer', 'Data::Dumper' ],
        'text/broken'        => 'Broken',
    },
);

sub test :Local ActionClass('DeserializeMultiPart') DeserializePart('REST') {
    my ( $self, $c ) = @_;
    $DB::single=1;
    $c->res->output($c->req->data->{'kitty'} . '|' . $c->req->uploads->{other}->size);
}

1;