OpenSearch/Response/JSON.pm

filter: Statementstmt 93.7% 15 / 16 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 100% 2 / 2 totaltotal 88.0% 22 / 25 CC 2 SCAR 4.1
CC
2
Cov
89%
stringify
2.0
content_type
2.0
BEGIN
1.0
CRAP 1.5
« OpenSearch/Response/Tiny.pm ↑ Summary OpenSearch/Facets.pm »
1 package Search::OpenSearch::Response::JSON;
2 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 extends 'Search::OpenSearch::Response';
5 2 ▶use JSON;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 2 our $VERSION = '0.409';
8  
9 1 ▶sub stringify {
Subroutine stringify: called CC=2 SCAR=7.1
Pod documented
10 1 my $self = shift;
11  
12 1 my $resp = $self->as_hash;
13
14 # in devel mode use pretty()
15 1 ▶ return $self->debug
Branch: 1 branch
BranchTrueFalseTotal
$self->debug ? : 0 1 1
16 ? JSON->new->utf8->pretty(1)->encode($resp)
17 : encode_json($resp);
18 }
19  
20 0 ▶sub content_type { return 'application/json; charset=utf-8' }
Subroutine content_type: not called CC=1 SCAR=6.9
Pod documented
21  
22 2 1;
23  
24 __END__
« OpenSearch/Response/Tiny.pm ↑ Summary OpenSearch/Facets.pm »