perl-poet icon indicating copy to clipboard operation
perl-poet copied to clipboard

'method' symbol from Poet::Plack::Request breaks $m->req->method

Open mydimension opened this issue 12 years ago • 1 comments

makes it difficult to pull out the HTTP method being used.

my own in-elegant hack (in app.psgi before builder call):

{
  no strict 'refs';
  require Poet::Plack::Request;  # ensure module is loaded
  my $stash = 'Poet::Plack::Request::';
  delete $stash->{method};
}

it works but a better solution would be for the Request/Response subclasses to cleanup their imports.

mydimension avatar Dec 19 '12 19:12 mydimension

Ahh, yup. I will use namespace::autoclean or similar.

On Dec 19, 2012, at 11:42 AM, William Cox [email protected] wrote:

makes it difficult to pull out the HTTP method being used.

my own in-elegant hack (in app.psgi before builder call):

{ no strict 'refs'; require Poet::Plack::Request; # ensure module is loaded my $stash = 'Poet::Plack::Request::'; delete $stash->{method}; } it works but a better solution would be for the Request/Response subclasses to cleanup their imports.

— Reply to this email directly or view it on GitHub.

jonswar avatar Dec 19 '12 19:12 jonswar