[Catalyst] Context sensitive template locations
Matt S Trout
dbix-class at trout.me.uk
Fri Nov 25 17:45:45 CET 2005
On Fri, Nov 25, 2005 at 03:19:48PM +0100, Zbigniew Lukasiak wrote:
> > > sub unshift_paths {
> > > my($self, @paths) = @_;
> > > unshift(@{$self->include_path}, @paths);
> > > }
> >
> > Don't you want to rebuilt the path each time? That looks like a
> > small memory leak
>
> Hmm. The question is where to add the cleaning code. Perhaps to the
> process method? How would this work with subrequests? I cannot see
> other situations when process would be called multiple times in one
> request.
Quite possible not, but the Template object is persistent across requests
for performance. So after 1000 requests you're going to have a 1000
entry include path.
Please read the Catalyst::View::TT source for details.
--
Matt S Trout Specialists in Perl consulting, web development, and
Technical Director UNIX/Linux systems architecture and automation. Mail
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
More information about the Catalyst
mailing list