diff options
Diffstat (limited to 'Master')
-rw-r--r-- | Master/tlpkg/TeXLive/TeXCatalogue.pm | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/Master/tlpkg/TeXLive/TeXCatalogue.pm b/Master/tlpkg/TeXLive/TeXCatalogue.pm index 2f5cdeb9d16..2500cdf990e 100644 --- a/Master/tlpkg/TeXLive/TeXCatalogue.pm +++ b/Master/tlpkg/TeXLive/TeXCatalogue.pm @@ -59,33 +59,35 @@ sub initialize { my $parser = new XML::XPath->new(ioref => $self->{'ioref'}, parser => $_parser) || die "Failed to parse given ioref"; - $self->{'entry'}{'id'} = $parser->findvalue('/entry/@id'); - $self->{'entry'}{'date'} = $parser->findvalue('/entry/@datestamp'); - $self->{'entry'}{'modder'} = $parser->findvalue('/entry/@modifier'); - $self->{'name'} = $parser->findvalue("/entry/name"); - $self->{'caption'} = beautify($parser->findvalue("/entry/caption")); - $self->{'description'} = beautify($parser->findvalue("/entry/description")); - $self->{'license'} = $parser->findvalue('/entry/license/@type'); + $self->{'entry'}{'id'} = $parser->findvalue('/entry/@id')->value(); + $self->{'entry'}{'date'} = $parser->findvalue('/entry/@datestamp')->value(); + $self->{'entry'}{'modder'} = $parser->findvalue('/entry/@modifier')->value(); + $self->{'name'} = $parser->findvalue("/entry/name")->value(); + $self->{'caption'} = beautify($parser->findvalue("/entry/caption")->value()); + $self->{'description'} = beautify($parser->findvalue("/entry/description")->value()); + $self->{'license'} = $parser->findvalue('/entry/license/@type')->value(); $self->{'version'} = Text::Unidecode::unidecode( - $parser->findvalue('/entry/version/@number')); - $self->{'ctan'} = $parser->findvalue('/entry/ctan/@path'); + $parser->findvalue('/entry/version/@number')->value()); + $self->{'ctan'} = $parser->findvalue('/entry/ctan/@path')->value(); if ($parser->findvalue('/entry/texlive/@location') ne "") { - $self->{'texlive'} = $parser->findvalue('/entry/texlive/@location'); + $self->{'texlive'} = $parser->findvalue('/entry/texlive/@location')->value(); } if ($parser->findvalue('/entry/miktex/@location') ne "") { - $self->{'miktex'} = $parser->findvalue('/entry/miktex/@location'); + $self->{'miktex'} = $parser->findvalue('/entry/miktex/@location')->value(); } # parse the documentation entries my $docset = $parser->find('/entry/documentation'); foreach my $node ($docset->get_nodelist) { - my $docfile = $parser->find('./@href',$node); + my $docfileparse = $parser->find('./@href',$node); + # convert to string + my $docfile = "$docfileparse"; # see comments at end of beautify() my $details = Text::Unidecode::unidecode($parser->find('./@details',$node)); my $language = $parser->find('./@language',$node); $self->{'docs'}{$docfile}{'available'} = 1; - if ($details) { $self->{'docs'}{$docfile}{'details'} = $details; } - if ($language) { $self->{'docs'}{$docfile}{'language'} = $language; } + if ($details) { $self->{'docs'}{$docfile}{'details'} = "$details"; } + if ($language) { $self->{'docs'}{$docfile}{'language'} = "$language"; } } } |