From 848b997e719a53b09936a570527c0f3b9366709b Mon Sep 17 00:00:00 2001 From: Sebastian Riedel Date: Thu, 9 Sep 2004 23:26:39 +0000 Subject: [PATCH] Added parse_args to Maypole::CLI and CGI::Maypole git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@171 48953598-375a-da11-a14b-00016c27c3ee --- lib/CGI/Maypole.pm | 5 +++++ lib/Maypole/CLI.pm | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/lib/CGI/Maypole.pm b/lib/CGI/Maypole.pm index 0426f5a..88995ef 100644 --- a/lib/CGI/Maypole.pm +++ b/lib/CGI/Maypole.pm @@ -22,6 +22,11 @@ sub parse_location { no warnings 'uninitialized'; $self->{path} =~ s/^($loc)?\///; $self->parse_path; + $self->parse_args; +} + +sub parse_args { + my $self = shift; $self->{params} = { $self->{cgi}->Vars }; $self->{query} = { $self->{cgi}->Vars }; } diff --git a/lib/Maypole/CLI.pm b/lib/Maypole/CLI.pm index b2c6e91..9f65c7c 100644 --- a/lib/Maypole/CLI.pm +++ b/lib/Maypole/CLI.pm @@ -25,6 +25,12 @@ sub parse_location { $self->{path} = $url->path; $self->{path} =~ s/^$root//i if $root; $self->parse_path; + $self->parse_args; +} + +sub parse_args { + my $self = shift; + $self->{params} = $url->query_form_hash; $self->{query} = $url->query_form_hash; } -- 2.39.5