line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Template::Plugin::JavaScript::Compactor; |
2
|
2
|
|
|
2
|
|
75882
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
89
|
|
3
|
2
|
|
|
2
|
|
12
|
use base qw (Template::Plugin::Filter); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
1813
|
|
4
|
2
|
|
|
2
|
|
10378
|
use Data::JavaScript::Compactor; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = 0.01; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub init { |
9
|
|
|
|
|
|
|
my $self = shift; |
10
|
|
|
|
|
|
|
$self->{_DYNAMIC} = 1; |
11
|
|
|
|
|
|
|
$self->install_filter($self->{_ARGS}->[0] || 'jscompactor'); |
12
|
|
|
|
|
|
|
$self; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub filter { |
16
|
|
|
|
|
|
|
my ($self, $text) = @_; |
17
|
|
|
|
|
|
|
return Data::JavaScript::Compactor->compact($text); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
1; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
__END__ |