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

sartak at bestpractical.com sartak at bestpractical.com
Mon Aug 25 16:13:20 EDT 2008


Author: sartak
Date: Mon Aug 25 16:13:18 2008
New Revision: 15438

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

Log:
 r70294 at onn:  sartak | 2008-08-25 14:54:17 -0400
 Misc cleanup


Modified: Path-Dispatcher/trunk/lib/Path/Dispatcher.pm
==============================================================================
--- Path-Dispatcher/trunk/lib/Path/Dispatcher.pm	(original)
+++ Path-Dispatcher/trunk/lib/Path/Dispatcher.pm	Mon Aug 25 16:13:18 2008
@@ -90,9 +90,7 @@
                 result => $vars,
             );
 
-            if ($stage->match_ends_stage) {
-                next STAGE;
-            }
+            next STAGE if $stage->match_ends_stage;
         }
 
         $dispatch->add_redispatch($self->redispatch($path))
@@ -108,11 +106,7 @@
     return $dispatch;
 }
 
-sub can_redispatch {
-    my $self = shift;
-
-    return $self->has_super_dispatcher;
-}
+sub can_redispatch { shift->has_super_dispatcher }
 
 sub redispatch {
     my $self = shift;
@@ -132,7 +126,7 @@
 }
 
 sub begin_stage {}
-sub end_stage {}
+sub end_stage   {}
 
 # We don't export anything, so if they request something, then try to error
 # helpfully

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	Mon Aug 25 16:13:18 2008
@@ -1,8 +1,10 @@
 #!/usr/bin/env perl
 package Path::Dispatcher::Dispatch;
 use Moose;
+use MooseX::AttributeHelpers;
 
 use Path::Dispatcher::Dispatch::Match;
+
 sub match_class { 'Path::Dispatcher::Dispatch::Match' }
 
 has _matches => (
@@ -13,6 +15,7 @@
     provides  => {
         push     => '_add_match',
         elements => 'matches',
+        count    => 'has_matches',
     },
 );
 

Modified: Path-Dispatcher/trunk/lib/Path/Dispatcher/Stage.pm
==============================================================================
--- Path-Dispatcher/trunk/lib/Path/Dispatcher/Stage.pm	(original)
+++ Path-Dispatcher/trunk/lib/Path/Dispatcher/Stage.pm	Mon Aug 25 16:13:18 2008
@@ -1,6 +1,7 @@
 #!/usr/bin/env perl
 package Path::Dispatcher::Stage;
 use Moose;
+use MooseX::AttributeHelpers;
 
 use Path::Dispatcher::Rule;
 



More information about the Bps-public-commit mailing list