Created
June 8, 2012 03:24
-
-
Save ktat/2893362 to your computer and use it in GitHub Desktop.
DBIx::QueryLog add_skip_packages patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/DBIx/QueryLog.pm b/lib/DBIx/QueryLog.pm | |
index 747cdd5..cf5e379 100644 | |
--- a/lib/DBIx/QueryLog.pm | |
+++ b/lib/DBIx/QueryLog.pm | |
@@ -8,6 +8,7 @@ use DBI; | |
use Time::HiRes qw(gettimeofday tv_interval); | |
use Term::ANSIColor qw(colored); | |
use Data::Dumper (); | |
+use Module::Find (); | |
$ENV{ANSI_COLORS_DISABLED} = 1 if $^O eq 'MSWin32'; | |
@@ -90,6 +91,14 @@ for my $accessor (qw{ | |
}; | |
} | |
+sub add_skip_packages { | |
+ my ($self, @modules) = @_; | |
+ %SKIP_PKG_MAP = ( | |
+ (map {$_ => 1, map {$_ => 1} Module::Find::findallmod($_) } @modules), | |
+ %SKIP_PKG_MAP, | |
+ ); | |
+} | |
+ | |
sub _st_execute { | |
my ($class, $org) = @_; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment