lib/IRC/Indexer/Output/JSON.pm

filter: Statementstmt 83.3% 15 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 100% 2 / 2 totaltotal 84.0% 21 / 25 CC 1 SCAR 1.8
CC
1
Cov
83%
write
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« lib/IRC/Indexer/Output/YAML.pm ↑ Summary script/ircindexer-server-json »
1 package IRC::Indexer::Output::JSON;
2  
3 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 4 ▶use JSON::XS;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 4 require IRC::Indexer::Output;
8 4 our @ISA = qw/IRC::Indexer::Output/;
9  
10 2 ▶sub dump {
Subroutine dump: called CC=1 SCAR=0.0
Pod documented
11 2 my ($self) = @_;
12 $self->{Output} = JSON::XS->new->utf8(1)->indent->encode(
13 $self->{Input}
14 2 );
15 2 $self->SUPER::dump();
16 }
17  
18 0 ▶sub write {
Subroutine write: not called CC=1 SCAR=6.9
Pod documented
19 0 my ($self, $path) = @_;
20
21 $self->{Output} = JSON::XS->new->utf8(1)->indent->encode(
22 $self->{Input}
23 0 ) . "\n" ;
24  
25 0 $self->SUPER::write($path);
26 }
27  
28 4 1;
29 __END__
« lib/IRC/Indexer/Output/YAML.pm ↑ Summary script/ircindexer-server-json »