无法使用Perl 5.008003安装XML :: Twig

时间:2012-01-18 02:38:22

标签: perl xml-twig

我的机器上有perl版本5.008003。我正在尝试使用CPAN安装XML :: Twig,但它失败并出现以下错误。任何人都可以提供帮助。

t/xmlxpath_22name_select............ok
t/xmlxpath_23func...................cannot use XML::Twig::XPath: neither XML::XP
athEngine 0.09+ nor XML::XPath are available
t/xmlxpath_23func...................ok
t/xmlxpath_24namespaces.............cannot use XML::Twig::XPath: neither XML::XP
athEngine 0.09+ nor XML::XPath are available
t/xmlxpath_24namespaces.............ok
t/xmlxpath_25scope..................cannot use XML::Twig::XPath: neither XML::XP
athEngine 0.09+ nor XML::XPath are available
t/xmlxpath_25scope..................ok
t/xmlxpath_26predicate..............cannot use XML::Twig::XPath: neither XML::XP
athEngine 0.09+ nor XML::XPath are available
t/xmlxpath_26predicate..............ok
t/xmlxpath_28ancestor2..............cannot use XML::Twig::XPath: neither XML::XP
athEngine 0.09+ nor XML::XPath are available
t/xmlxpath_28ancestor2..............ok
t/xmlxpath_29desc_with_predicate....cannot use XML::Twig::XPath: neither XML::XP
athEngine 0.09+ nor XML::XPath are available
t/xmlxpath_29desc_with_predicate....ok
t/xmlxpath_30lang...................cannot use XML::Twig::XPath: neither XML::XP
athEngine 0.09+ nor XML::XPath are available
t/xmlxpath_30lang...................ok
t/xmlxpath_additional...............cannot use XML::Twig::XPath: neither XML::XP
athEngine 0.09+ nor XML::XPath are available
t/xmlxpath_additional...............ok
t/xmlxpath_nav......................cannot use XML::Twig::XPath: neither XML::XP
athEngine 0.09+ nor XML::XPath are available
t/xmlxpath_nav......................ok
t/xmlxpath_test1....................cannot use XML::Twig::XPath: neither XML::XP
athEngine 0.09+ nor XML::XPath are available
t/xmlxpath_test1....................ok
t/xmlxpath_test_twig_roots..........cannot use XML::Twig::XPath: neither XML::XP
athEngine 0.09+ nor XML::XPath are available
t/xmlxpath_test_twig_roots..........ok
t/xmlxpath_test_with_handlers.......cannot use XML::Twig::XPath: neither XML::XP
athEngine 0.09+ nor XML::XPath are available
t/xmlxpath_test_with_handlers.......ok
t/xmlxpath_xpath_cond...............cannot use XML::Twig::XPath: neither XML::XP
athEngine 0.09+ nor XML::XPath are available
t/xmlxpath_xpath_cond...............ok
t/zz_dump_config....................

Configuration:

perl: 5.008003
OS: MSWin32 - MSWin32
required
  XML::Parser              :             2.34
'xmlwf' is not recognized as an internal or external command,
operable program or batch file.
Use of uninitialized value in sprintf at t/zz_dump_config.t line 113.
  expat                    : <no version information found>
Strongly Recommended
  Scalar::Util             :             1.13 (for improved memory management)
  Encode                   :             1.99 (for encoding conversions)
Modules providing additional features
  XML::XPathEngine         :  <not available> (to use XML::Twig::XPath)
  XML::XPath               :  <not available> (to use XML::Twig::XPath if Tree::
XPathEngine not available)
  LWP                      :             5.75 (for the parseurl method)
  HTML::TreeBuilder        :             3.13 (to use parse_html and parsefile_h
tml)
  HTML::Entities::Numbered :  <not available> (to allow parsing of HTML containi
ng named entities)
  HTML::Tidy               :  <not available> (to use parse_html and parsefile_h
tml with the use_tidy option)
  HTML::Entities           :             1.27 (for the html_encode filter)
  Tie::IxHash              :  <not available> (for the keep_atts_order option)
  Text::Wrap               :       2001.09291 (to use the "wrapped" option for p
retty_print)
Modules used only by the auto tests
  Test                     :             1.24
  Test::Pod                :  <not available>
  XML::Simple              :             2.09
  XML::Handler::YAWriter   :  <not available>
  XML::SAX::Writer         :  <not available>
  XML::Filter::BufferText  :             1.01
  IO::Scalar               :  <not available>


Please add this information to bug reports (you can run t\zz_dump_config.t to ge
t it)

if you are upgrading the module from a previous version, make sure you read the
Changes file for bug fixes, new features and the occasional COMPATIBILITY WARNIN
G

t/zz_dump_config....................ok
Failed Test   Stat Wstat Total Fail  Failed  List of Failed
-------------------------------------------------------------------------------
t/test_3_36.t               67    1   1.49%  43
Failed 1/96 test scripts, 98.96% okay. 1/2374 subtests failed, 99.96% okay.
NMAKE : fatal error U1077: 'C:\WINNT\system32\cmd.exe' : return code '0xff'
Stop.
  NMAKE test -- NOT OK
Running make install
  make test had returned bad status, won't install without force

cpan>

我的所有环境都有此版本的perl,因此无法升级到最新版本。我只能在这个版本上修复这个问题。

谢谢,

1 个答案:

答案 0 :(得分:2)

根据测试摘要,失败的测试似乎是t / test_3_36.t中的测试43。如果你看一下,它会在解析HTML时测试HTML :: TreeBuilder如何处理&Amp;(注意大写字母A)。根据HTML :: TreeBuilder的版本,&Amp;可以作为&amp;的实体&进行处理。看来,在您的计算机上安装的版本(3.13)中,它(作为文本&Amp;处理(正确),测试没有预料到。

在使用XML :: Twig解析HTML时使用HTML :: TreeBuilder。您也可以使用HTML :: Tidy(您需要安装它)。

这个问题是否足够重要,你不能安装模块,我不知道,你必须运用你最好的判断。

正如池上所说,你在问题中提供的输出并不是最佳的。没有必要复制所有警告(有很多警告,我可能会显示更少的警告,但因为我希望他们煽动用户安装XML :: XPathEngine,我会按原样保留输出)。