From: Aaron Trevena Date: Wed, 11 Jan 2006 17:45:39 +0000 (+0000) Subject: fixing Components integration X-Git-Tag: 2.11~70 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=5a2a936da63a8463429f3cd486104d5410e73c04;p=maypole.git fixing Components integration git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@448 48953598-375a-da11-a14b-00016c27c3ee --- diff --git a/lib/Maypole.pm b/lib/Maypole.pm index 2f609d8..3fcfd15 100644 --- a/lib/Maypole.pm +++ b/lib/Maypole.pm @@ -457,8 +457,9 @@ sub handler : method { } sub component { + my ($r,$path) = @_; my $component = Maypole::Components->new(@_); - return $component->handler; + return $component->handler($path); } diff --git a/lib/Maypole/Components.pm b/lib/Maypole/Components.pm index b679e8d..48c54c7 100644 --- a/lib/Maypole/Components.pm +++ b/lib/Maypole/Components.pm @@ -6,12 +6,13 @@ use URI; use URI::QueryParam; sub new { - my ($class,$r, $path) = @_; + my ($class,$r) = @_; my $self = bless { config => $r->config, parent => $r }, $class; } sub handler { my $self = shift; + my $path = shift; my $url = URI->new($path); $self->{path} = $url->path; $self->parse_path;