Re: simpler replacement for <%shared>
John Williams <[email protected]>
| Newsgroups | gmane.comp.web.mason.devel |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 28 Sep 2004, Jonathan Swartz wrote: > The main use of the <%shared> section is to declare variables that can > be shared between different parts of a component and that persist for a > single request. > > We can provide almost the same functionality in a simpler, more reliable > way with a restricted block that simply declares one or more shared > request variables. e.g. > <%request_vars> > Beyond implementation simplicity and efficiency, this section has > several advantages over <%shared>: Wild applause. I never liked <%shared> much, although it certainly comes in useful when it's needed. Can you say anything about the implementation? How is it implemented differently from <%shared> variables, or declaring "my $var" inside a <%once> section? > * Mason can automatically cleanup the values of each request var at the > end of the request. Variables declared in <%shared> cannot be > automatically cleaned up and thus often look like leaks. Will it happen even with exceptions and aborts? (unlike <%cleanup>) ~ John Williams ------------------------------------------------------- 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