line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
249620
|
use 5.008; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
38
|
|
2
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
65
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Template::Plugin::Filter::Pipe; |
6
|
|
|
|
|
|
|
our $VERSION = '1.100860'; |
7
|
|
|
|
|
|
|
# ABSTRACT: Filter plugin adapter for Text::Pipe |
8
|
1
|
|
|
1
|
|
964
|
use Text::Pipe; |
|
1
|
|
|
|
|
74105
|
|
|
1
|
|
|
|
|
52
|
|
9
|
1
|
|
|
1
|
|
13
|
use parent qw(Template::Plugin::Filter); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub init { |
12
|
3
|
|
|
3
|
1
|
14525
|
my $self = shift; |
13
|
3
|
|
|
|
|
15
|
$self->{_DYNAMIC} = 1; |
14
|
3
|
|
50
|
|
|
39
|
$self->install_filter($self->{_ARGS}[0] || 'pipe'); |
15
|
3
|
|
|
|
|
188
|
$self; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub filter { |
19
|
5
|
|
|
5
|
1
|
7318
|
my ($self, $text, $args, $config) = @_; |
20
|
5
|
50
|
|
|
|
22
|
die "pipe name?\n" unless defined $args->[0]; |
21
|
5
|
|
|
|
|
42
|
my $pipe = Text::Pipe->new($args->[0], %$config); |
22
|
5
|
|
|
|
|
17772
|
$pipe->filter($text); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__END__ |