Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added a hack to improve the situation, but it is still not "correct"

  • Loading branch information...
commit d0bbe4adee7690182180d2834a3d59a04069b100 1 parent 32d5329
@beppu authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 bin/squatting
View
6 bin/squatting
@@ -102,7 +102,7 @@ if ($app) {
sub Squatting::Controller::mock_init {
my $self = shift;
$self->{cr} = {}; # TODO - provide a mock Continuity::Request
- $self->{env} = { %ENV, REQUEST_PATH => &{"$app"."::Controllers::R"}($self->name, @_) };
+ $self->{env} = { REQUEST_PATH => &{"$app"."::Controllers::R"}($self->name, @_) };
$self->{cookies} = {};
$self->{input} = {};
$self->{headers} = {};
@@ -113,7 +113,9 @@ if ($app) {
foreach my $method qw(get post) {
*{$app."::$method" } = sub {
my $cc = ${$app."::Controllers::C"}{$_[1]}->clone->mock_init(@_[2..$#_]);
- my $content = $cc->$method(@_[2..$#_]);
+ $cc->env->{REQUEST_METHOD} = $method;
+ #my $content = $cc->$method(@_[2..$#_]);
+ my $content = $app->service($cc, @_[2..$#_]);
($cc, $content);
};
}

0 comments on commit d0bbe4a

Please sign in to comment.
Something went wrong with that request. Please try again.