| 1 | package Set::CSS; | ||||||||||||||||||||||||||||
| 2 | 2 | $Set::CSS::VERSION = '0.0.1'; | |||||||||||||||||||||||||||
| 3 | 2 | ▶ | use 5.014; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 2 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 2 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 2 | ▶ | use parent 'Set::Object'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | sub html_attrs | ||||||||||||||||||||||||||||
| 10 | { | ||||||||||||||||||||||||||||
| 11 | 6 | ▶ | my ( $self, $args ) = @_; | ||||||||||||||||||||||||||
|
Subroutine
html_attrs: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | 6 | ▶ | if ( $args->{on_empty} or !( $self->is_null ) ) | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$args->{"on_empty"} or not $self->is_null
MC/DC100%2/2
$args->{"on_empty"} or not $self->is_null
$args->{"on_empty"}
not $self->is_null
Truth table100%3/3
A or not(B)
A= $args->{"on_empty"}B= not $self->is_null
| |||||||||||||||||||||||||||||
| 14 | { | ||||||||||||||||||||||||||||
| 15 | 4 | return { class => join( " ", @$self ) }; | |||||||||||||||||||||||||||
| 16 | } | ||||||||||||||||||||||||||||
| 17 | 2 | return +{}; | |||||||||||||||||||||||||||
| 18 | } | ||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | 2 | ▶ | use HTML::Widgets::NavMenu::EscapeHtml qw/ escape_html /; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | sub as_html | ||||||||||||||||||||||||||||
| 23 | { | ||||||||||||||||||||||||||||
| 24 | 3 | ▶ | my ( $self, $args ) = @_; | ||||||||||||||||||||||||||
|
Subroutine
as_html: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||
| 26 | 3 | my $att = $self->html_attrs($args); | |||||||||||||||||||||||||||
| 27 | 3 | my $ret = ""; | |||||||||||||||||||||||||||
| 28 | 3 | foreach my $k ( sort keys %$att ) | |||||||||||||||||||||||||||
| 29 | { | ||||||||||||||||||||||||||||
| 30 | 2 | $ret .= qq# $k="# . escape_html( $att->{$k} ) . qq#"#; | |||||||||||||||||||||||||||
| 31 | } | ||||||||||||||||||||||||||||
| 32 | 3 | return $ret; | |||||||||||||||||||||||||||
| 33 | } | ||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | 2 | 1; | |||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||
| 37 | __END__ | ||||||||||||||||||||||||||||