Skip to content

Commit

Permalink
Fix WebGUI::Session::Plack's param statement to be compatible with Ap…
Browse files Browse the repository at this point in the history
…ache2::Request's.
  • Loading branch information
martink committed Aug 24, 2012
1 parent 0d55ec0 commit 1adfb3f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lib/WebGUI/Session/Plack.pm
Expand Up @@ -40,8 +40,16 @@ sub AUTOLOAD {

# Emulate/delegate/fake Apache2::* subs
sub uri { shift->{request}->path_info }
sub param { shift->{request}->param(@_) }
sub params { shift->{request}->prameters->mixed(@_) }
sub param {
my $self = shift;
if (@_) {
return $self->{request}->param(@_);
}
else {
return $self->params;
}
}
sub params { shift->{request}->parameters->mixed(@_) }
sub headers_in { shift->{request}->headers(@_) }
sub headers_out { shift->{headers_out} }
sub protocol { shift->{request}->protocol(@_) }
Expand Down

0 comments on commit 1adfb3f

Please sign in to comment.