Hi Monks,

I am trying to install a module "XML::Diff" which I want to use to compare two XML files for any new additions, updates or deletes. Following is the error which I got while installing it. Can anyone help me on this?

Is there any other CPAN module which can be used to compare two XML files efficiently?
[root@rubicon prantikd]# perl -MCPAN -e "install XML::Diff" CPAN: Storable loaded ok (v2.18) Going to read '/root/.cpan/Metadata' Database was generated on Sat, 18 Jul 2009 22:27:04 GMT CPAN: LWP::UserAgent loaded ok (v5.821) CPAN: Time::HiRes loaded ok (v1.9719) Fetching with LWP: http://cpan.pair.com/pub/CPAN/authors/01mailrc.txt.gz CPAN: YAML loaded ok (v0.68) Going to read '/root/.cpan/sources/authors/01mailrc.txt.gz' ...................................................................... +.... ..DONE Fetching with LWP: http://cpan.pair.com/pub/CPAN/modules/02packages.details.txt.gz Going to read '/root/.cpan/sources/modules/02packages.details.txt.gz' Database was generated on Sat, 18 Jul 2009 22:27:04 GMT ............... New CPAN.pm version (v1.9402) available. [Currently running version is v1.94] You might want to try install CPAN reload cpan to both upgrade CPAN.pm and run the new version without leaving the current session. .............................................................DONE Fetching with LWP: http://cpan.pair.com/pub/CPAN/modules/03modlist.data.gz Going to read '/root/.cpan/sources/modules/03modlist.data.gz' ...................................................................... +.... ..DONE Going to write /root/.cpan/Metadata Running install for module 'XML::Diff' Running make for T/TI/TIMM/XML-Diff-0.05.tar.gz CPAN: Digest::SHA loaded ok (v5.47) Checksum for /root/.cpan/sources/authors/id/T/TI/TIMM/XML-Diff-0.05.ta +r.gz ok CPAN: Archive::Tar loaded ok (v1.48) XML-Diff-0.05/ XML-Diff-0.05/TODO XML-Diff-0.05/Makefile.PL XML-Diff-0.05/Changes XML-Diff-0.05/MANIFEST XML-Diff-0.05/t/ XML-Diff-0.05/t/xml/ XML-Diff-0.05/t/xml/test1.xml XML-Diff-0.05/t/xml/test2.xml XML-Diff-0.05/t/1.t XML-Diff-0.05/Diff.pm XML-Diff-0.05/README XML-Diff-0.05/META.yml CPAN: File::Temp loaded ok (v0.22) CPAN.pm: Going to build T/TI/TIMM/XML-Diff-0.05.tar.gz Checking if your kit is complete... Looks good Writing Makefile for XML::Diff cp Diff.pm blib/lib/XML/Diff.pm Manifying blib/man3/XML::Diff.3pm TIMM/XML-Diff-0.05.tar.gz /usr/bin/make -- OK Running make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/1.t .. 1/38 setDocumentElement: ELEMENT node required at /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/XML/LibXML.pm l +ine 1074. # Looks like you planned 38 tests but ran 4. # Looks like your test exited with 255 just after 4. t/1.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 34/38 subtests Test Summary Report ------------------- t/1.t (Wstat: 65280 Tests: 4 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 38 tests but ran 4. Files=1, Tests=4, 1 wallclock secs ( 0.05 usr 0.01 sys + 0.13 cusr + 0.02 csys = 0.21 CPU) Result: FAIL Failed 1/1 test programs. 0/4 subtests failed. make: *** [test_dynamic] Error 255 TIMM/XML-Diff-0.05.tar.gz /usr/bin/make test -- NOT OK //hint// to see the cpan-testers results for installing this module, t +ry: reports TIMM/XML-Diff-0.05.tar.gz Running make install make test had returned bad status, won't install without force

The place where it is erroring out:
$doc->_setDocumentElement($element); at 1074 in /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/XML/LibXML.pm
$doc is an object of XML::LibXML::Document (line 234) but I could not able to figure out where $doc->_setDocumentElement is implementated. I have checked all the dependencies of this module and they are all installed. Is it something else which I am missing?

It would be great if someone can help me.

Thanks in advance,
Prantik

In reply to Error installing XML::Diff by prantikd

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.