summaryrefslogtreecommitdiff
path: root/Master/tlpkg
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2007-12-03 07:41:06 +0000
committerNorbert Preining <preining@logic.at>2007-12-03 07:41:06 +0000
commit0a1600e4bb5b63886d088c2b1676894c9f589e73 (patch)
tree23a7d0b111ff50730b2267559e85155503771888 /Master/tlpkg
parent7ff83be1eee42c67d1a93a1935a883e28b7975db (diff)
fix for my stupidity ...
git-svn-id: svn://tug.org/texlive/trunk@5691 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rw-r--r--Master/tlpkg/TeXLive/TLPOBJ.pm18
1 files changed, 10 insertions, 8 deletions
diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm
index 8b78396796c..73a692151a1 100644
--- a/Master/tlpkg/TeXLive/TLPOBJ.pm
+++ b/Master/tlpkg/TeXLive/TLPOBJ.pm
@@ -10,7 +10,7 @@ use TeXLive::TLConfig qw($DefaultCategory $CategoriesRegexp $MetaCategoriesRegex
use TeXLive::TLUtils;
#use File::Path;
use TeXLive::TLTREE;
-use FileHandle; # format_name in writeout, no idea how to rewrite
+#use FileHandle; # format_name in writeout, no idea how to rewrite
#use File::Basename;
my $_tmp;
@@ -64,6 +64,7 @@ sub from_fh {
#while (my $line = $fh->getline) {
while (my $line = <$fh>) {
+ chomp($line);
&TeXLive::TLUtils::debug("reading line: >>>$line<<<");
$line =~ /^\s*#/ && next; # skip comment lines
if ($line =~ /^\s*$/) {
@@ -77,8 +78,7 @@ sub from_fh {
}
}
if ($line =~ /^ /) {
- if ( ($lastcmd eq "longdesc") ||
- ($lastcmd eq "runfiles") ||
+ if ( ($lastcmd eq "runfiles") ||
($lastcmd eq "binfiles") ||
($lastcmd eq "docfiles") ||
($lastcmd eq "srcfiles") ||
@@ -101,11 +101,11 @@ sub from_fh {
$self->{'shortdesc'} .= "$1";
$lastcmd = "shortdesc";
next;
- } elsif ($line =~ /^longdesc(continued)?\s+(.*)$/) {
- if (defined($1) && ("$1" eq "continued")) {
- $self->{'longdesc'} .= " $2";
+ } elsif ($line =~ /^longdesc\s+(.*)$/) {
+ if (defined($self->{'longdesc'})) {
+ $self->{'longdesc'} .= " $1";
} else {
- $self->{'longdesc'} = "$2";
+ $self->{'longdesc'} = "$1";
}
$lastcmd = "longdesc";
next;
@@ -261,7 +261,9 @@ sub writeout {
defined($self->{'catalogue'}) && print $fd "catalogue $self->{'catalogue'}\n";
defined($self->{'shortdesc'}) && print $fd "shortdesc $self->{'shortdesc'}\n";
defined($self->{'license'}) && print $fd "license $self->{'license'}\n";
- format_name $fd "multilineformat";
+ # ugly hack to get rid of use FileHandle; see man perlform
+ #format_name $fd "multilineformat";
+ select((select($fd),$~ = "multilineformat")[0]);
if (defined($self->{'longdesc'})) {
$_tmp = "$self->{'longdesc'}";
write $fd;