[Rt-commit] r7051 - rt/branches/3.6-RELEASE/lib/RT

ruz at bestpractical.com ruz at bestpractical.com
Thu Feb 22 18:37:12 EST 2007


Author: ruz
Date: Thu Feb 22 18:37:12 2007
New Revision: 7051

Modified:
   rt/branches/3.6-RELEASE/lib/RT/Template_Overlay.pm

Log:
* use local during filling the T:: namespace for a template processing,
  otherwise we have a global reference to a ticket and destruction is
  delayed which hurts TransactionBatch stage

Modified: rt/branches/3.6-RELEASE/lib/RT/Template_Overlay.pm
==============================================================================
--- rt/branches/3.6-RELEASE/lib/RT/Template_Overlay.pm	(original)
+++ rt/branches/3.6-RELEASE/lib/RT/Template_Overlay.pm	Thu Feb 22 18:37:12 2007
@@ -360,12 +360,12 @@
     );
 
     no warnings 'redefine';
-    $T::Ticket      = $args{'TicketObj'};
-    $T::Transaction = $args{'TransactionObj'};
-    $T::Argument    = $args{'Argument'};
-    $T::Requestor   = eval { $T::Ticket->Requestors->UserMembersObj->First->Name };
-    $T::rtname      = $RT::rtname;
-    *T::loc         = sub { $T::Ticket->loc(@_) };
+    local $T::Ticket      = $args{'TicketObj'};
+    local $T::Transaction = $args{'TransactionObj'};
+    local $T::Argument    = $args{'Argument'};
+    local $T::Requestor   = eval { $T::Ticket->Requestors->UserMembersObj->First->Name };
+    local $T::rtname      = $RT::rtname;
+    local *T::loc         = sub { $T::Ticket->loc(@_) };
 
     my $content = $self->Content;
     unless ( defined $content ) {


More information about the Rt-commit mailing list