summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-04-30 23:24:06 +0000
committerKarl Berry <karl@freefriends.org>2008-04-30 23:24:06 +0000
commit312f2f251372a755d21756eb6c82204d0e177aed (patch)
tree479c8bb7c9e2cebcc5051d00987cf1a1e3d99a99 /Master
parent5eda3aa4d5c3b3ff4c54e011873f2635644cd4f4 (diff)
(from_fh): omit $ anchors, maybe tiny bit faster?
git-svn-id: svn://tug.org/texlive/trunk@7757 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/tlpkg/TeXLive/TLPOBJ.pm30
1 files changed, 15 insertions, 15 deletions
diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm
index 67d4f8b9789..01802aa1964 100644
--- a/Master/tlpkg/TeXLive/TLPOBJ.pm
+++ b/Master/tlpkg/TeXLive/TLPOBJ.pm
@@ -65,8 +65,8 @@ sub from_fh {
#while (my $line = $fh->getline) {
while (my $line = <$fh>) {
chomp($line);
- # we call tllog only in case that something will be called at all
- # to speed things up
+ # we call tllog only when something will be logged, to speed things up.
+ # this is the inner loop bounding the time to read tlpdb.
if ($::LOGLEVELTERMINAL >= $::LOG_DDDEBUG ||
$::LOGLEVELFILE >= $::LOG_DDDEBUG) {
tllog($::LOG_DDDEBUG, "reading line: >>>$line<<<\n");
@@ -88,13 +88,13 @@ sub from_fh {
($lastcmd eq "docfiles") ||
($lastcmd eq "srcfiles") ||
($lastcmd eq "executes") ||
- ($lastcmd eq "depend") ) {
+ ($lastcmd eq "depend") ) {
$line =~ s/^ /${lastcmd}continued /;
} else {
die("Continuation of $lastcmd not allowed, please fix tlpobj: line = $line!\n");
}
}
- if ($line =~ /^name\s*([-.\w]+)$/o) {
+ if ($line =~ /^name\s*([-.\w]+)/o) {
$name = "$1";
$lastcmd = "name";
$self->name("$name");
@@ -102,10 +102,10 @@ sub from_fh {
$started = 1;
} else {
$started || die("First directive needs to be 'name', not $line");
- if ($line =~ /^(src|run)filescontinued\s+(.*)$/o) {
+ if ($line =~ /^(src|run)filescontinued\s+(.*)/o) {
push @{$self->{$1."files"}}, "$2";
next;
- } elsif ($line =~ /^docfilescontinued\s+(.*)$/o) {
+ } elsif ($line =~ /^docfilescontinued\s+(.*)/o) {
# docfiles can have tags
my @words = &TeXLive::TLUtils::quotewords('\s+', 0, "$1");
# the first entry is the file
@@ -122,7 +122,7 @@ sub from_fh {
}
}
next;
- } elsif ($line =~ /^binfilescontinued\s+(.*)$/o) {
+ } elsif ($line =~ /^binfilescontinued\s+(.*)/o) {
push @{$self->{'binfiles'}{$arch}}, "$1";
next;
} elsif ($line =~ /^binfiles\s+/o) {
@@ -144,7 +144,7 @@ sub from_fh {
}
$lastcmd = "binfiles";
next;
- } elsif ($line =~ /^longdesc\s+(.*)$/o) {
+ } elsif ($line =~ /^longdesc\s+(.*)/o) {
if (defined($self->{'longdesc'})) {
$self->{'longdesc'} .= " $1";
} else {
@@ -152,15 +152,15 @@ sub from_fh {
}
$lastcmd = "longdesc";
next;
- } elsif ($line =~ /^category\s+$CategoriesRegexp$/o) {
+ } elsif ($line =~ /^category\s+$CategoriesRegexp/o) {
$self->{'category'} = "$1";
$lastcmd = "category";
next;
- } elsif ($line =~ /^revision\s+(.*)$/o) {
+ } elsif ($line =~ /^revision\s+(.*)/o) {
$self->{'revision'} = "$1";
$lastcmd = "revision";
next;
- } elsif ($line =~ /^catalogue\s+(.*)$/o) {
+ } elsif ($line =~ /^catalogue\s+(.*)/o) {
$self->catalogue("$1");
$lastcmd = "catalogue";
next;
@@ -181,17 +181,17 @@ sub from_fh {
$self->{"${type}size"} = $size;
}
next;
- } elsif ($line =~ /^execute(continued)?\s*(.*)$/o) {
+ } elsif ($line =~ /^execute(continued)?\s*(.*)/o) {
push @{$self->{'executes'}}, "$2" unless "$2" eq "";
$lastcmd = "execute";
next;
- } elsif ($line =~ /^depend(continued)?\s*(.*)$/o) {
+ } elsif ($line =~ /^depend(continued)?\s*(.*)/o) {
push @{$self->{'depends'}}, "$2" unless "$2" eq "";
$lastcmd = "depend";
next;
- } elsif ($line =~ /^catalogue-([^\s]+)\s+(.*)$/o) {
+ } elsif ($line =~ /^catalogue-([^\s]+)\s+(.*)/o) {
$self->{'cataloguedata'}{$1} = "$2";
- } elsif ($line =~ /^shortdesc\s+(.*)$/o) {
+ } elsif ($line =~ /^shortdesc\s+(.*)/o) {
$self->{'shortdesc'} .= "$1";
$lastcmd = "shortdesc";
next;