line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package invoker; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
13236
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
23
|
|
4
|
1
|
|
|
1
|
|
13
|
use 5.010_001; |
|
1
|
|
|
|
|
2
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
367
|
use B::Hooks::OP::Check; |
|
1
|
|
|
|
|
1048
|
|
|
1
|
|
|
|
|
25
|
|
7
|
1
|
|
|
1
|
|
350
|
use B::Hooks::EndOfScope; |
|
1
|
|
|
|
|
8093
|
|
|
1
|
|
|
|
|
6
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = "0.29_003"; |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
421
|
use B::Hooks::Parser; |
|
1
|
|
|
|
|
565
|
|
|
1
|
|
|
|
|
302
|
|
12
|
|
|
|
|
|
|
require XSLoader; |
13
|
|
|
|
|
|
|
XSLoader::load(__PACKAGE__, $VERSION); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub import { |
16
|
0
|
|
|
0
|
|
|
my ($class) = @_; |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
|
|
|
my $parser = B::Hooks::Parser::setup(); |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
my $linestr = B::Hooks::Parser::get_linestr(); |
21
|
0
|
|
|
|
|
|
my $offset = B::Hooks::Parser::get_linestr_offset(); |
22
|
0
|
|
|
|
|
|
B::Hooks::Parser::inject('use B::OPCheck const => check => \&invoker::_check;'); |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
my $hook = $class->setup; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
on_scope_end { |
27
|
0
|
|
|
0
|
|
|
$class->teardown($hook); |
28
|
0
|
|
|
|
|
|
B::Hooks::Parser::teardown($parser); |
29
|
0
|
|
|
|
|
|
}; |
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
|
|
|
return; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub _check { |
35
|
0
|
|
|
0
|
|
|
my $op = shift; |
36
|
0
|
0
|
|
|
|
|
return unless ref($op->gv) eq 'B::PV'; |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
my $linestr = B::Hooks::Parser::get_linestr; |
39
|
0
|
|
|
|
|
|
my $offset = B::Hooks::Parser::get_linestr_offset; |
40
|
|
|
|
|
|
|
|
41
|
0
|
0
|
|
|
|
|
if (substr($linestr, $offset-2, 3) eq '$->') { |
42
|
0
|
|
|
|
|
|
substr($linestr, $offset-2, 3, '$-->'); |
43
|
0
|
|
|
|
|
|
B::Hooks::Parser::set_linestr($linestr); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |
48
|
|
|
|
|
|
|
__END__ |