-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.perldb
56 lines (48 loc) · 1.27 KB
/
.perldb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# vim: syntax=perl
$DB::deep = 5000;
my $skip;
my @classes;
BEGIN {
@classes = sort (
'Catalyst',
'Moo',
'Moose',
'DateTime::Format',
'DBIx::Class',
'Eval::Closure',
'Eval::TypeTiny',
'Module::Runtime',
'Class::MOP',
'Attribute::Handlers',
'SQL::Abstract',
'Test::',
'Try::Tiny',
'mro',
'Class::Accessor',
'Test2',
'Test2::API',
'Sub::Quote'
);
# show the location of the debugger. This is useful if they're using a custom debugger.
my $debugger = $INC{'perl5db.pl'} || die 'PANIC: debugger not found in %INC!';
print "\nUsing debugger '$debugger'\n";
if ( $ENV{DB_ALLOW} ) {
if ( ':all' eq $ENV{DB_ALLOW} ) {
@classes = ();
}
else {
@classes = grep { !/$ENV{DB_ALLOW}/ } @classes;
}
}
my $classes = join "\n " => @classes;
my $re = join '|' => @classes;
$skip = "^(?:$re)";
print STDERR <<"END" unless $ENV{NO_DB_SKIP};
Debugger skipping:
$classes
See ~/.perldb if you don't like this behavior, or set NO_DB_SKIP=1
END
}
unless ( $ENV{NO_DB_SKIP} ) {
eval "use DB::Skip pkgs => [qr/$skip/]" if @classes;
}