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

sartak at bestpractical.com sartak at bestpractical.com
Fri Mar 6 23:19:51 EST 2009


The branch, master has been updated
       via  836bc37b35a914279de5441e4a8af05713ddcc8b (commit)
      from  5842379ea3010b6deb831079201809ccd597aeee (commit)

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

- Log -----------------------------------------------------------------
commit 836bc37b35a914279de5441e4a8af05713ddcc8b
Author: Shawn M Moore <sartak at gmail.com>
Date:   Fri Mar 6 23:19:26 2009 -0500

    Be way more lenient in boxing a path - anything that isn't a
    Path::Dispatcher::Path is boxed

diff --git a/lib/Path/Dispatcher.pm b/lib/Path/Dispatcher.pm
index 7b59b1c..6631ab6 100644
--- a/lib/Path/Dispatcher.pm
+++ b/lib/Path/Dispatcher.pm
@@ -28,8 +28,8 @@ sub dispatch {
     my $self = shift;
     my $path = shift;
 
-    # Automatically box string paths
-    if (!ref($path)) {
+    # Automatically box paths
+    unless (blessed($path) && $path->isa('Path::Dispatcher::Rule')) {
         $path = $self->path_class->new(
             path => $path,
         );

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



More information about the Bps-public-commit mailing list