From: Simon Cozens <simon@simon-cozens.org>
Date: Sat, 24 Jan 2004 17:59:23 +0000 (+0000)
Subject: Allow template_args to add to and override template aguments.
X-Git-Tag: 2.10~348
X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=8781ed7d1abaaaee165a8fc8489427f997e656fb;p=maypole.git

Allow template_args to add to and override template aguments.


git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@14 48953598-375a-da11-a14b-00016c27c3ee
---

diff --git a/lib/Apache/MVC/View/TT.pm b/lib/Apache/MVC/View/TT.pm
index 368c3ec..e2a1504 100644
--- a/lib/Apache/MVC/View/TT.pm
+++ b/lib/Apache/MVC/View/TT.pm
@@ -45,6 +45,9 @@ sub _args {
     } else {
         ($args{$r->model_class->moniker}) = @{$r->objects};
     }
+
+    # Overrides
+    %args = (%args, %{$r->{template_args}||{}});
     %args;
 }