Skip to content

Commit

Permalink
Upped Plack dependency to support localizing $0. Fixes miyagawagh-19
Browse files Browse the repository at this point in the history
  • Loading branch information
miyagawa committed Feb 23, 2011
1 parent 16fbfe4 commit 45e0b6f
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ name 'Starman';
all_from 'lib/Starman.pm';
readme_from 'lib/Starman.pm';
build_requires 'Test::More';
requires 'Plack', 0.9931;
requires 'Plack', 0.9971;
requires 'Net::Server', 0.91;
requires 'Data::Dump';
requires 'HTTP::Parser::XS';
requires 'HTTP::Status';
requires 'HTTP::Date';
requires 'parent';
requires 'Test::TCP', 1.11;
install_script 'bin/starman';
recommends 'Server::Starter';
recommends 'Net::Server::SS::PreFork';
Expand Down
6 changes: 6 additions & 0 deletions t/findbin.psgi
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
use strict;
use FindBin;
sub {
my $env = shift;
return [ 200, [ "Content-Type", "text/plain" ], [ $FindBin::Bin ] ];
};
20 changes: 20 additions & 0 deletions t/findbin.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
use Test::TCP;
use LWP::UserAgent;
use FindBin;
use Test::More;

my $s = Test::TCP->new(
code => sub {
my $port = shift;
exec "$^X bin/starman --port $port --max-requests=1 --workers=1 $FindBin::Bin/findbin.psgi";
},
);

my $ua = LWP::UserAgent->new;

for (1..2) {
my $res = $ua->get("http://localhost:" . $s->port);
is $res->content, $FindBin::Bin;
}

done_testing;

0 comments on commit 45e0b6f

Please sign in to comment.