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

sartak at bestpractical.com sartak at bestpractical.com
Fri Mar 6 22:12:14 EST 2009


The branch, master has been updated
       via  c2ed0ef91bf0e3aa996bccb9f21342e3216dda3e (commit)
      from  b4b6fb564222823f7f4ecb91c9f414c3b05f3040 (commit)

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

- Log -----------------------------------------------------------------
commit c2ed0ef91bf0e3aa996bccb9f21342e3216dda3e
Author: Shawn M Moore <sartak at gmail.com>
Date:   Fri Mar 6 22:11:54 2009 -0500

    Factor out the builder class

diff --git a/lib/Path/Dispatcher/Declarative.pm b/lib/Path/Dispatcher/Declarative.pm
index af490ab..cb3b33c 100644
--- a/lib/Path/Dispatcher/Declarative.pm
+++ b/lib/Path/Dispatcher/Declarative.pm
@@ -4,6 +4,8 @@ use warnings;
 use Path::Dispatcher;
 use Path::Dispatcher::Builder;
 
+use constant builder_class => 'Path::Dispatcher::Builder';
+
 use Sub::Exporter;
 
 our $CALLER; # Sub::Exporter doesn't make this available
@@ -45,7 +47,7 @@ sub build_sugar {
 #    my $dispatcher = Path::Dispatcher->new(
 #        name => $into,
 #    );
-#    my $builder = Path::Dispatcher::Builder->new(
+#    my $builder = $class->builder_class->new(
 #        token_delimiter => sub { $into->token_delimiter },
 #        case_sensitive_tokens => sub { $into->case_sensitive_tokens },
 #        dispatcher => $dispatcher,
@@ -59,7 +61,7 @@ sub build_sugar {
         $dispatcher = Path::Dispatcher->new(
             name => $into,
         );
-        $builder = Path::Dispatcher::Builder->new(
+        $builder = $class->builder_class->new(
             token_delimiter => $into->token_delimiter,
             case_sensitive_tokens => $into->case_sensitive_tokens,
             dispatcher => $dispatcher,

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



More information about the Bps-public-commit mailing list