[Jifty-commit] r2926 - in Jifty-DBI/trunk: lib/Jifty/DBI

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Thu Mar 8 17:38:30 EST 2007


Author: jesse
Date: Thu Mar  8 17:38:29 2007
New Revision: 2926

Modified:
   Jifty-DBI/trunk/   (props changed)
   Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm

Log:
 r53222 at 247:  jesse | 2007-03-08 17:38:09 -0500
 * consistent return values are good. arrayref of array != arrayref of arrayref


Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm	(original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm	Thu Mar  8 17:38:29 2007
@@ -1390,7 +1390,7 @@
         return ( 1, 'Validation ok' );
     }
     else {
-        return @{$results->[-1]};
+        return (@{ $results->[-1]});
     }
     
 }
@@ -1418,11 +1418,15 @@
     my $method = $args{'name'};
     my @results;
     if ( my $func = $self->can($method) ) {
-   @results =  $func->($self, $args{args} );
-        return(wantarray  ?  (undef, [@results]) : undef) unless $results[0];
+        @results = $func->( $self, $args{args} );
+        return ( wantarray ? ( undef, [[@results]] ) : undef )
+            unless $results[0];
     }
-    $ret =  $self->call_trigger( $args{'name'} => $args{args} );
-    return (wantarray ? ($ret, [[@results],@{$self->last_trigger_results}]) : $ret);
+    $ret = $self->call_trigger( $args{'name'} => $args{args} );
+    return (
+        wantarray
+        ? ( $ret, [ [@results], @{ $self->last_trigger_results } ] )
+        : $ret );
 }
 
 1;


More information about the Jifty-commit mailing list