| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Block::NamedVar; |
|
2
|
6
|
|
|
6
|
|
1013550
|
use strict; |
|
|
6
|
|
|
|
|
12
|
|
|
|
6
|
|
|
|
|
150
|
|
|
3
|
6
|
|
|
6
|
|
36
|
use warnings; |
|
|
6
|
|
|
|
|
12
|
|
|
|
6
|
|
|
|
|
234
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = "0.009"; |
|
6
|
|
|
|
|
|
|
|
|
7
|
6
|
|
|
6
|
|
31122
|
use Devel::Declare::Interface; |
|
|
6
|
|
|
|
|
4200
|
|
|
|
6
|
|
|
|
|
1122
|
|
|
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
|
1
|
|
sub nfor {} |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub ngrep { |
|
14
|
6
|
|
|
6
|
1
|
841010
|
local $_; |
|
15
|
6
|
|
|
|
|
42
|
my $code = shift; |
|
16
|
6
|
|
|
|
|
63
|
grep { $code->() } @_; |
|
|
37
|
|
|
|
|
547
|
|
|
17
|
|
|
|
|
|
|
} |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub nmap { |
|
20
|
1
|
|
|
1
|
1
|
8559
|
local $_; |
|
21
|
1
|
|
|
|
|
13
|
my $code = shift; |
|
22
|
1
|
|
|
|
|
30
|
map { $code->() } @_; |
|
|
3
|
|
|
|
|
52
|
|
|
23
|
|
|
|
|
|
|
} |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub import { |
|
26
|
6
|
|
|
6
|
|
42
|
my $class = shift; |
|
27
|
6
|
|
|
|
|
24
|
my $caller = caller; |
|
28
|
|
|
|
|
|
|
|
|
29
|
6
|
|
|
|
|
108
|
for (qw/nfor ngrep nmap/) { |
|
30
|
6
|
|
|
6
|
|
36
|
no strict 'refs'; |
|
|
6
|
|
|
|
|
6
|
|
|
|
6
|
|
|
|
|
834
|
|
|
31
|
18
|
|
|
|
|
30
|
*{ $caller . '::' . $_ } = \&$_; |
|
|
18
|
|
|
|
|
84
|
|
|
32
|
|
|
|
|
|
|
} |
|
33
|
|
|
|
|
|
|
|
|
34
|
6
|
|
|
|
|
24
|
Devel::Declare::Interface::enhance( $caller, $_, 'map_var' ) for qw/ngrep nmap/; |
|
35
|
6
|
|
|
|
|
141384
|
Devel::Declare::Interface::enhance( $caller, 'nfor', 'for_var' ) for qw/nfor/; |
|
36
|
|
|
|
|
|
|
} |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
__END__ |