line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id$ |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package XML::SAX::PurePerl::DebugHandler; |
4
|
|
|
|
|
|
|
|
5
|
7
|
|
|
7
|
|
4975
|
use strict; |
|
7
|
|
|
|
|
16
|
|
|
7
|
|
|
|
|
7176
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub new { |
8
|
6
|
|
|
6
|
0
|
106
|
my $class = shift; |
9
|
6
|
|
|
|
|
20
|
my %opts = @_; |
10
|
6
|
|
|
|
|
32
|
return bless \%opts, $class; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# DocumentHandler |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub set_document_locator { |
16
|
12
|
|
|
12
|
0
|
274
|
my $self = shift; |
17
|
12
|
50
|
|
|
|
342
|
print "set_document_locator\n" if $ENV{DEBUG_XML}; |
18
|
12
|
|
|
|
|
58
|
$self->{seen}{set_document_locator}++; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub start_document { |
22
|
12
|
|
|
12
|
0
|
208
|
my $self = shift; |
23
|
12
|
50
|
|
|
|
45
|
print "start_document\n" if $ENV{DEBUG_XML}; |
24
|
12
|
|
|
|
|
50
|
$self->{seen}{start_document}++; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub end_document { |
28
|
9
|
|
|
9
|
0
|
181
|
my $self = shift; |
29
|
9
|
50
|
|
|
|
36
|
print "end_document\n" if $ENV{DEBUG_XML}; |
30
|
9
|
|
|
|
|
469
|
$self->{seen}{end_document}++; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub start_element { |
34
|
445
|
|
|
445
|
0
|
5590
|
my $self = shift; |
35
|
445
|
50
|
|
|
|
1706
|
print "start_element\n" if $ENV{DEBUG_XML}; |
36
|
445
|
|
|
|
|
1714
|
$self->{seen}{start_element}++; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub end_element { |
40
|
445
|
|
|
445
|
0
|
4481
|
my $self = shift; |
41
|
445
|
50
|
|
|
|
1249
|
print "end_element\n" if $ENV{DEBUG_XML}; |
42
|
445
|
|
|
|
|
3448
|
$self->{seen}{end_element}++; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub characters { |
46
|
994
|
|
|
994
|
0
|
8731
|
my $self = shift; |
47
|
994
|
50
|
|
|
|
3354
|
print "characters\n" if $ENV{DEBUG_XML}; |
48
|
|
|
|
|
|
|
# warn "Char: ", $_[0]->{Data}, "\n"; |
49
|
994
|
|
|
|
|
9114
|
$self->{seen}{characters}++; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub processing_instruction { |
53
|
4
|
|
|
4
|
0
|
90
|
my $self = shift; |
54
|
4
|
50
|
|
|
|
14
|
print "processing_instruction\n" if $ENV{DEBUG_XML}; |
55
|
4
|
|
|
|
|
16
|
$self->{seen}{processing_instruction}++; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub ignorable_whitespace { |
59
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
60
|
0
|
0
|
|
|
|
0
|
print "ignorable_whitespace\n" if $ENV{DEBUG_XML}; |
61
|
0
|
|
|
|
|
0
|
$self->{seen}{ignorable_whitespace}++; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
# LexHandler |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub comment { |
67
|
15
|
|
|
15
|
0
|
223
|
my $self = shift; |
68
|
15
|
50
|
|
|
|
49
|
print "comment\n" if $ENV{DEBUG_XML}; |
69
|
15
|
|
|
|
|
59
|
$self->{seen}{comment}++; |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
# DTDHandler |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
sub notation_decl { |
75
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
76
|
0
|
0
|
|
|
|
|
print "notation_decl\n" if $ENV{DEBUG_XML}; |
77
|
0
|
|
|
|
|
|
$self->{seen}{notation_decl}++; |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
sub unparsed_entity_decl { |
81
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
82
|
0
|
0
|
|
|
|
|
print "unparsed_entity_decl\n" if $ENV{DEBUG_XML}; |
83
|
0
|
|
|
|
|
|
$self->{seen}{entity_decl}++; |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
# EntityResolver |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
sub resolve_entity { |
89
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
90
|
0
|
0
|
|
|
|
|
print "resolve_entity\n" if $ENV{DEBUG_XML}; |
91
|
0
|
|
|
|
|
|
$self->{seen}{resolve_entity}++; |
92
|
0
|
|
|
|
|
|
return ''; |
93
|
|
|
|
|
|
|
} |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
1; |