Re: Delayed output generation feature?
Dave Rolsky <[email protected]>
| Newsgroups | gmane.comp.web.mason.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 27 Jan 2005, Alex Robinson wrote: >>>>> > <html> > <head> > <& /lib/javascript_links.mas &> > </head> > ... > <% $output %> > ... > </html> > <%init> > my $output = $m->call_next(); > </%init> > <<<< I assume you mean something like: my $output = $m->scomp( $m->fetch_next ); > Is there anything that delayed_output would add that this simple use of > existing functionality doesn't? I can't think of anything. There's something slightly distasteful to me about generating the content out of order, but that's really not that different from delaying some content the way I proposed, and it's simpler. > As for the previously mentioned $m->placeholder mechanism, doesn't $m->notes > essentially fill that gap? Well, I'm not sure I understand Jon's original idea for placeholders 100%, but I think you're correct. > Now the way I've implemented it is definitely not the fastest. However it > does make life easier and quicker for me as a designer/javascript/css wonk. I don't think your method should have any significant speed impact. By default, Mason buffers all output anyway. What you're doing is buffering some portion of the output in an autohandler. -dave /*=================================================== VegGuide.Org www.BookIRead.com Your guide to all that's veg. My book blog ===================================================*/ ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl