[Rt-commit] r7056 - in rt/branches/3.7-EXPERIMENTAL-RTIR-2.2: lib/RT

ruz at bestpractical.com ruz at bestpractical.com
Thu Feb 22 18:57:25 EST 2007


Author: ruz
Date: Thu Feb 22 18:57:25 2007
New Revision: 7056

Modified:
   rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/   (props changed)
   rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/lib/RT/Template_Overlay.pm

Log:
 r4610 at cubic-pc (orig r7051):  ruz | 2007-02-23 02:37:12 +0300
 * 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.7-EXPERIMENTAL-RTIR-2.2/lib/RT/Template_Overlay.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/lib/RT/Template_Overlay.pm	(original)
+++ rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/lib/RT/Template_Overlay.pm	Thu Feb 22 18:57:25 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->Config->Get('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->Config->Get('rtname');
+    local *T::loc         = sub { $T::Ticket->loc(@_) };
 
     my $content = $self->Content;
     unless ( defined $content ) {


More information about the Rt-commit mailing list