XSS/Role/StyleAttribute.pm

filter: Statementstmt 100% 16 / 16 Branchbran n/a Conditioncond 44.4% 4 / 9 MC/DCmcdc 0.0% 0 / 5 Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 70.5% 24 / 34 CC 5 SCAR 14.1
CC
5
Cov
80%
__ANON__
5.9
BEGIN
1.0
BEGIN
1.0
CRAP 4.1
« XSS/Text.pm ↑ Summary XSS.pm »
1 package XML::XSS::Role::StyleAttribute;
2 20 our $AUTHORITY = 'cpan:YANICK';
3 # ABSTRACT: Trait of style attributes
4 20 $XML::XSS::Role::StyleAttribute::VERSION = '0.3.5';
5 20 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 20 ▶use XML::XSS::StyleAttribute;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 450 ▶before '_process_options' => sub {
Subroutine __ANON__: called CC=5 SCAR=17.8
9 450 my ( $class, $name, $options ) = @_;
10  
11 450 ▶ $options->{is} ||= 'ro';
Condition50%1/2
$options->{"is"} ||= "ro"
l!l
0450
MC/DC0%0/1
$options->{"is"} ||= "ro"
$options->{"is"}
Truth table50%1/2
A
A= $options->{"is"}
Aresult
11
00
12 450 ▶ $options->{isa} ||= 'XML::XSS::StyleAttribute';
Condition50%1/2
$options->{"isa"} ||= "XML::XSS::StyleAttribute"
l!l
0450
MC/DC0%0/1
$options->{"isa"} ||= "XML::XSS::StyleAttribute"
$options->{"isa"}
Truth table50%1/2
A
A= $options->{"isa"}
Aresult
11
00
13 1656 ▶ $options->{default} ||= sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
14 1656 return XML::XSS::StyleAttribute->new;
15 450 ▶ };
Condition33%1/3
$options->{"default"} ||= sub { return "XML::XSS::StyleAttribute"->new; }
l!l&&r!l&&!r
04500
MC/DC0%0/2
$options->{"default"} ||= sub { return "XML::XSS::StyleAttribute"->new; }
$options->{"default"} sub { return "XML::XSS::StyleAttribute"->new; }
Truth table33%1/3
A ||= B
A= $options->{"default"}B= sub { return "XML::XSS::StyleAttribute"->new; }
ABresult
1X1
011
000
16  
17 $options->{handles} ||= {
18 450 ▶ "set_$name" => 'set_value',
Condition50%1/2
$options->{"handles"} ||= {"set_$name", "set_value", "clear_$name", "clear_value", "has_$name", "has_value"}
l!l
0450
MC/DC0%0/1
$options->{"handles"} ||= {"set_$name", "set_value", "clear_$name", "clear_value", "has_$name", "has_value"}
$options->{"handles"}
Truth table50%1/2
A
A= $options->{"handles"}
Aresult
11
00
19 "clear_$name" => 'clear_value',
20 "has_$name" => 'has_value',
21 };
22 20 };
23  
24 20 1;
25  
26 __END__
« XSS/Text.pm ↑ Summary XSS.pm »