Skip to content

Commit 32851f1

Browse files
committed
Improve HeadParser performance.
This was done by reducing callbacks and argspecs to things we actually process.
1 parent 7a85e26 commit 32851f1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/HTML/HeadParser.pm

+4-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,10 @@ sub new
111111
$header = HTTP::Headers->new;
112112
}
113113

114-
my $self = $class->SUPER::new(api_version => 2,
114+
my $self = $class->SUPER::new(api_version => 3,
115+
start_h => ["start", "self,tagname,attr"],
116+
end_h => ["end", "self,tagname"],
117+
text_h => ["text", "self,text"],
115118
ignore_elements => [qw(script style)],
116119
);
117120
$self->{'header'} = $header;

0 commit comments

Comments
 (0)