| 1 | package XML::ASX; | ||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||
| 4 | 1 | ▶ | use vars qw($VERSION $AUTOLOAD %ASX_SLOTS); | ||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||||
| 6 | 1 | ▶ | use XML::ASX::File; | ||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||
| 8 | 1 | ▶ | use overload '""' => \&xml; | ||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||||
| 10 | 1 | $VERSION = '0.01'; | |||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||
| 12 | 1 | %ASX_SLOTS = ( | |||||||||||||||||||||||||||||
| 13 | ); | ||||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||||
| 15 | 1 | ▶ | sub new { | ||||||||||||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||
| 16 | 1 | my $class = shift; | |||||||||||||||||||||||||||||
| 17 | 1 | return XML::ASX::File->new(@_); | |||||||||||||||||||||||||||||
| 18 | } | ||||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||||
| 20 | 3 | ▶ | sub add_param { | ||||||||||||||||||||||||||||
|
Subroutine
add_param: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||
| 21 | 3 | my($self,$key,$value) = @_; | |||||||||||||||||||||||||||||
| 22 | 3 | $self->{param}->{$key} = $value; | |||||||||||||||||||||||||||||
| 23 | 3 | return $self->{param}->{$key}; | |||||||||||||||||||||||||||||
| 24 | } | ||||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||||
| 26 | 1 | ▶ | sub each_param { | ||||||||||||||||||||||||||||
|
Subroutine
each_param: called CC=2 SCAR=8.1
Pod
undocumented
| |||||||||||||||||||||||||||||||
| 27 | 1 | my $self = shift; | |||||||||||||||||||||||||||||
| 28 | 0 | ▶ | return $self->{param} ? %{$self->{param}} : (); | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 29 | } | ||||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||||
| 31 | 0 | ▶ | sub each_in_queue { | ||||||||||||||||||||||||||||
|
Subroutine
each_in_queue: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||||
| 32 | 0 | my $self = shift; | |||||||||||||||||||||||||||||
| 33 | 0 | ▶ | return $self->{queue} ? @{$self->{queue}} : (); | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 34 | } | ||||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||||
| 36 | 6 | ▶ | sub entag { | ||||||||||||||||||||||||||||
|
Subroutine
entag: called CC=5 SCAR=16.1
Pod
undocumented
| |||||||||||||||||||||||||||||||
| 37 | 6 | my $self = shift; | |||||||||||||||||||||||||||||
| 38 | 6 | my $tag = shift; | |||||||||||||||||||||||||||||
| 39 | 6 | my $content = shift; | |||||||||||||||||||||||||||||
| 40 | 6 | my $attr = shift; | |||||||||||||||||||||||||||||
| 41 | 6 | my $closed = shift; | |||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||||
| 43 | 6 | my $output = ''; | |||||||||||||||||||||||||||||
| 44 | 6 | $output .= "<$tag"; | |||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||||
| 46 | 6 | ▶ | if($attr){ | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 47 | 5 | foreach(keys %$attr){ | |||||||||||||||||||||||||||||
| 48 | 7 | $output .= ' ' . $_ . '="' . $attr->{$_} . '"'; | |||||||||||||||||||||||||||||
| 49 | } | ||||||||||||||||||||||||||||||
| 50 | } | ||||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||||
| 52 | 6 | ▶ | $output .= "/>\n" and return $output if $closed; | ||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition75%3/4
$closed && (($output .= "/>\n") && (return $output))
$output .= "/>\n" and return $output
MC/DC0%0/2
$closed && (($output .= "/>\n") && (return $output))
$closed
$output .= "/>\n"
Truth table33%1/3
A && B
A= $closedB= $output .= "/>\n"
| |||||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||||
| 54 | 3 | $output .= ">$content</$tag>\n"; | |||||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||||
| 56 | 3 | return $output; | |||||||||||||||||||||||||||||
| 57 | } | ||||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||||
| 59 | 1 | 1; | |||||||||||||||||||||||||||||
| 60 | __END__ | ||||||||||||||||||||||||||||||