Subject: | Poet::Plack::Request should override the method() method |
Too much Moose causes the method() method (!) to break in
Poet::Plack::Request:
$ perl -E 'use Plack::Request; my $r =
Plack::Request->new({REQUEST_METHOD => "happy"}); say $r->method();'
happy
$ perl -E 'use Poet::Plack::Request; my $r =
Poet::Plack::Request->new({REQUEST_METHOD => "happy"}); say $r->method();'
The bug is the empty line above. The fix is to implement method() in
Poet::Plack::Request, e.g. as
method method {
return($self->env()->{REQUEST_METHOD});
};
The reason for the bug is probably clear from the stutter in the
implementation proposed….