[Bps-public-commit] RT-Extension-MergeUsers branch, master, updated. 0.08-5-g354edf0
Alex Vandiver
alexmv at bestpractical.com
Tue Mar 12 16:19:21 EDT 2013
The branch, master has been updated
via 354edf0b420ce024b0abb6d87445762509d8a95f (commit)
from b13c434086b68286bc2da0e3602fa302573951f0 (commit)
Summary of changes:
META.yml | 1 -
Makefile.PL | 1 -
lib/RT/Extension/MergeUsers.pm | 17 +++++++++++------
3 files changed, 11 insertions(+), 8 deletions(-)
- Log -----------------------------------------------------------------
commit 354edf0b420ce024b0abb6d87445762509d8a95f
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Tue Mar 12 16:10:00 2013 -0400
Remove Hook::LexWrap, and replace with a simpler glob manipulation
Hook::LexWrap is unnecessary: the wrapping being done was not lexical,
and it was not being used for its abilities to alter return or argument
values. Remove it, as using it anywhere causes _all_ stack traces to
lack argument values at all levels of the stacktrace.
diff --git a/META.yml b/META.yml
index 80cb0a3..3ff80e3 100644
--- a/META.yml
+++ b/META.yml
@@ -20,7 +20,6 @@ no_index:
- inc
- xt
requires:
- Hook::LexWrap: 0
perl: 5.8.3
resources:
license: http://opensource.org/licenses/gpl-license.php
diff --git a/Makefile.PL b/Makefile.PL
index 376db08..c9f52ce 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -4,7 +4,6 @@ RTx('RT-Extension-MergeUsers');
all_from ('lib/RT/Extension/MergeUsers.pm');
readme_from ('lib/RT/Extension/MergeUsers.pm');
-requires ('Hook::LexWrap');
requires_rt('3.8.3');
my ($lib_path) = $INC{'RT.pm'} =~ /^(.*)[\\\/]/;
diff --git a/lib/RT/Extension/MergeUsers.pm b/lib/RT/Extension/MergeUsers.pm
index 707ce09..b0a8953 100644
--- a/lib/RT/Extension/MergeUsers.pm
+++ b/lib/RT/Extension/MergeUsers.pm
@@ -102,13 +102,18 @@ package RT::User;
our %EFFECTIVE_ID_CACHE;
use RT::Interface::Web::Handler;
-use Hook::LexWrap;
-{ my $i = 0;
-wrap 'RT::Interface::Web::Handler::CleanupRequest', post => sub {
- return if ++$i%100; # flush cache every N requests
- %EFFECTIVE_ID_CACHE = ();
-}; }
+{
+ my $i = 0;
+
+ my $old_cleanup = \&RT::Interface::Web::Handler::CleanupRequest;
+ no warnings 'redefine';
+ *RT::Interface::Web::Handler::CleanupRequest = sub {
+ $old_cleanup->(@_);
+ return if ++$i % 100; # flush cache every N requests
+ %EFFECTIVE_ID_CACHE = ();
+ };
+}
sub CanonicalizeEmailAddress {
my $self = shift;
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list