I found that filters are cached and then reused if they are not called
with any args.

The result of that is that if a filter is first called with args and
later called with no args, the filter with the previous args is used.

A patch to fix this bug is provided here, against Context.pm,v 2.19

--- /root/.cpan/build/Template-Toolkit-2.03/lib/Template/Context.pm	Fri Jun 15 16:30:56 2001
+++ /usr/lib/perl5/site_perl/5.005/Template/Context.pm	Thu Jun 28 18:26:19 2001
@@ -210,7 +210,7 @@
 
     # cache FILTER if alias is valid
     $self->{ FILTER_CACHE }->{ $alias } = $filter
-	if $alias;
+	if $alias and !$args;
 
     return $filter;
 }

-- 
/ Jonas  -  http://jonas.liljegren.org/myself/en/index.html

Reply via email to