Skip to content

Commit

Permalink
Don't mangle @_ if the first argument is not a ref (i.e a psgi app).
Browse files Browse the repository at this point in the history
  • Loading branch information
rafl committed Jan 14, 2010
1 parent 84ab708 commit c32c94f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Plack/Test.pm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sub test_psgi {
eval "require Plack::Test::$Impl;";
die $@ if $@;
no strict 'refs';
if (@_ == 2) {
if (ref $_[0] && @_ == 2) {
@_ = (app => $_[0], client => $_[1]);
}
&{"Plack::Test::$Impl\::test_psgi"}(@_);
Expand Down

0 comments on commit c32c94f

Please sign in to comment.