试图在Windows 7上的Strawberry Perl上安装HTTP :: Server :: Brick

时间:2012-07-13 03:40:06

标签: windows perl http webserver cpan

这是我在运行cpan进行安装时看到的内容。

cpan shell -- CPAN exploration and modules installation (v1.9800)
Enter 'h' for help.


cpan> install HTTP::Server::Brick
Database was generated on Fri, 13 Jul 2012 03:26:42 GMT
Running install for module 'HTTP::Server::Brick'
Running make for A/AU/AUFFLICK/HTTP-Server-Brick-0.1.4.tar.gz
Checksum for C:\strawberry\cpan\sources\authors\id\A\AU\AUFFLICK\HTTP-Server-Bri
ck-0.1.4.tar.gz ok
Scanning cache C:\strawberry\cpan\build for sizes
............................................................................DONE


  CPAN.pm: Building A/AU/AUFFLICK/HTTP-Server-Brick-0.1.4.tar.gz

Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'HTTP-Server-Brick' version '0.1.4'
Building HTTP-Server-Brick
  AUFFLICK/HTTP-Server-Brick-0.1.4.tar.gz
  C:\strawberry\perl\bin\perl.exe ./Build -- OK
Running Build test
t\00.load.t ....... 1/1 # Testing HTTP::Server::Brick v0.1.4
t\00.load.t ....... ok
t\pod-coverage.t .. skipped: Test::Pod::Coverage 1.04 required for testing POD c
overage
t\pod.t ........... skipped: Test::Pod 1.14 required for testing POD
t\serving.t ....... 1/281 #
#
# Using port: 85432 and host: 127.0.0.1 for test server.
# If these are not suitable settings on your machine, set the environment
# variables HSB_TEST_PORT and HSB_TEST_HOST to something suitable.
#
# Configuring server
# Starting server
t\serving.t ....... 4/281

这真的很简单......为什么端口85432?它超出了16位无符号整数范围!我甚至无法在任何网址栏中输入localhost:85432,Chrome只是直接发送给我进行Google搜索。

1 个答案:

答案 0 :(得分:0)

这很奇怪。我查看了有问题的测试的source,它有:

my $port = $ENV{HSB_TEST_PORT} || 85432;

不知道为什么作者选择它作为默认端口号,因为你知道它是无效的。我猜这个端口正在使用的可能性为零!

我的建议是将环境变量HSB_TEST_PORT设置为更合理的内容,并尝试重新安装,并在此期间提交错误报告。