texlive[48075] Master/tlpkg/TeXLive/TeXCatalogue.pm: TeXCatalogue

commits+preining at tug.org commits+preining at tug.org
Sat Jun 23 20:35:57 CEST 2018


Revision: 48075
          http://tug.org/svn/texlive?view=revision&revision=48075
Author:   preining
Date:     2018-06-23 20:35:56 +0200 (Sat, 23 Jun 2018)
Log Message:
-----------
TeXCatalogue parser: support alias (use id)

Modified Paths:
--------------
    trunk/Master/tlpkg/TeXLive/TeXCatalogue.pm

Modified: trunk/Master/tlpkg/TeXLive/TeXCatalogue.pm
===================================================================
--- trunk/Master/tlpkg/TeXLive/TeXCatalogue.pm	2018-06-23 07:50:44 UTC (rev 48074)
+++ trunk/Master/tlpkg/TeXLive/TeXCatalogue.pm	2018-06-23 18:35:56 UTC (rev 48075)
@@ -1,6 +1,6 @@
 # $Id$
 # TeXLive::TeXCatalogue - module for accessing the TeX Catalogue
-# Copyright 2007-2015 Norbert Preining
+# Copyright 2007-2018 Norbert Preining
 # This file is licensed under the GNU General Public License version 2
 # or any later version.
 # 
@@ -47,6 +47,7 @@
     version => $params{'version'},
     also => defined($params{'also'}) ? $params{'also'} : [],
     topic => defined($params{'topic'}) ? $params{'topic'} : [],
+    alias => defined($params{'alias'}) ? $params{'alias'} : [],
   };
   bless $self, $class;
   if (defined($self->{'ioref'})) {
@@ -77,6 +78,12 @@
   if ($parser->findvalue('/entry/miktex/@location') ne "") {
     $self->{'miktex'} = $parser->findvalue('/entry/miktex/@location')->value();
   }
+  # parse all alias entries
+  my $alset = $parser->find('/entry/alias');
+  for my $node ($alset->get_nodelist) {
+    my $id = $parser->find('./@id', $node);
+    push @{$self->{'alias'}}, "$id";
+  }
   # parse the documentation entries
   my $docset = $parser->find('/entry/documentation');
   foreach my $node ($docset->get_nodelist) {



More information about the tex-live-commits mailing list