PSGI improvements
Call to_app() explicitly rather than using Plack::Component's overload Compile the psgi sub once per app, not once per req
This commit is contained in:
parent
ad68c7bd19
commit
9621120825
6 changed files with 66 additions and 60 deletions
|
|
@ -63,6 +63,7 @@ sub AUTOLOAD {
|
|||
my @args = @_;
|
||||
our $AUTOLOAD;
|
||||
my $method = "SUPER::".(split /::/, $AUTOLOAD)[-1];
|
||||
return if $method eq 'SUPER::DESTROY';
|
||||
return $self->$method(@args);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -231,7 +231,8 @@ Returns a boolean value indicating whether the current page will redirect to som
|
|||
|
||||
sub isRedirect {
|
||||
my $self = shift;
|
||||
return isIn($self->getStatus(), qw(302 301));
|
||||
my $status = $self->getStatus;
|
||||
return $status == 302 || $status == 301;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue