[Jifty-commit] r2049 - jifty/trunk/lib/Jifty

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Sun Oct 22 17:52:54 EDT 2006


Author: audreyt
Date: Sun Oct 22 17:52:54 2006
New Revision: 2049

Modified:
   jifty/trunk/lib/Jifty/Action.pm

Log:
* Jifty::Action - Autoincrement the per-request stash counter for
  the case of looped action creation.

Modified: jifty/trunk/lib/Jifty/Action.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Action.pm	(original)
+++ jifty/trunk/lib/Jifty/Action.pm	Sun Oct 22 17:52:54 2006
@@ -132,8 +132,12 @@
             push @stack, $pkg, $filename, $line;
         }
 
-        $self->moniker('auto-'.md5_hex("@stack"));
-        $self->log->debug("Generating auto-moniker from stack for $self");
+        # Increment the per-request moniker digest counter, for the case of looped action generation
+        my $digest = md5_hex("@stack");
+        my $serial = ++(Jifty->handler->stash->{monikers}{$digest});
+        my $moniker = "auto-$digest-$serial";
+        $self->moniker($moniker);
+        $self->log->debug("Generating moniker $moniker from stack for $self");
     }
     $self->order($args{'order'});
 


More information about the Jifty-commit mailing list