[Jifty-commit] r628 -

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Sun Feb 26 18:36:18 EST 2006


Author: jesse
Date: Sun Feb 26 18:36:18 2006
New Revision: 628

Modified:
   /   (props changed)
   jifty/trunk/lib/Jifty/Dispatcher.pm

Log:
 r24734 at truegrounds:  jesse | 2006-02-26 15:34:24 -0500
 * Squashing exception handling for explicit checking (for more understandable code).
 * Fixing broken comments uncovered by this.


Modified: jifty/trunk/lib/Jifty/Dispatcher.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Dispatcher.pm	(original)
+++ jifty/trunk/lib/Jifty/Dispatcher.pm	Sun Feb 26 18:36:18 2006
@@ -455,18 +455,17 @@
     my ( $self, $rule ) = @_;
     my ( $op,   @args );
 
-    # Handle the case where $op is a code reference.
-    {
-        local $@;
-        eval { ( $op, @args ) = @$rule };
-        ( $op, @args ) = ( run => $rule ) if $@;
+    # Handle the case where $rule is an array reference.
+    if (ref($rule) eq 'ARRAY') {
+        ( $op, @args ) = @$rule;
+    } else {
+        ( $op, @args ) = ( run => $rule );
     }
 
     # Handle the case where $op is an array.
     my $sub_rules;
-    {
-        local $@;
-        eval { $sub_rules = [ @$op, @args ] };
+    if (ref($op) eq 'ARRAY' ) {
+         $sub_rules = [ @$op, @args ];
     }
 
     if ($sub_rules) {


More information about the Jifty-commit mailing list