shlomif / perl-XML-LibXML

The XML-LibXML CPAN Distribution for Processing XML using the libxml2 library
https://metacpan.org/release/XML-LibXML
Other
17 stars 35 forks source link

FAILED: Problem creating root element @encoding: bad name at /root/.cpan/build/XML-XML2JSON-0.06-H9pYM0/blib/lib/XML/XML2JSON.pm line 760 #6

Closed pavelsr closed 5 years ago

pavelsr commented 7 years ago

When installing XML::XML2JSON I got an error:

# 
# Checking for compatible JSON modules (you need at least one):
# checking for JSON::Syck...
loaded module: JSON::Syck at /root/.cpan/build/XML-XML2JSON-0.06-H9pYM0/blib/lib/XML/XML2JSON.pm line 164.
# JSON from JSON::Syck: {"test":{"censored":{},"@xmlns:test":"http://test.example/test","array":{"@perl":"awesome","item":[{"@index":"0"},{"@index":"1"},{"@index":"2"}]},"empty":{"inner":{"@c":"d"}},"test$nstest":{"@attr1":"bar"},"data":{"$t":"some test text","@attr1":"test"}},"@version":"1.0","@encoding":"UTF-8"}
# FAILED: Problem creating root element @encoding: bad name at /root/.cpan/build/XML-XML2JSON-0.06-H9pYM0/blib/lib/XML/XML2JSON.pm line 760.
# checking for JSON::XS...
loaded module: JSON::XS at /root/.cpan/build/XML-XML2JSON-0.06-H9pYM0/blib/lib/XML/XML2JSON.pm line 164.
# JSON from JSON::XS: {"@encoding":"UTF-8","@version":"1.0","test":{"empty":{"inner":{"@c":"d"}},"test$nstest":{"@attr1":"bar"},"data":{"$t":"some test text","@attr1":"test"},"censored":{},"array":{"item":[{"@index":"0"},{"@index":"1"},{"@index":"2"}],"@perl":"awesome"},"@xmlns:test":"http://test.example/test"}}
# FAILED: Problem creating root element @encoding: bad name at /root/.cpan/build/XML-XML2JSON-0.06-H9pYM0/blib/lib/XML/XML2JSON.pm line 760.
# checking for JSON...
loaded module: JSON at /root/.cpan/build/XML-XML2JSON-0.06-H9pYM0/blib/lib/XML/XML2JSON.pm line 164.
# JSON from JSON: {"test":{"@xmlns:test":"http://test.example/test","array":{"item":[{"@index":"0"},{"@index":"1"},{"@index":"2"}],"@perl":"awesome"},"censored":{},"data":{"@attr1":"test","$t":"some test text"},"empty":{"inner":{"@c":"d"}},"test$nstest":{"@attr1":"bar"}},"@version":"1.0","@encoding":"UTF-8"}
# FAILED: Problem creating root element @encoding: bad name at /root/.cpan/build/XML-XML2JSON-0.06-H9pYM0/blib/lib/XML/XML2JSON.pm line 760.
# checking for JSON::DWIW...
# NOT FOUND
# compatible JSON modules found: 0

#   Failed test at t/XML-XML2JSON.t line 47.
# Looks like you failed 1 test of 2.

Dockerfile:

FROM alpine:3.1
RUN apk update && \ 
    apk add perl perl-dev g++ make wget curl libxml2-dev && \ 
    curl -L https://cpanmin.us | perl - App::cpanminus && \
    rm -rf /root/.cpanm/* /usr/local/share/man/* && \
    cpan JSON JSON::DWIW JSON::Syck JSON::XS XML::XML2JSON
pavelsr commented 7 years ago

Possibly bug related to this issue https://rt.cpan.org/Public/Bug/Display.html?id=94335

shlomif commented 5 years ago

This seems to be a problem with https://metacpan.org/release/XML-XML2JSON . See https://www.cpan.org/misc/cpan-faq.html#How_adopt_module . Closing.