line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::Pipe::List::Map; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
46
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.10'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
5
|
use base 'Text::Pipe::Base'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
148
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
__PACKAGE__->mk_scalar_accessors(qw(code)); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub filter { |
17
|
1
|
|
|
1
|
1
|
4
|
my ($self, $input) = @_; |
18
|
1
|
50
|
|
|
|
6
|
return $input unless ref $input eq 'ARRAY'; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# kludge because of prototype requirements |
21
|
1
|
|
|
|
|
4
|
[ map { $self->code->() } @$input ]; |
|
5
|
|
|
|
|
37
|
|
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |