diff options
author | Norbert Preining <preining@logic.at> | 2007-10-18 05:20:00 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2007-10-18 05:20:00 +0000 |
commit | 13ef27983d15dfd066b507cc4c11ece10c111417 (patch) | |
tree | 0f3f1e02d8e3e4e9ccd386003f03af9a0a650739 /Master/tlpkg/TeXLive/TLPOBJ.pm | |
parent | fa80b1bc352f0e2c84257074f7e7f0317b4199ef (diff) |
new module TLConfig and use it
git-svn-id: svn://tug.org/texlive/trunk@5224 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPOBJ.pm')
-rw-r--r-- | Master/tlpkg/TeXLive/TLPOBJ.pm | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm index 21614f12f36..d964b4177d3 100644 --- a/Master/tlpkg/TeXLive/TLPOBJ.pm +++ b/Master/tlpkg/TeXLive/TLPOBJ.pm @@ -6,8 +6,8 @@ package TeXLive::TLPOBJ; +use TeXLive::TLConfig qw($DefaultCategory $CategoriesRegexp); use TeXLive::TLUtils; -#use TeXLive::TeXCatalogue; -- we only want to require XML::DOM at update time. use File::Path; use Cwd; use TeXLive::TLTREE; @@ -23,7 +23,7 @@ sub new { my %params = @_; my $self = { name => $params{'name'}, - category => defined($params{'category'}) ? $params{'category'} : "Package", + category => defined($params{'category'}) ? $params{'category'} : $DefaultCategory, shortdesc => $params{'shortdesc'}, longdesc => $params{'longdesc'}, catalogue => $params{'catalogue'}, @@ -109,7 +109,7 @@ sub from_fh { } $lastcmd = "longdesc"; next; - } elsif ($line =~ /^category\s+(Scheme|Collection|Package|TLCore|Documentation)$/) { + } elsif ($line =~ /^category\s+$CategoriesRegexp$/) { $self->{'category'} = "$1"; $lastcmd = "category"; next; @@ -484,8 +484,14 @@ sub update_from_catalogue { if (defined($entry->version)) { $self->cataloguedata->{'version'} = $entry->version; } - if (defined($entry->url)) { - $self->cataloguedata->{'url'} = $entry->url; + if (defined($entry->ctan)) { + $self->cataloguedata->{'ctan'} = $entry->ctan; + } + if (defined($entry->caption)) { + $self->{'shortdesc'} = $entry->caption; + } + if (defined($entry->description)) { + $self->{'longdesc'} = $entry->description; } # # we need to do the following: |