| 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 ||= {}
MC/DC0%0/1
$args ||= {}
$args
Truth table50%1/2
A
A= $args
| |||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | 3 | ▶ | return if $self->has_process and !$self->_render( 'process', $node, | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$self->has_process and not $self->_render("process", $node, $args)
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)
| |||||||||||||||||||||||||||||
| 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__ | ||||||||||||||||||||||||||||