8 @ISA = qw( HTML::Parser );
12 use vars qw($VERSION $BRANCH);
13 $VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
14 $BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0));
15 $main::build += $VERSION;
16 $main::branch += $BRANCH;
21 my $self = SUPER::new $pkg;
23 $self->{state} = 'pre';
24 $self->{sort} = undef;
26 $self->{call} = uc shift;
32 my ($self, $tag, $attr, $attrseq, $origtext) = @_;
34 print "$self->{state} $tag";
36 my $dd = new Data::Dumper([$attr], [qw(attr)]);
40 print " ", $dd->Dumpxs;
45 if ($self->{state} eq 't1') {
47 } elsif ($self->{state} eq 't1r') {
49 } elsif ($self->{state} eq 't2') {
51 } elsif ($self->{state} eq 't2r') {
59 my ($self, $text) = @_;
60 $text =~ s/^[\s\r\n]+//g;
61 $text =~ s/[\s\r\n]+$//g;
62 print "$self->{state} text $text\n" if $self->{debug};
64 if ($self->{state} eq 'pre' && $text =~ /$self->{call}/i ) {
68 } elsif ($self->{state} eq 't1d1') {
69 $self->{dxcall} = $text;
71 } elsif ($self->{state} eq 't1d2') {
72 $self->{dxmgr} = $text;
74 } elsif ($self->{state} eq 't1d3') {
75 $self->{dxdate} = amdate($text);
77 } elsif ($self->{state} eq 't1d4') {
78 push @{$self->{list}}, "$self->{dxcall}|mgr|$self->{dxmgr}|$self->{dxdate}|$text";
80 } elsif ($self->{state} eq 't2d1') {
81 $self->{dxcall} = $text;
83 } elsif ($self->{state} eq 't2d2') {
84 $self->{dxaddr} = $text;
86 } elsif ($self->{state} eq 't2d3') {
87 $self->{dxdate} = amdate($text);
89 } elsif ($self->{state} eq 't2d4') {
90 push @{$self->{list}}, "$self->{dxcall}|addr|$self->{dxaddr}|$self->{dxdate}|$text";
92 } elsif ($self->{state} eq 't2' && $text =~ /did\s+not\s+return/i) {
100 my ($self, $tag, $origtext) = @_;
101 print "$self->{state} /$tag\n" if $self->{debug};
102 if ($self->{state} =~ /^t1/ && $tag eq 'table') {
104 } elsif ($self->{state} =~ /^t2/ && $tag eq 'table') {
105 $self->state('last');
112 my ($m, $d, $y) = split m{/}, $text;
114 $y += 100 if $y < 1990;
115 return sprintf "%02d-%s-%d", $d, (qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec))[$m-1], $y;
121 $self->{state} = shift if @_;
122 return $self->{state};
127 my ($self, $val) = @_;
128 $self->{debug} = $val;
134 return @{$self->{list}};