blib/lib/Tapper/Reports/Web/View/JSON.pm

filter: Statementstmt 66.6% 12 / 18 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 100% 1 / 1 totaltotal 64.0% 16 / 25 CC 2 SCAR 11.0
CC
2
Cov
60%
process
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« blib/lib/Tapper/Reports/Web/Controller/Root.pm ↑ Summary blib/script/tapper_reports_web_fastcgi_live.pl »
1 package Tapper::Reports::Web::View::JSON;
2 13 our $AUTHORITY = 'cpan:TAPPER';
3 13 $Tapper::Reports::Web::View::JSON::VERSION = '5.0.17';
4 13 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 13 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 13 ▶use base qw/Catalyst::View/;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 0 ▶sub process {
Subroutine process: not called CC=2 SCAR=17.9
Pod documented
10  
11 0 my ( $or_self, $or_c ) = @_;
12  
13 0 $or_c->response->content_type('text/plain');
14  
15 0 ▶ if ( $or_c->stash->{content} ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($or_c->stash->{'content'}) { } 0 0 0
16 $or_c->response->body(
17 JSON::XS::encode_json( $or_c->stash->{content} )
18 0 );
19 }
20 else {
21 0 $or_c->response->body('');
22 }
23  
24 0 return 1;
25  
26 }
27  
28 13 1;
29  
30 __END__
« blib/lib/Tapper/Reports/Web/Controller/Root.pm ↑ Summary blib/script/tapper_reports_web_fastcgi_live.pl »