Skip to content

Instantly share code, notes, and snippets.

@damog
Created March 10, 2009 16:50
Show Gist options
  • Save damog/76983 to your computer and use it in GitHub Desktop.
Save damog/76983 to your computer and use it in GitHub Desktop.
package Apache2::Request::NG;
use Modern::Perl;
use Apache2::Request;
our @ISA = qw(Apache2::Request);
sub new {
my($class, @args) = @_;
return bless { r => Apache2::Request->new(@args) }, $class;
}
sub query {
my($self) = shift;
my @table = $self->param;
my @st;
for my $k (@table) {
push @st, { $k => $self->param($k) }
}
\@st;
}
sub query_string {
my($self) = shift;
join '&', map { my($k, $v) = each %{$_}; "$k=$v"} @{$self->query};
}
1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment