blib/lib/XML/XSS/Role/StyleAttribute.pm

filter: Statementstmt 100% 17 / 17 Branchbran n/a Conditioncond 44.4% 4 / 9 MC/DCmcdc 0.0% 0 / 5 Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 72.2% 26 / 36 CC 5 SCAR 13.2
CC
5
Cov
81%
__ANON__
5.9
BEGIN
1.0
BEGIN
1.0
CRAP 3.7
« blib/lib/XML/XSS/Text.pm ↑ Summary blib/lib/XML/XSS.pm »
1 package XML::XSS::Role::StyleAttribute;
2 BEGIN {
3 20 ▶ $XML::XSS::Role::StyleAttribute::AUTHORITY = 'cpan:YANICK';
Subroutine BEGIN: called CC=1 SCAR=0.0
4 }
5 {
6 20 $XML::XSS::Role::StyleAttribute::VERSION = '0.3.4';
7 }
8 # ABSTRACT: Trait of style attributes
9  
10 20 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 20 ▶use XML::XSS::StyleAttribute;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 before '_process_options' => sub {
14 450 ▶ my ( $class, $name, $options ) = @_;
Subroutine __ANON__: called CC=5 SCAR=17.8
15  
16 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
17 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
18 $options->{default} ||= sub {
19 1656 ▶ return XML::XSS::StyleAttribute->new;
Subroutine __ANON__: called CC=1 SCAR=0.0
20 450 ▶ };
Condition33%1/3
$options->{"default"} ||= sub {
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
21  
22 $options->{handles} ||= {
23 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
24 "clear_$name" => 'clear_value',
25 "has_$name" => 'has_value',
26 };
27 20 };
28  
29 20 1;
30  
31 __END__
32  
33 =pod
34  
35 =head1 NAME
36  
37 XML::XSS::Role::StyleAttribute - Trait of style attributes
38  
39 =head1 VERSION
40  
41 version 0.3.4
42  
43 =head1 AUTHOR
44  
45 Yanick Champoux <yanick@cpan.org>
46  
47 =head1 COPYRIGHT AND LICENSE
48  
49 This software is copyright (c) 2013 by Yanick Champoux.
50  
51 This is free software; you can redistribute it and/or modify it under
52 the same terms as the Perl 5 programming language system itself.
53  
54 =cut
« blib/lib/XML/XSS/Text.pm ↑ Summary blib/lib/XML/XSS.pm »