Skip to content

Commit 1adfb3f

Browse files
committedAug 24, 2012
Fix WebGUI::Session::Plack's param statement to be compatible with Apache2::Request's.
1 parent 0d55ec0 commit 1adfb3f

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed
 

‎lib/WebGUI/Session/Plack.pm

+10-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,16 @@ sub AUTOLOAD {
4040

4141
# Emulate/delegate/fake Apache2::* subs
4242
sub uri { shift->{request}->path_info }
43-
sub param { shift->{request}->param(@_) }
44-
sub params { shift->{request}->prameters->mixed(@_) }
43+
sub param {
44+
my $self = shift;
45+
if (@_) {
46+
return $self->{request}->param(@_);
47+
}
48+
else {
49+
return $self->params;
50+
}
51+
}
52+
sub params { shift->{request}->parameters->mixed(@_) }
4553
sub headers_in { shift->{request}->headers(@_) }
4654
sub headers_out { shift->{headers_out} }
4755
sub protocol { shift->{request}->protocol(@_) }

0 commit comments

Comments
 (0)
Please sign in to comment.