From f158c892f4714e2dfef87c5edf8cd679fd09bb2b Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 7 Dec 2019 03:00:49 +0000 Subject: CTAN sync 201912070300 --- .../texlive/tlnet/tlpkg/TeXLive/TeXCatalogue.pm | 63 +++++++++++----------- 1 file changed, 33 insertions(+), 30 deletions(-) (limited to 'systems/texlive/tlnet/tlpkg/TeXLive/TeXCatalogue.pm') diff --git a/systems/texlive/tlnet/tlpkg/TeXLive/TeXCatalogue.pm b/systems/texlive/tlnet/tlpkg/TeXLive/TeXCatalogue.pm index 4f6721dc17..a9f94e33ff 100644 --- a/systems/texlive/tlnet/tlpkg/TeXLive/TeXCatalogue.pm +++ b/systems/texlive/tlnet/tlpkg/TeXLive/TeXCatalogue.pm @@ -1,10 +1,10 @@ -# $Id: TeXCatalogue.pm 48521 2018-08-31 03:41:21Z preining $ +# $Id: TeXCatalogue.pm 53031 2019-12-05 19:14:32Z karl $ # TeXLive::TeXCatalogue - module for accessing the TeX Catalogue -# Copyright 2007-2018 Norbert Preining +# Copyright 2007-2019 Norbert Preining # This file is licensed under the GNU General Public License version 2 # or any later version. # -# Loads of code taken from the catalogue checking script of Robin Fairbairns. +# Loads of code adapted from the catalogue checking script of Robin Fairbairns. use XML::Parser; use XML::XPath; @@ -13,16 +13,28 @@ use Text::Unidecode; package TeXLive::TeXCatalogue::Entry; -my $svnrev = '$Revision: 48521 $'; -my $_modulerevision; -if ($svnrev =~ m/: ([0-9]+) /) { - $_modulerevision = $1; -} else { - $_modulerevision = "unknown"; -} -sub module_revision { - return $_modulerevision; -} +my $svnrev = '$Revision: 53031 $'; +my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown"; +sub module_revision { return $_modulerevision; } + +=pod + +=head1 NAME + +TeXLive::TeXCatalogue - accessing the TeX Catalogue for TeX Live + +=head1 SYNOPSIS + +missing + +=head1 DESCRIPTION + +The L module provides access to the data stored +in the TeX Catalogue. + +DOCUMENTATION MISSING, SORRY!!! + +=cut my $_parser = XML::Parser->new( ErrorContext => 2, @@ -106,16 +118,16 @@ sub initialize { } # parse the contact entries foreach my $node ($parser->find('/entry/contact')->get_nodelist) { - my $contacttype = $parser->find('./@type',$node); - my $contacthref = $parser->find('./@href',$node); + my $contacttype = $parser->findvalue('./@type',$node); + my $contacthref = $parser->findvalue('./@href',$node); if ($contacttype && $contacthref) { $self->{'contact'}{$contacttype} = $contacthref; } } # parse the keyval/topic entries foreach my $node ($parser->find('/entry/keyval')->get_nodelist) { - my $k = $parser->find('./@key',$node); - my $v = $parser->find('./@value',$node); + my $k = $parser->findvalue('./@key',$node); + my $v = $parser->findvalue('./@value',$node); # for now we only support evaluating the 'topic' key if ("$k" eq 'topic') { push @{$self->{'topic'}}, "$v"; @@ -309,20 +321,11 @@ sub entries { __END__ -=head1 NAME - -TeXLive::TeXCatalogue - Accessing the TeX Catalogue - -=head1 SYNOPSIS +=head1 SEE ALSO -missing - -=head1 DESCRIPTION - -The L module provides access to the data stored -in the TeX Catalogue. - -DOCUMENTATION MISSING, SORRY!!! +The other modules in C (L and +the rest), and the scripts in C (especially +C), the documentation in C, etc. =head1 AUTHORS AND COPYRIGHT -- cgit v1.2.3