]> git.decadent.org.uk Git - maypole.git/commitdiff
fixes parse_args function
authorMarcus Ramberg <mramberg@cpan.org>
Tue, 14 Sep 2004 17:40:28 +0000 (17:40 +0000)
committerMarcus Ramberg <mramberg@cpan.org>
Tue, 14 Sep 2004 17:40:28 +0000 (17:40 +0000)
adds call_url to easen testing.

git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@174 48953598-375a-da11-a14b-00016c27c3ee

lib/Maypole/CLI.pm

index 9f65c7c0b747c66c3e8612b2dd0b2011ee2fd93a..b08aab17fe838b17171b2e725ea6b5b8f2000435 100644 (file)
@@ -25,17 +25,22 @@ sub parse_location {
     $self->{path} = $url->path;
     $self->{path} =~ s/^$root//i if $root;
     $self->parse_path;
-    $self->parse_args;
+    $self->parse_args($url);
 }
 
 sub parse_args {
-    my $self = shift;
+    my ($self,$url) = @_;
     $self->{params} = $url->query_form_hash;
     $self->{query} = $url->query_form_hash;
 }
 
 sub send_output { $buffer = shift->{output} }
 
+sub call_url {
+       my $self =shift;
+       @ARGV=@_;
+    $package->handler() == OK and return $buffer; 
+}
 # Do it!
 CHECK { if ((caller(0))[1] eq "-e") { 
             $package->handler() == OK and print $buffer;