简体   繁体   中英

Trying to install HTTP::Server::Brick on Strawberry Perl on Windows 7

Here's what I see when I run cpan to install it.

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

It's really quite simple... Why port 85432? It's outside the 16 bit unsigned integer range! I can't even enter localhost:85432 in any URL bars, Chrome just sends me straight to Google search.

That is pretty strange. I took a look at the source for the test in question, and it has this:

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

No idea why the author chose that as the default port number, since as you know it's invalid. I guess there's zero chance of the port being in use, though!

My suggestion would be to set the environment variable HSB_TEST_PORT to something more reasonable and try to install again, and file a bug report in the meantime.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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