I'll get the fix committed.
In the meantime, here's a patch which will fix the problem for you.
~ John Williams
Index: lib/HTML/Mason/Request.pm
===================================================================
--- lib/HTML/Mason/Request.pm (revision 3766)
+++ lib/HTML/Mason/Request.pm (working copy)
@@ -912,7 +912,7 @@
my ($self,@extra_args) = @_;
my $comp = $self->fetch_next
or error "call_next: no next component to invoke";
- return $self->comp($comp, @{$self->current_args}, @extra_args);
+ return $self->comp({base_comp=>$self->request_comp}, $comp,
@{$self->current_args}, @extra_args);
}
sub caller
On Sun, 25 Jun 2006, Mark Elrod wrote:
> Do I need to enter a bug report for this? Is there a bugzilla for mason?
>
> elrod
>
> On 6/22/06, John Williams <[EMAIL PROTECTED]> wrote:
> > On Wed, 21 Jun 2006, Mark Elrod wrote:
> >
> > > For instance if I access a page /foo/bar/baz.html which has a a call
> > > as defined above and I have an /autohandler that does this:
> > >
> > > <& /include/body.html &>
> > >
> > > and then inside /include/body.html do this:
> > >
> > > $m->call_next;
> > >
> > > The /foo/bar/baz.html component is called eventually but then causes
> > > an error because SELF:method resolves to /include/body.html:method
> > > rather than /foo/bar/baz.html:method which is what I would expect.
> >
> > The problem is that $m->call_next is not resetting the base_comp,
> > because internally, it does $m->comp($m->fetch_next) which is equivalent
> > to the work-around to avoid changing the base_comp. Using $m->call_next
> > from outside the autohandler is not very common, but it is something we
> > explicitly support.
> >
> > So I think that $m->call_next should be fixed to reset base_comp to
> > request_comp each time it is called.
> >
> > Jon, Dave, do you agree?
> >
> > ~ John Williams
> >
> >
> >
>
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Mason-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mason-users
>
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users