line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package XML::ASX; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
644
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
45
|
|
4
|
1
|
|
|
1
|
|
8
|
use vars qw($VERSION $AUTOLOAD %ASX_SLOTS); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
73
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
604
|
use XML::ASX::File; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
39
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
6
|
use overload '""' => \&xml; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
9
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
$VERSION = '0.01'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
%ASX_SLOTS = ( |
13
|
|
|
|
|
|
|
); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub new { |
16
|
1
|
|
|
1
|
0
|
37
|
my $class = shift; |
17
|
1
|
|
|
|
|
10
|
return XML::ASX::File->new(@_); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub add_param { |
21
|
1
|
|
|
1
|
0
|
27
|
my($self,$key,$value) = @_; |
22
|
1
|
|
|
|
|
3
|
$self->{param}->{$key} = $value; |
23
|
1
|
|
|
|
|
3
|
return $self->{param}->{$key}; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub each_param { |
27
|
1
|
|
|
1
|
0
|
1
|
my $self = shift; |
28
|
1
|
50
|
|
|
|
5
|
return $self->{param} ? %{$self->{param}} : (); |
|
0
|
|
|
|
|
0
|
|
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub each_in_queue { |
32
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
33
|
0
|
0
|
|
|
|
0
|
return $self->{queue} ? @{$self->{queue}} : (); |
|
0
|
|
|
|
|
0
|
|
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub entag { |
37
|
2
|
|
|
2
|
0
|
4
|
my $self = shift; |
38
|
2
|
|
|
|
|
2
|
my $tag = shift; |
39
|
2
|
|
|
|
|
3
|
my $content = shift; |
40
|
2
|
|
|
|
|
2
|
my $attr = shift; |
41
|
2
|
|
|
|
|
4
|
my $closed = shift; |
42
|
|
|
|
|
|
|
|
43
|
2
|
|
|
|
|
3
|
my $output = ''; |
44
|
2
|
|
|
|
|
3
|
$output .= "<$tag"; |
45
|
|
|
|
|
|
|
|
46
|
2
|
50
|
|
|
|
5
|
if($attr){ |
47
|
2
|
|
|
|
|
4
|
foreach(keys %$attr){ |
48
|
2
|
|
|
|
|
7
|
$output .= ' ' . $_ . '="' . $attr->{$_} . '"'; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
2
|
100
|
50
|
|
|
8
|
$output .= "/>\n" and return $output if $closed; |
53
|
|
|
|
|
|
|
|
54
|
1
|
|
|
|
|
3
|
$output .= ">$content$tag>\n"; |
55
|
|
|
|
|
|
|
|
56
|
1
|
|
|
|
|
5
|
return $output; |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
1; |
60
|
|
|
|
|
|
|
__END__ |