Remove use of Catalyst::Base from the tests
[catagits/Catalyst-Runtime.git] / t / lib / TestAppOnDemand / Controller / Body.pm
CommitLineData
878b821c 1package TestAppOnDemand::Controller::Body;
2
3use strict;
c057ae86 4use base 'Catalyst::Controller';
878b821c 5
6use Data::Dump ();
7
8sub params : Local {
9 my ( $self, $c ) = @_;
10
11 $c->res->body( Data::Dump::dump( $c->req->body_parameters ) );
12}
13
14sub read : Local {
15 my ( $self, $c ) = @_;
16
17 # read some data
18 my @chunks;
19
20 while ( my $data = $c->read( 10_000 ) ) {
21 push @chunks, $data;
22 }
23
24 $c->res->content_type( 'text/plain');
25
26 $c->res->body( join ( '|', map { length $_ } @chunks ) );
27}
28
c057ae86 291;