diff options
author | Norbert Preining <preining@logic.at> | 2015-06-14 13:36:56 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2015-06-14 13:36:56 +0000 |
commit | f78168070c9d00b91ffccb7b70a50e290f409afc (patch) | |
tree | 98964ddfd9b781571342b35ddf2a610ed4e8b008 | |
parent | 987d9e58540c6b0c8984e1385478e2985bbfca05 (diff) |
make sure that we use the string value instead of some Perl object
git-svn-id: svn://tug.org/texlive/trunk@37520 c570f23f-e606-0410-a88d-b1316a301751
-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"; } } } |