2 use Test::More tests => 3;
6 my $p = HTML::Parser->new(default_h => [sub { $text .= shift }, "text"],
11 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
12 "http://www.w3.org/TR/html40/strict.dtd">
16 <?process instruction>
20 $p->parse($html)->eof;
25 $p->handler(start => sub { }, "");
26 $p->handler(declaration => sub { }, "");
27 $p->parse($html)->eof;
31 $html2 =~ s/<title>//;
32 $html2 =~ s/<!DOCTYPE[^>]*>//;
37 $p->handler(start => undef);
38 $p->parse($html)->eof;
41 $html2 =~ s/<!DOCTYPE[^>]*>//;