| 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"
MC/DC0%0/1
$options->{"is"} ||= "ro"
$options->{"is"}
Truth table50%1/2
A
A= $options->{"is"}
| |||||||||||||||||||||
| 12 | 450 | ▶ | $options->{isa} ||= 'XML::XSS::StyleAttribute'; | ||||||||||||||||||
|
Condition50%1/2
$options->{"isa"} ||= "XML::XSS::StyleAttribute"
MC/DC0%0/1
$options->{"isa"} ||= "XML::XSS::StyleAttribute"
$options->{"isa"}
Truth table50%1/2
A
A= $options->{"isa"}
| |||||||||||||||||||||
| 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;
}
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;
}
| |||||||||||||||||||||
| 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"}
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"}
| |||||||||||||||||||||
| 19 | "clear_$name" => 'clear_value', | ||||||||||||||||||||
| 20 | "has_$name" => 'has_value', | ||||||||||||||||||||
| 21 | }; | ||||||||||||||||||||
| 22 | 20 | }; | |||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | 20 | 1; | |||||||||||||||||||
| 25 | |||||||||||||||||||||
| 26 | __END__ | ||||||||||||||||||||