From f94c2679992bf0db0b360a0a475b3e646466aee0 Mon Sep 17 00:00:00 2001 From: Aaron Trevena Date: Wed, 12 Apr 2006 14:30:13 +0000 Subject: [PATCH] components now work git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@476 48953598-375a-da11-a14b-00016c27c3ee --- lib/Maypole.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/Maypole.pm b/lib/Maypole.pm index 59b5197..83607c8 100644 --- a/lib/Maypole.pm +++ b/lib/Maypole.pm @@ -481,19 +481,24 @@ request. You'll need to set up actions and templates which return fragments of HTML rather than entire pages, but once you've done that, you can use the C method of the Maypole request object to call those actions. You may pass a query string in the usual URL style. + You should not fully qualify the Maypole URLs. +Note: any HTTP POST or URL parameters passed to the parent are not passed to the +component sub-request, only what is included in the url passed as an argyument +to the method + =cut sub component { my ( $r, $path ) = @_; - my $self = bless { parent => $r, config => $r->{config} }, ref $r; + my $self = bless { parent => $r, config => $r->{config}, template_args => {}, }, ref $r; + $self->get_user; my $url = URI->new($path); warn "path : $path\n"; $self->{path} = $url->path; $self->parse_path; $self->params( $url->query_form_hash ); - $self->query( $r->params ); $self->handler_guts; return $self->output; } -- 2.39.5