XSS/ProcessingInstruction.pm

filter: Statementstmt 100% 27 / 27 Branchbran 50.0% 1 / 2 Conditioncond 40.0% 2 / 5 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 83.7% 36 / 43 CC 4 SCAR 9.0
CC
4
Cov
88%
apply
4.3
BEGIN
1.0
BEGIN
1.0
CRAP 2.5
« XSS/Document.pm ↑ Summary XSS/StyleAttribute.pm »
1 package XML::XSS::ProcessingInstruction;
2 15 our $AUTHORITY = 'cpan:YANICK';
3 # ABSTRACT: XML::XSS processing instruction stylesheet rule
4 15 $XML::XSS::ProcessingInstruction::VERSION = '0.3.5';
5 15 ▶use 5.10.0;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 15 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 15 ▶use MooseX::SemiAffordanceAccessor;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 15 ▶use MooseX::Clone;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 15 with 'XML::XSS::Role::Renderer', 'MooseX::Clone';
12  
13 15 has [ qw/ pre post process / ] =>(
14 traits => [ qw/ XML::XSS::Role::StyleAttribute Clone / ]
15 );
16  
17 15 ▶no warnings qw/ uninitialized /;
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 3 ▶sub apply {
Subroutine apply: called CC=4 SCAR=14.6
20 3 my ( $self, $node, $args ) = @_;
21 3 ▶ $args ||= {};
Condition50%1/2
$args ||= {}
l!l
30
MC/DC0%0/1
$args ||= {}
$args
Truth table50%1/2
A
A= $args
Aresult
11
00
22  
23 3 ▶ return if $self->has_process and !$self->_render( 'process', $node,
Branch: 1 branch
BranchTrueFalseTotal
if $self->has_process and not $self->_render("process", $node, $args) 0 3 3
Condition33%1/3
$self->has_process and not $self->_render("process", $node, $args)
!ll&&!rl&&r
300
MC/DC0%0/2
$self->has_process and not $self->_render("process", $node, $args)
$self->has_process not $self->_render("process", $node, $args)
Truth table33%1/3
A and not(B)
A= $self->has_processB= not $self->_render("process", $node, $args)
ABresult
0X0
100
111
24 $args);
25  
26 3 my $output;
27 3 $output .= $self->_render( 'pre', $node, $args );
28 3 $output .= $node->toString;
29 3 $output .= $self->_render( 'post', $node, $args );
30  
31 3 return $output;
32 }
33  
34 15 1;
35  
36 __END__
« XSS/Document.pm ↑ Summary XSS/StyleAttribute.pm »