diff options
Diffstat (limited to 'Master/tlpkg/tlperl/lib/HTML/TokeParser.pm')
-rw-r--r-- | Master/tlpkg/tlperl/lib/HTML/TokeParser.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Master/tlpkg/tlperl/lib/HTML/TokeParser.pm b/Master/tlpkg/tlperl/lib/HTML/TokeParser.pm index 94128dbef75..959b96f6a26 100644 --- a/Master/tlpkg/tlperl/lib/HTML/TokeParser.pm +++ b/Master/tlpkg/tlperl/lib/HTML/TokeParser.pm @@ -2,7 +2,7 @@ package HTML::TokeParser; require HTML::PullParser; @ISA=qw(HTML::PullParser); -$VERSION = "3.57"; +$VERSION = "3.69"; use strict; use Carp (); @@ -27,17 +27,19 @@ sub new { my $class = shift; my %cnf; + if (@_ == 1) { my $type = (ref($_[0]) eq "SCALAR") ? "doc" : "file"; %cnf = ($type => $_[0]); } else { + unshift @_, (ref($_[0]) eq "SCALAR") ? "doc" : "file" if(scalar(@_) % 2 == 1); %cnf = @_; } my $textify = delete $cnf{textify} || {img => "alt", applet => "alt"}; - my $self = $class->SUPER::new(%cnf, %ARGS) || return undef; + my $self = $class->SUPER::new(%ARGS, %cnf) || return undef; $self->{textify} = $textify; $self; |