Re: simpler replacement for <%shared>

Jonathan Swartz <[email protected]>
Newsgroups gmane.comp.web.mason.devel
Message-ID <[email protected]>
>>
>>Hm. These are just regular variables, not arguments. Doesn't
>>'request_args' make it sound like they'll be taken from arguments passed
>>to the component?
> 
> 
> Oh, that was my assumption, actually.  I thought this was the much
> discussed "shared args block".  So if I wanted to access args passed to
> the comp it'd look like this:
> 
>   <%request_vars>
>    $foo => $m->caller_args(0)->{foo}
>   </%request_vars>
> 
> ?

Yes, unfortunately, this doesn't solve the "shared args block" problem, 
it just provides a better way to create shared request-lifetime 
variables. You would have to do the above or

    $foo = $ARGS{foo}

in the appropriate subcomponent. Actually the latter may be better 
because it makes it clear which subcomponent is providing the value.

Jon



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.