]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole/View/Base.pm
fixed error template in TT.pm and possible work around for ->object to work
[maypole.git] / lib / Maypole / View / Base.pm
index 1cc9b2bd8f78a9efc906275991eee2765ffb310e..5a99580e514f01a0c914f677a2b96a8028cfc47a 100644 (file)
@@ -42,10 +42,10 @@ sub vars {
         objects => $r->objects,
         base    => $base,
         config  => $r->config,
-       object  => $r->object,
-
-          # ...
     );
+
+    $args{object} = $r->object if ($r->can('object'));
+
     if ($class) {
         my $classmeta = $r->template_args->{classmetadata} ||= {};
         $classmeta->{name}              ||= $class;