On Wed, 17 Jan 2007, Mark Elrod wrote:

> I am sorry this took so long to get around to providing a test case.
> It is pretty simple actually:
>
> I access a page /index.html?foo=bar which has args like:
>
> <%args>
> $foo
> </%args>
>
> and I have an /autohandler that does this:
>
> <& /include/body.html &>
>
> and then inside /include/body.html do this:
>
> $m->call_next;
>
> The /index.html page does not see the args and I get:
>
> Error: no value sent for required parameter 'foo'
>
> If I replace the component call <& /include/body.html &> in
> autohandler with a direct call to $m->call_next; then it works.

I think the fact that $m->call_next() works in this case is somewhat of a 
fluke of the implementation.

At least in my mental model, call_next() should only work as documented 
when called from a component in the autohandler chain. The fact that it 
works in your case is an implementation detail. And that same 
implementation detail is what means you don't get the arguments 
"auto-passed".

Or to explain it another way, call_next() passes along the arguments 
passed _to_ the component in which call_next() executes. In the scenario 
you describe, it's doing exactly that.


-dave

/*===================================================
VegGuide.Org                        www.BookIRead.com
Your guide to all that's veg.       My book blog
===================================================*/

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to