]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole/View/TT.pm
Miscellaneous fixes.
[maypole.git] / lib / Maypole / View / TT.pm
index 834fcaf5c2d97fefaa934c09e35824a4a0b0b0d9..47999a4692460dc5137c53bbdd8e3d3dd5e223e7 100644 (file)
@@ -12,7 +12,6 @@ sub new { bless {}, shift } # Not worth having
 sub _tt {
     my ($self, $r) = @_;
     my $root = $r->{ar}->document_root . "/". $r->{ar}->location;
-    warn "Root was $root";
     Template->new({ INCLUDE_PATH => [
         $root,
         ($r->model_class && File::Spec->catdir($root, $r->model_class->moniker)),
@@ -47,7 +46,7 @@ sub _args {
         if (@{$r->objects || []} > 1) { 
             $args{$r->model_class->plural_moniker} = $r->objects;
         } else {
-            ($args{$r->model_class->moniker}) = @{$r->objects};
+            ($args{$r->model_class->moniker}) = @{$r->objects ||[]};
         }
     }