[Jifty-commit] jifty branch, master, updated. 1.10518-19-g7c8e4ee

Jifty commits jifty-commit at lists.jifty.org
Fri Jun 3 14:57:25 EDT 2011


The branch, master has been updated
       via  7c8e4ee5d32f2eb6155726b24c453eac6474eea3 (commit)
       via  9b3e9ee9ca3c0c318a1edeabce3ca9d72d54d837 (commit)
      from  eea889ac72061dec408935285f5bc2e8691df70a (commit)

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

- Log -----------------------------------------------------------------
commit 9b3e9ee9ca3c0c318a1edeabce3ca9d72d54d837
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Fri Jun 3 14:55:28 2011 -0400

    Include the user-written condition in debug messages
    
    This aids debugging since developers get both the condition they wrote
    and then regex that the dispatcher generates.  It eliminates the need to
    decipher the generated rule and work backwards to your rules.

diff --git a/lib/Jifty/Dispatcher.pm b/lib/Jifty/Dispatcher.pm
index f4ec962..9c37d86 100644
--- a/lib/Jifty/Dispatcher.pm
+++ b/lib/Jifty/Dispatcher.pm
@@ -650,7 +650,7 @@ sub _do_before {
     my ( $self, $cond, $rules ) = @_;
     if ( my $regex = $self->_match($cond) ) {
 
-        $self->log->debug("Matched 'before' rule $regex for ".$self->{'path'});
+        $self->log->debug("Matched 'before' rule $cond as $regex for ".$self->{'path'});
         # match again to establish $1 $2 etc in the dynamic scope
         $self->{path} =~ $regex;
         $self->_handle_rules($rules);
@@ -668,7 +668,7 @@ sub _do_on {
     my ( $self, $cond, $rules ) = @_;
     if ( my $regex = $self->_match($cond) ) {
 
-        $self->log->debug("Matched 'on' rule $regex for ".$self->{'path'});
+        $self->log->debug("Matched 'on' rule $cond as $regex for ".$self->{'path'});
         # match again to establish $1 $2 etc in the dynamic scope
         $self->{path} =~ $regex;
         $self->_handle_rules($rules);
@@ -684,7 +684,7 @@ This method is called by the dispatcher internally. You shouldn't need to.
 sub _do_after {
     my ( $self, $cond, $rules ) = @_;
     if ( my $regex = $self->_match($cond) ) {
-        $self->log->debug("Matched 'after' rule $regex for ".$self->{'path'});
+        $self->log->debug("Matched 'after' rule $cond as $regex for ".$self->{'path'});
         # match again to establish $1 $2 etc in the dynamic scope
         $self->{path} =~ $regex;
         $self->_handle_rules($rules);

commit 7c8e4ee5d32f2eb6155726b24c453eac6474eea3
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Fri Jun 3 14:57:02 2011 -0400

    Log a debug message for under similar to before, on, and after

diff --git a/lib/Jifty/Dispatcher.pm b/lib/Jifty/Dispatcher.pm
index 9c37d86..20f42ff 100644
--- a/lib/Jifty/Dispatcher.pm
+++ b/lib/Jifty/Dispatcher.pm
@@ -616,6 +616,7 @@ sub _do_under {
     my ( $self, $cond, $rules ) = @_;
     if ( my $regex = $self->_match($cond) ) {
 
+        $self->log->debug("Matched 'under' rule $cond as $regex for ".$self->{'path'});
         # match again to establish $1 $2 etc in the dynamic scope
         $self->{path} =~ $regex;
 

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


More information about the Jifty-commit mailing list