]> git.decadent.org.uk Git - maypole.git/commitdiff
only set $r->objects if there is an object
authorSimon Cozens <simon@simon-cozens.org>
Thu, 30 Dec 2004 03:36:51 +0000 (03:36 +0000)
committerSimon Cozens <simon@simon-cozens.org>
Thu, 30 Dec 2004 03:36:51 +0000 (03:36 +0000)
git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@331 48953598-375a-da11-a14b-00016c27c3ee

Changes
META.yml
lib/Maypole/Model/Base.pm

diff --git a/Changes b/Changes
index 1af0f4c5d30aad92d2e8ded54ec400f29780c461..e81f2fab99b6324f14cc9cd0602b3fd7c5321399 100644 (file)
--- a/Changes
+++ b/Changes
@@ -2,6 +2,11 @@ This file documents the revision history for Perl extension Maypole.
 For information about current developments and future releases, see:
     http://maypole.perl.org/?TheRoadmap
 
+2.0X  XXX
+    Fixes:
+    - Model->process() shouldn't set $r->objects() to a list with a single,
+      undefined element
+
 2.06  Wed Dec 29 01:30:00 2004
     Fixes:
     - Minor restructuring of the manual so search.cpan.org indexes it better
index 3d80d753a4ab00a0bfeaaddbddd15f99aac21365..5b5ce58ec4e4c626990fb83f122c18a91bad851b 100644 (file)
--- a/META.yml
+++ b/META.yml
@@ -1,7 +1,7 @@
 # http://module-build.sourceforge.net/META-spec.html
 #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         Maypole
-version:      2.05
+version:      2.06
 version_from: lib/Maypole.pm
 installdirs:  site
 requires:
index 6fc70e6a4d6bc64377ce5c41627cf183b445103a..3375dfd26fba523b126e784c93e32a9779b8cfb6 100644 (file)
@@ -15,7 +15,8 @@ sub process {
     return if $r->{template};    # Authentication has set this, we're done.
 
     $r->{template} = $method;
-    $r->objects([ $class->fetch_objects($r) ]);
+    my $obj = $class->fetch_objects($r);
+    $r->objects([$obj]) if $obj;
     $class->$method( $r, $obj, @{ $r->{args} } );
 }