3

当我尝试使用草莓 perl(v5.10.1)从 CPAN 安装 WWW::Mechanize 分发时

windows 7 我得到以下故障?

cpan> install JESSE/WWW-Mechanize-1.70.tar.gz
Running make for J/JE/JESSE/WWW-Mechanize-1.70.tar.gz
Checksum for C:\strawberry\cpan\sources\authors\id\J\JE\JESSE\WWW-Mechanize-1.70
.tar.gz ok
Scanning cache C:\strawberry\cpan\build for sizes
............................................................................DONE


  CPAN.pm: Going to build J/JE/JESSE/WWW-Mechanize-1.70.tar.gz


WWW::Mechanize likes to have a lot of test modules for some of its tests.
The following are modules that would be nice to have, but not required.

        Test::Memory::Cycle
        Test::Taint


Checking if your kit is complete...
Looks good
Writing Makefile for WWW::Mechanize
Could not read metadata file. Falling back to other methods to determine prerequ
isites
cp lib/WWW/Mechanize/Examples.pod blib\lib\WWW\Mechanize\Examples.pod
cp lib/WWW/Mechanize/Link.pm blib\lib\WWW\Mechanize\Link.pm
cp lib/WWW/Mechanize/Image.pm blib\lib\WWW\Mechanize\Image.pm
cp lib/WWW/Mechanize/Cookbook.pod blib\lib\WWW\Mechanize\Cookbook.pod
cp lib/WWW/Mechanize/FAQ.pod blib\lib\WWW\Mechanize\FAQ.pod
cp lib/WWW/Mechanize.pm blib\lib\WWW\Mechanize.pm
C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e "cp" -- bin/mech-dump bli
b\script\mech-dump
pl2bat.bat blib\script\mech-dump
  JESSE/WWW-Mechanize-1.70.tar.gz
  C:\strawberry\c\bin\dmake.EXE -- OK
Running make test
C:\strawberry\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0,
'blib\lib', 'blib\arch')" t\00-load.t t\add_header.t t\aliases.t t\area_link.t t
\autocheck.t t\clone.t t\content.t t\cookies.t t\credentials-api.t t\credentials
.t t\die.t t\field.t t\find_frame.t t\find_image.t t\find_inputs.t t\find_link-w
arnings.t t\find_link.t t\find_link_id.t t\form-parsing.t t\form_with_fields.t t
\frames.t t\image-new.t t\image-parse.t t\link-base.t t\link-relative.t t\link.t
 t\new.t t\pod-coverage.t t\pod.t t\regex-error.t t\save_content.t t\select.t t\
taint.t t\tick.t t\untaint.t t\upload.t t\warn.t t\warnings.t t\local\back.t t\l
ocal\click.t t\local\click_button.t t\local\failure.t t\local\follow.t t\local\f
orm.t t\local\get.t t\local\nonascii.t t\local\overload.t t\local\page_stack.t t
\local\referer.t t\local\reload.t t\local\submit.t t\mech-dump\mech-dump.t
t\00-load.t .............. 1/2 # Testing WWW::Mechanize 1.70, with LWP 5.837, Pe
rl 5.010001, C:\STRAWB~1\perl\bin\perl.exe
# Test::Memory::Cycle is not installed.
t\00-load.t .............. ok
t\add_header.t ........... ok
t\aliases.t .............. ok
t\area_link.t ............ ok
t\autocheck.t ............ ok
t\clone.t ................ ok
t\content.t .............. ok
t\cookies.t .............. skipped: HTTP::Server::Simple does not support Window
s yet.
t\credentials-api.t ...... ok
t\credentials.t .......... ok
t\die.t .................. ok
t\field.t ................ ok
t\find_frame.t ........... ok
t\find_image.t ........... ok
t\find_inputs.t .......... ok
t\find_link-warnings.t ... ok
t\find_link.t ............ ok
t\find_link_id.t ......... ok
t\form-parsing.t ......... ok
t\form_with_fields.t ..... 1/? There are 2 forms with the named fields.  The fir
st one was used. at t\form_with_fields.t line 27
t\form_with_fields.t ..... ok
t\frames.t ............... ok
t\image-new.t ............ ok
t\image-parse.t .......... ok
t\link-base.t ............ ok
t\link-relative.t ........ ok
t\link.t ................. ok
t\local\back.t ........... 31/47
#   Failed test '404 check'
#   at t\local\back.t line 151.
t\local\back.t ........... 33/47 #          got: '500'
#     expected: '404'
# $server404url=http://SM-15828.emea.hpqcorp.net:50345/
# $mech->content="500 Can't connect to SM-15828.emea.hpqcorp.net:50345 (connect:
 timeout)
# "
t\local\back.t ........... 44/47 # Looks like you failed 1 test of 47.
t\local\back.t ........... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/47 subtests
        (less 2 skipped subtests: 44 okay)
t\local\click.t .......... ok
t\local\click_button.t ... ok
t\local\failure.t ........ ok
t\local\follow.t ......... ok
t\local\form.t ........... ok
t\local\get.t ............ ok
t\local\nonascii.t ....... ok
t\local\overload.t ....... skipped: Mysteriously stopped passing, and I don't kn
ow why.
t\local\page_stack.t ..... ok
t\local\referer.t ........ ok
t\local\reload.t ......... ok
t\local\submit.t ......... ok
t\mech-dump\mech-dump.t .. ok
t\new.t .................. ok
t\pod-coverage.t ......... skipped: Test::Pod::Coverage 1.04 required for testin
g POD coverage
t\pod.t .................. ok
t\regex-error.t .......... ok
t\save_content.t ......... ok
t\select.t ............... ok
t\taint.t ................ skipped: Test::Taint required for checking taintednes
s
t\tick.t ................. ok
t\untaint.t .............. ok
t\upload.t ............... ok
t\warn.t ................. ok
t\warnings.t ............. ok

Test Summary Report
-------------------
t\local\back.t         (Wstat: 256 Tests: 47 Failed: 1)
  Failed test:  33
  Non-zero exit status: 1
t\local\click_button.t (Wstat: 0 Tests: 19 Failed: 0)
  TODO passed:   15-17, 19
Files=52, Tests=558, 490 wallclock secs ( 1.51 usr +  0.36 sys =  1.87 CPU)
Result: FAIL
Failed 1/52 test programs. 1/558 subtests failed.
dmake.EXE:  Error code 255, while making 'test_dynamic'
  JESSE/WWW-Mechanize-1.70.tar.gz
  C:\strawberry\c\bin\dmake.EXE test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports JESSE/WWW-Mechanize-1.70.tar.gz
Running make install
  make test had returned bad status, won't install without force
Failed during this command:
 JESSE/WWW-Mechanize-1.70.tar.gz              : make_test NO

有人可以帮助这里可能是什么问题以及如果可能的话如何解决它?

4

2 回答 2

4

In general WWW::Mechanize doesn't always pass all of its tests on MSWin32. If you only got one failed test, I would count my blessings and force install it.

于 2011-10-24T21:50:17.617 回答
2

按照指示执行,和force install ...,或在跳过测试时安装cpanp i WWW::Mechanize --skip-test

Failed 1/52 test programs. 1/558 subtests failed.
100 - (1/52  )*100 = 98.0769230769231    percent OK
100 - (1/558 )*100 = 99.8207885304659    percent OK
于 2011-10-26T09:54:29.423 回答