Skip to content
Browse files

Exclude DBICTest namespace from stacktraces

  • Loading branch information...
1 parent 552b624 commit 81fecf64c47dd8c31b88e9faeaef000193aed07b @ribasushi ribasushi committed Mar 10, 2013
Showing with 3 additions and 2 deletions.
  1. +2 −2 lib/DBIx/Class/Carp.pm
  2. +1 −0 t/lib/DBICTest/BaseResultSet.pm
View
4 lib/DBIx/Class/Carp.pm
@@ -30,15 +30,15 @@ sub __find_caller {
my $fr_num = 1; # skip us and the calling carp*
my @f;
while (@f = caller($fr_num++)) {
- last if $f[0] !~ $skip_pattern;
-
if (
$f[0]->can('_skip_namespace_frames')
and
my $extra_skip = $f[0]->_skip_namespace_frames
) {
$skip_pattern = qr/$skip_pattern|$extra_skip/;
}
+
+ last if $f[0] !~ $skip_pattern;
}
my ($ln, $calling) = @f # if empty - nothing matched - full stack
View
1 t/lib/DBICTest/BaseResultSet.pm
@@ -8,6 +8,7 @@ use warnings;
use DBICTest::RunMode;
use base 'DBIx::Class::ResultSet';
+__PACKAGE__->_skip_namespace_frames('^DBICTest');
sub all_hri {
return [ shift->search ({}, { result_class => 'DBIx::Class::ResultClass::HashRefInflator' })->all ];

0 comments on commit 81fecf6

Please sign in to comment.
Something went wrong with that request. Please try again.