blib/lib/Test2/Event/Encoding.pm

filter: Statementstmt 100% 24 / 24 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 66.6% 2 / 3 totaltotal 97.3% 36 / 37 CC 2 SCAR 2.0
CC
2
Cov
100%
init
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« blib/lib/Test2/Event/Diag.pm ↑ Summary blib/lib/Test2/Event/TAP/Version.pm »
1 package Test2::Event::Encoding;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 our $VERSION = '1.302226';
6  
7 1 ▶use Carp qw/croak/;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 ▶BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use Test2::Util::HashBase qw/encoding/;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 2 ▶sub init {
Subroutine init: called CC=2 SCAR=6.9
Pod undocumented
13 2 my $self = shift;
14 2 ▶ defined $self->{+ENCODING} or croak "'encoding' is a required attribute";
Branch: 1 branch
BranchTrueFalseTotal
defined $self->{"encoding"} or croak("'encoding' is a required attribute") 1 1 2
15 }
16  
17 2 ▶sub summary { 'Encoding set to ' . $_[0]->{+ENCODING} }
Subroutine summary: called CC=1 SCAR=0.0
Pod documented
18  
19 1 ▶sub facet_data {
Subroutine facet_data: called CC=1 SCAR=0.0
Pod documented
20 1 my $self = shift;
21 1 my $out = $self->common_facet_data;
22 1 $out->{control}->{encoding} = $self->{+ENCODING};
23 1 $out->{about}->{details} = $self->summary;
24 1 return $out;
25 }
26  
27  
28 1 1;
29  
30 __END__
« blib/lib/Test2/Event/Diag.pm ↑ Summary blib/lib/Test2/Event/TAP/Version.pm »