8 @ISA = qw( HTML::Parser );
15 my $self = SUPER::new $pkg;
17 $self->{state} = 'pre';
18 $self->{sort} = undef;
20 $self->{call} = uc shift;
26 my ($self, $tag, $attr, $attrseq, $origtext) = @_;
28 print "$self->{state} $tag";
30 my $dd = new Data::Dumper([$attr], [qw(attr)]);
34 print " ", $dd->Dumpxs;
39 if ($self->{state} eq 't1') {
41 } elsif ($self->{state} eq 't1r') {
43 } elsif ($self->{state} eq 't2') {
45 } elsif ($self->{state} eq 't2r') {
53 my ($self, $text) = @_;
54 $text =~ s/^[\s\r\n]+//g;
55 $text =~ s/[\s\r\n]+$//g;
56 print "$self->{state} text $text\n" if $self->{debug};
58 if ($self->{state} eq 'pre' && $text =~ /$self->{call}/i ) {
62 } elsif ($self->{state} eq 't1d1') {
63 $self->{dxcall} = $text;
65 } elsif ($self->{state} eq 't1d2') {
66 $self->{dxmgr} = $text;
68 } elsif ($self->{state} eq 't1d3') {
69 $self->{dxdate} = amdate($text);
71 } elsif ($self->{state} eq 't1d4') {
72 push @{$self->{list}}, "$self->{dxcall}|mgr|$self->{dxmgr}|$self->{dxdate}|$text";
74 } elsif ($self->{state} eq 't2d1') {
75 $self->{dxcall} = $text;
77 } elsif ($self->{state} eq 't2d2') {
78 $self->{dxaddr} = $text;
80 } elsif ($self->{state} eq 't2d3') {
81 $self->{dxdate} = amdate($text);
83 } elsif ($self->{state} eq 't2d4') {
84 push @{$self->{list}}, "$self->{dxcall}|addr|$self->{dxaddr}|$self->{dxdate}|$text";
86 } elsif ($self->{state} eq 't2' && $text =~ /did\s+not\s+return/i) {
94 my ($self, $tag, $origtext) = @_;
95 print "$self->{state} /$tag\n" if $self->{debug};
96 if ($self->{state} =~ /^t1/ && $tag eq 'table') {
98 } elsif ($self->{state} =~ /^t2/ && $tag eq 'table') {
106 my ($m, $d, $y) = split m{/}, $text;
108 $y += 100 if $y < 1990;
109 return sprintf "%02d-%s-%d", $d, (qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec))[$m-1], $y;
115 $self->{state} = shift if @_;
116 return $self->{state};
121 my ($self, $val) = @_;
122 $self->{debug} = $val;
128 return @{$self->{list}};