1 package Maypole::Components;
7 our @ISA = qw(Maypole);
11 my $self = bless { config => $r->config, parent => $r }, $class;
17 my $url = URI->new($path);
18 $self->{path} = $url->path;
20 $self->{query} = $url->query_form_hash;
22 return $self->{output};
25 sub get_template_root { shift->{parent}->get_template_root }
26 sub view_object { shift->{parent}->view_object }
33 Maypole::Components - Run Maypole sub-requests as components
42 [% request.component("/beer/view_as_component/20") %]
46 This subclass of Maypole allows you to integrate the results of a Maypole
47 request into an existing request. You'll need to set up actions and templates
48 which return fragments of HTML rather than entire pages, but once you've
49 done that, you can use the C<component> method of the Maypole request object
50 to call those actions. You may pass a query string in the usual URL style.
51 You should not fully qualify the Maypole URLs.
55 http://maypole.perl.org/
59 Simon Cozens, E<lt>simon@cpan.orgE<gt>
61 =head1 COPYRIGHT AND LICENSE
63 Copyright 2004 by Simon Cozens