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
|
|
@ -68,11 +68,7 @@ sub call {
|
|||
|
||||
# Close the Session
|
||||
$env->{'webgui.session'}->close();
|
||||
#memory_cycle_ok( $env->{'webgui.session'} );
|
||||
delete $env->{'webgui.session'};
|
||||
|
||||
#use Test::Memory::Cycle;
|
||||
#memory_cycle_ok( $env );
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ use WebGUI::Session::Form;
|
|||
use WebGUI::Session::Http;
|
||||
use WebGUI::Session::Icon;
|
||||
use WebGUI::Session::Id;
|
||||
use WebGUI::Session::Os;
|
||||
use WebGUI::Session::Output;
|
||||
use WebGUI::Session::Privilege;
|
||||
use WebGUI::Session::Request;
|
||||
|
|
|
|||
|
|
@ -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