blib/lib/XML/XSS/ProcessingInstruction.pm

filter: Statementstmt 100% 28 / 28 Branchbran 50.0% 1 / 2 Conditioncond 40.0% 2 / 5 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 100% 7 / 7 Podpod n/a totaltotal 84.4% 38 / 45 CC 4 SCAR 8.4
CC
4
Cov
89%
apply
4.3
BEGIN
1.0
BEGIN
1.0
CRAP 2.3
« blib/lib/XML/XSS/Document.pm ↑ Summary blib/lib/XML/XSS/StyleAttribute.pm »
1 package XML::XSS::ProcessingInstruction;
2 BEGIN {
3 15 ▶ $XML::XSS::ProcessingInstruction::AUTHORITY = 'cpan:YANICK';
Subroutine BEGIN: called CC=1 SCAR=0.0
4 }
5 {
6 15 $XML::XSS::ProcessingInstruction::VERSION = '0.3.4';
7 }
8 # ABSTRACT: XML::XSS processing instruction stylesheet rule
9  
10 15 ▶use 5.10.0;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 15 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 15 ▶use MooseX::SemiAffordanceAccessor;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 15 ▶use MooseX::Clone;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 15 with 'XML::XSS::Role::Renderer', 'MooseX::Clone';
17  
18 15 has [ qw/ pre post process / ] =>(
19 traits => [ qw/ XML::XSS::Role::StyleAttribute Clone / ]
20 );
21  
22 15 ▶no warnings qw/ uninitialized /;
Subroutine BEGIN: called CC=1 SCAR=0.0
23  
24 sub apply {
25 3 ▶ my ( $self, $node, $args ) = @_;
Subroutine apply: called CC=4 SCAR=14.6
26 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
27  
28 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
29 $args);
30  
31 3 my $output;
32 3 $output .= $self->_render( 'pre', $node, $args );
33 3 $output .= $node->toString;
34 3 $output .= $self->_render( 'post', $node, $args );
35  
36 3 return $output;
37 }
38  
39 15 1;
40  
41 __END__
42  
43 =pod
44  
45 =head1 NAME
46  
47 XML::XSS::ProcessingInstruction - XML::XSS processing instruction stylesheet rule
48  
49 =head1 VERSION
50  
51 version 0.3.4
52  
53 =head1 AUTHOR
54  
55 Yanick Champoux <yanick@cpan.org>
56  
57 =head1 COPYRIGHT AND LICENSE
58  
59 This software is copyright (c) 2013 by Yanick Champoux.
60  
61 This is free software; you can redistribute it and/or modify it under
62 the same terms as the Perl 5 programming language system itself.
63  
64 =cut
« blib/lib/XML/XSS/Document.pm ↑ Summary blib/lib/XML/XSS/StyleAttribute.pm »