Action/ExtJS/Serialize.pm untested

filter: Statementstmt 0.0% 0 / 18 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 30 CC 2 SCAR 12.8
CC
2
Cov
0%
execute
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.6
1 #
2 # This file is part of CatalystX-ExtJS-Direct
3 #
4 # This software is Copyright (c) 2014 by Moritz Onken.
5 #
6 # This is free software, licensed under:
7 #
8 # The (three-clause) BSD License
9 #
10 package CatalystX::Action::ExtJS::Serialize;
11 $CatalystX::Action::ExtJS::Serialize::VERSION = '2.1.5';
12 # ABSTRACT: Handle responses from uploads
13 use strict;
14 use warnings;
15  
16 use base 'Catalyst::Action::Serialize';
17  
18 sub execute {
19 my ( $self, $controller, $c ) = @_;
20 $self->next::method( $controller, $c );
21 if ( $c->stash->{upload} && $c->stash->{upload} eq 'true' ) {
22 $c->res->content_type('text/html');
23 my $body = $c->res->body;
24 $body =~ s/"/\"/;
25 $c->res->body(
26 '<html><body><textarea>' . $body . '</textarea></body></html>' );
27 }
28 }
29  
30 1;
31  
32 __END__