What an awesome introduction - forgot to attach the patch!


--
Keith Barrette
The Conference Exchange
--- Template-Toolkit-2.19/lib/Template/Stash.pm 2007-04-27 13:56:05.000000000 
-0400
+++ Template-Toolkit-2.19-confex/lib/Template/Stash.pm  2008-07-14 
18:30:08.000000000 -0400
@@ -384,7 +384,7 @@
     my ($self, $root, $item, $args, $lvalue) = @_;
     my $rootref = ref $root;
     my $atroot  = (ref $root && "$root" eq $self);   # stringify $root to 
prevent overload madness
-    my ($value, @result);
+    my ($value, @result, $successfulmethod);
 
     $args ||= [ ];
     $lvalue ||= 0;
@@ -494,6 +494,8 @@
             elsif ($self->{ _DEBUG }) {
                 @result = (undef, $@);
             }
+        } else { 
+            $successfulmethod = !($result[1] && UNIVERSAL::isa($result[1], 
'Template::Exception'));
         }
     }
     elsif (($value = $SCALAR_OPS->{ $item }) && ! $lvalue) {
@@ -515,7 +517,7 @@
     }
 
     # fold multiple return items into a list unless first item is undef
-    if (defined $result[0]) {
+    if (defined $result[0] || $successfulmethod) {
         return                              ## RETURN
         scalar @result > 1 ? [ @result ] : $result[0];
     }
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to