line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Block::NamedVar; |
2
|
6
|
|
|
6
|
|
3078942
|
use strict; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
192
|
|
3
|
6
|
|
|
6
|
|
36
|
use warnings; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
288
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = "0.008"; |
6
|
|
|
|
|
|
|
|
7
|
6
|
|
|
6
|
|
90
|
use Devel::Declare::Interface; |
|
6
|
|
|
|
|
30
|
|
|
6
|
|
|
|
|
2022
|
|
8
|
|
|
|
|
|
|
Devel::Declare::Interface::register_parser( 'map_var', 'Block::NamedVar::MapLike' ); |
9
|
|
|
|
|
|
|
Devel::Declare::Interface::register_parser( 'for_var', 'Block::NamedVar::ForLike' ); |
10
|
|
|
|
|
|
|
|
11
|
6
|
|
|
6
|
1
|
33489
|
sub nfor {} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub ngrep { |
14
|
6
|
|
|
6
|
1
|
744854
|
local $_; |
15
|
6
|
|
|
|
|
86
|
my $code = shift; |
16
|
6
|
|
|
|
|
33
|
grep { $code->() } @_; |
|
37
|
|
|
|
|
1410
|
|
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub nmap { |
20
|
1
|
|
|
1
|
1
|
645702
|
local $_; |
21
|
1
|
|
|
|
|
19
|
my $code = shift; |
22
|
1
|
|
|
|
|
9
|
map { $code->() } @_; |
|
3
|
|
|
|
|
55
|
|
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub import { |
26
|
6
|
|
|
6
|
|
42
|
my $class = shift; |
27
|
6
|
|
|
|
|
30
|
my $caller = caller; |
28
|
|
|
|
|
|
|
|
29
|
6
|
|
|
|
|
96
|
for (qw/nfor ngrep nmap/) { |
30
|
6
|
|
|
6
|
|
36
|
no strict 'refs'; |
|
6
|
|
|
|
|
6
|
|
|
6
|
|
|
|
|
738
|
|
31
|
18
|
|
|
|
|
24
|
*{ $caller . '::' . $_ } = \&$_; |
|
18
|
|
|
|
|
90
|
|
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
6
|
|
|
|
|
30
|
Devel::Declare::Interface::enhance( $caller, $_, 'map_var' ) for qw/ngrep nmap/; |
35
|
6
|
|
|
|
|
384
|
Devel::Declare::Interface::enhance( $caller, 'nfor', 'for_var' ) for qw/nfor/; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
__END__ |