[Bps-public-commit] Path-Dispatcher branch, master, updated. 54969918119ff65f78f92cc868a657e072d19a56

sartak at bestpractical.com sartak at bestpractical.com
Fri Mar 6 22:29:26 EST 2009


The branch, master has been updated
       via  54969918119ff65f78f92cc868a657e072d19a56 (commit)
      from  c993c7890efb0611f77495c8b0aad74777a0cbfd (commit)

Summary of changes:
 lib/Path/Dispatcher/Builder.pm     |    7 +++----
 lib/Path/Dispatcher/Declarative.pm |    3 +--
 2 files changed, 4 insertions(+), 6 deletions(-)

- Log -----------------------------------------------------------------
commit 54969918119ff65f78f92cc868a657e072d19a56
Author: Shawn M Moore <sartak at gmail.com>
Date:   Fri Mar 6 22:29:19 2009 -0500

    More simplifications

diff --git a/lib/Path/Dispatcher/Builder.pm b/lib/Path/Dispatcher/Builder.pm
index 7afe38f..2eb563a 100644
--- a/lib/Path/Dispatcher/Builder.pm
+++ b/lib/Path/Dispatcher/Builder.pm
@@ -13,13 +13,13 @@ has dispatcher => (
 
 has case_sensitive_tokens => (
     is          => 'rw',
-    isa         => 'Bool|CodeRef',
+    isa         => 'Bool',
     default     => 0,
 );
 
 has token_delimiter => (
     is          => 'rw',
-    isa         => 'Str|CodeRef',
+    isa         => 'Str',
     default     => ' ',
 );
 
@@ -125,12 +125,11 @@ sub redispatch_to {
 my %rule_creators = (
     ARRAY => sub {
         my ($self, $tokens, $block) = @_;
-        my $case_sensitive = $self->case_sensitive_tokens;
 
         Path::Dispatcher::Rule::Tokens->new(
             tokens => $tokens,
             delimiter => $self->token_delimiter,
-            defined $case_sensitive ? (case_sensitive => $case_sensitive) : (),
+            case_sensitive => $self->case_sensitive_tokens,
             $block ? (block => $block) : (),
         ),
     },
diff --git a/lib/Path/Dispatcher/Declarative.pm b/lib/Path/Dispatcher/Declarative.pm
index e4857e9..7539a72 100644
--- a/lib/Path/Dispatcher/Declarative.pm
+++ b/lib/Path/Dispatcher/Declarative.pm
@@ -3,12 +3,11 @@ use strict;
 use warnings;
 use Path::Dispatcher;
 use Path::Dispatcher::Builder;
+use Sub::Exporter;
 
 use constant dispatcher_class => 'Path::Dispatcher';
 use constant builder_class => 'Path::Dispatcher::Builder';
 
-use Sub::Exporter;
-
 our $CALLER; # Sub::Exporter doesn't make this available
 
 my $exporter = Sub::Exporter::build_exporter({

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list