简体   繁体   English

在Strawberry Perl中安装XML :: Tidy

[英]Installing XML::Tidy in Strawberry Perl

When trying to install XML::Tidy in Strawberry Perl 尝试在Strawberry Perl中安装XML :: Tidy时

C:\>perl --version

This is perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x86-multi-thread

Copyright 1987-2012, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

I get the following error when the test are run. 运行测试时出现以下错误。

Creating new 'Build' script for 'XML-Tidy' version '1.12.B55J2qn'
Building XML-Tidy
  PIP/XML-Tidy-1.12.B55J2qn.tgz
  C:\strawberry\perl\bin\perl.exe ./Build -- OK
Running Build test
t\00pod.t .....
t\00pod.t ..... 1/3 #   Failed test 'POD test for blib/lib/XML/Tidy.pm'
#   at C:/strawberry/perl/site/lib/Test/Pod.pm line 186.
# blib/lib/XML/Tidy.pm (811): Non-ASCII character seen before =encoding in '®'. Assuming ISO8859-1
# Looks like you failed 1 test of 3.
t\00pod.t ..... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests
t\00podc.t .... ok
t\00small.t ... ok
t\01medium.t .. ok
t\02large.t ... ok
t\03prune.t ... ok

I have absolutely no idea what can be wrong here. 我完全不知道这里有什么问题。 Anyone? 任何人?

When you install CPAN modules the installer typically runs tests for the module before installing it. 当您安装CPAN模块时,安装程​​序通常会在安装模块之前对其进行测试。

In this case, one of the tests that is run is a test that checks if the in-module documentation is correct; 在这种情况下,运行的测试之一是检查模块内文档是否正确的测试。 and this fails because it can not recognize the character set. 并且失败,因为它无法识别字符集。 It's really nothing you should worry about too much as this has nothing to do with the code itself. 您实际上不必担心太多,因为这与代码本身无关。

The best thing to do is to 'force install' the module: 最好的办法是“强制安装”模块:

cpan> force install XML::Tidy

This will still run the test suite, but installs, even if one of the tests is not passing. 即使其中一项测试未通过,它仍将运行测试套件,但会安装。

BTW I created an RT ticket with a patch to fix this issue: https://rt.cpan.org/Ticket/Display.html?id=85592 顺便说一句,我创建了带有修复程序的RT票证来解决此问题: https : //rt.cpan.org/Ticket/Display.html?id=85592

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM