line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
58712
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
36
|
|
2
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
34
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Devel::hdb; |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
433
|
use Devel::hdb::App; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
41
|
|
7
|
1
|
|
|
1
|
|
334
|
use Devel::hdb::TraceFollow; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
8
|
1
|
|
|
1
|
|
5
|
use IO::Socket::INET; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
9
|
|
9
|
1
|
|
|
1
|
|
419
|
use IO::File; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
357
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = '0.24'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub import { |
14
|
1
|
|
|
1
|
|
10
|
my $class = shift; |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
|
|
1
|
our $TESTHARNESS; |
17
|
1
|
|
|
|
|
2
|
my($trace, $follow); |
18
|
|
|
|
|
|
|
|
19
|
1
|
|
|
|
|
3
|
while (@_) { |
20
|
0
|
|
|
|
|
0
|
my $param = shift; |
21
|
0
|
0
|
|
|
|
0
|
if ($param =~ m/port:(\d+)/) { |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
22
|
0
|
|
|
|
|
0
|
our $PORT = $1; |
23
|
|
|
|
|
|
|
} elsif ($param =~ m/host:([\w.]+)/) { |
24
|
0
|
|
|
|
|
0
|
our $HOST = $1; |
25
|
|
|
|
|
|
|
} elsif ($param eq 'a') { |
26
|
0
|
|
|
|
|
0
|
our $HOST = inet_ntoa(INADDR_ANY); |
27
|
|
|
|
|
|
|
} elsif ($param eq 'testharness') { |
28
|
0
|
|
|
|
|
0
|
$TESTHARNESS = 1; |
29
|
|
|
|
|
|
|
} elsif ($param =~ m/trace:(.*)/) { |
30
|
0
|
|
|
|
|
0
|
$trace = $1; |
31
|
|
|
|
|
|
|
} elsif ($param =~ m/follow:(.*)/) { |
32
|
0
|
|
|
|
|
0
|
$follow = $1; |
33
|
|
|
|
|
|
|
} elsif ($param =~ m/listenfd:(\d+)/) { |
34
|
0
|
|
|
|
|
0
|
our $LISTEN_SOCK = IO::Socket::INET->new(); |
35
|
0
|
|
|
|
|
0
|
$LISTEN_SOCK->fdopen($1, 'r'); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
1
|
|
|
|
|
4
|
my $self = Devel::hdb::App->get(); |
41
|
1
|
50
|
|
|
|
4
|
if ($trace) { |
|
|
50
|
|
|
|
|
|
42
|
0
|
0
|
|
|
|
0
|
print STDERR "Writing execution trace to $trace...\n" unless $TESTHARNESS; |
43
|
0
|
|
|
|
|
0
|
$self->{trace} = Devel::hdb::Trace->new($trace); |
44
|
|
|
|
|
|
|
} elsif ($follow) { |
45
|
|
|
|
|
|
|
$self->{follow} = Devel::hdb::Follow->new( |
46
|
|
|
|
|
|
|
$follow, |
47
|
0
|
|
|
0
|
|
0
|
sub { $self->notify_trace_diff(@_) } |
48
|
0
|
|
|
|
|
0
|
); |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
1
|
|
|
|
|
7
|
$self->attach(); |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
1; |
54
|
|
|
|
|
|
|
__END__ |