line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Template::Plugin::CSV::Escape;
|
2
|
2
|
|
|
2
|
|
77464
|
use strict;
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
74
|
|
3
|
2
|
|
|
2
|
|
10
|
use warnings;
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
229
|
|
4
|
2
|
|
|
2
|
|
11
|
use base qw/Template::Plugin::Filter/;
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
2227
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.01';
|
7
|
|
|
|
|
|
|
our $FILTER_NAME = 'csv';
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub init {
|
10
|
3
|
|
|
3
|
0
|
4944
|
my $self = shift;
|
11
|
3
|
|
66
|
|
|
65
|
$self->install_filter($self->{_ARGS}->[0] || $FILTER_NAME);
|
12
|
3
|
|
|
|
|
85
|
$self;
|
13
|
|
|
|
|
|
|
}
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub filter {
|
16
|
3
|
|
|
3
|
0
|
161
|
my ($self, $text) = @_;
|
17
|
3
|
|
|
|
|
6
|
$text =~ s/\x22/\x22\x22/go;
|
18
|
3
|
|
|
|
|
12
|
return qq{"$text"};
|
19
|
|
|
|
|
|
|
}
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
1;
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
__END__
|