diff options
-rw-r--r-- | Master/tlpkg/TeXLive/TLPOBJ.pm | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm index 17dd6a408a2..381e4ae5e03 100644 --- a/Master/tlpkg/TeXLive/TLPOBJ.pm +++ b/Master/tlpkg/TeXLive/TLPOBJ.pm @@ -77,7 +77,7 @@ sub from_fh { chomp($line); # we call tllog only when something will be logged, to speed things up. # this is the inner loop bounding the time to read tlpdb. - ddebug("reading line: >>>$line<<<\n"); + ddebug("reading line: >>>$line<<<\n") if ($::opt_verbosity >= 2); $line =~ /^\s*#/ && next; # skip comment lines if ($line =~ /^\s*$/o) { if (!$started) { next; } @@ -113,10 +113,13 @@ sub from_fh { push @{$self->{$1."files"}}, "$2"; next; } elsif ($line =~ /^docfilescontinued\s+(.*)\s*/o) { - # docfiles can have tags - my @words = &TeXLive::TLUtils::quotewords('\s+', 0, "$1"); - # the first entry is the file - my $f = shift @words; + # docfiles can have tags, but the quotewords function is so + # time intense that we try to call it only when necessary + my ($f, $rest) = split(' ', "$1", 2); + my @words; + if (defined $rest) { + @words = &TeXLive::TLUtils::quotewords('\s+', 0, "$rest"); + } push @{$self->{'docfiles'}}, $f; while (@words) { $_ = shift @words; |