jonswar / perl-poet

Perl Poet distribution
30 stars 12 forks source link

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

Open mydimension opened 11 years ago

mydimension commented 11 years ago

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.

jonswar commented 11 years ago

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

On Dec 19, 2012, at 11:42 AM, William Cox notifications@github.com 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.