[Bps-public-commit] r16614 - in Path-Dispatcher/trunk: lib/Path lib/Path/Dispatcher

sartak at bestpractical.com sartak at bestpractical.com
Wed Oct 29 21:01:00 EDT 2008


Author: sartak
Date: Wed Oct 29 21:01:00 2008
New Revision: 16614

Modified:
   Path-Dispatcher/trunk/   (props changed)
   Path-Dispatcher/trunk/lib/Path/Dispatcher.pm
   Path-Dispatcher/trunk/lib/Path/Dispatcher/Match.pm

Log:
 r74842 at onn:  sartak | 2008-10-29 20:59:56 -0400
 Pass through return values


Modified: Path-Dispatcher/trunk/lib/Path/Dispatcher.pm
==============================================================================
--- Path-Dispatcher/trunk/lib/Path/Dispatcher.pm	(original)
+++ Path-Dispatcher/trunk/lib/Path/Dispatcher.pm	Wed Oct 29 21:01:00 2008
@@ -68,9 +68,7 @@
     my $path = shift;
     my $dispatch = $self->dispatch($path);
 
-    $dispatch->run(@_);
-
-    return;
+    return $dispatch->run(@_);
 }
 
 # We don't export anything, so if they request something, then try to error

Modified: Path-Dispatcher/trunk/lib/Path/Dispatcher/Match.pm
==============================================================================
--- Path-Dispatcher/trunk/lib/Path/Dispatcher/Match.pm	(original)
+++ Path-Dispatcher/trunk/lib/Path/Dispatcher/Match.pm	Wed Oct 29 21:01:00 2008
@@ -39,14 +39,13 @@
     local $_ = $self->path;
 
     if ($self->set_number_vars) {
-        $self->run_with_number_vars(
+        return $self->run_with_number_vars(
             sub { $self->rule->run(@args) },
             @{ $self->result },
         );
     }
-    else {
-        $self->rule->run(@args);
-    }
+
+    return $self->rule->run(@args);
 }
 
 sub run_with_number_vars {



More information about the Bps-public-commit mailing list