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

sartak at bestpractical.com sartak at bestpractical.com
Wed Aug 27 10:59:09 EDT 2008


Author: sartak
Date: Wed Aug 27 10:59:09 2008
New Revision: 15525

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

Log:
 r70523 at onn:  sartak | 2008-08-27 10:58:05 -0400
 Minor code cleanup


Modified: Path-Dispatcher/trunk/lib/Path/Dispatcher.pm
==============================================================================
--- Path-Dispatcher/trunk/lib/Path/Dispatcher.pm	(original)
+++ Path-Dispatcher/trunk/lib/Path/Dispatcher.pm	Wed Aug 27 10:59:09 2008
@@ -9,12 +9,6 @@
 sub stage_class    { 'Path::Dispatcher::Stage' }
 sub dispatch_class { 'Path::Dispatcher::Dispatch' }
 
-has super_dispatcher => (
-    is        => 'rw',
-    isa       => 'Path::Dispatcher',
-    predicate => 'has_super_dispatcher',
-);
-
 has name => (
     is      => 'rw',
     isa     => 'Str',
@@ -34,6 +28,12 @@
     builder    => 'default_stages',
 );
 
+has super_dispatcher => (
+    is        => 'rw',
+    isa       => 'Path::Dispatcher',
+    predicate => 'has_super_dispatcher',
+);
+
 sub default_stages {
     my $self = shift;
     my $stage_class = $self->stage_class;

Modified: Path-Dispatcher/trunk/lib/Path/Dispatcher/Dispatch.pm
==============================================================================
--- Path-Dispatcher/trunk/lib/Path/Dispatcher/Dispatch.pm	(original)
+++ Path-Dispatcher/trunk/lib/Path/Dispatcher/Dispatch.pm	Wed Aug 27 10:59:09 2008
@@ -58,9 +58,8 @@
 
             $match->run(@args);
 
-            if ($match->ends_dispatch($self)) {
-                die "Path::Dispatcher abort\n";
-            }
+            die "Path::Dispatcher abort\n"
+                if $match->ends_dispatch($self);
         };
 
         if ($@) {



More information about the Bps-public-commit mailing list