line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Template::Plugin::Filter::Minify::JavaScript::XS; |
2
|
|
|
|
|
|
|
$Template::Plugin::Filter::Minify::JavaScript::XS::VERSION = '0.94'; |
3
|
|
|
|
|
|
|
# ABSTRACT: JavaScript::Minifier::XS filter for Template Toolkit |
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
59156
|
use 5.006; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
67
|
|
6
|
2
|
|
|
2
|
|
10
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
66
|
|
7
|
2
|
|
|
2
|
|
18
|
use base 'Template::Plugin::Filter'; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
1678
|
|
8
|
2
|
|
|
2
|
|
11196
|
use JavaScript::Minifier::XS; |
|
2
|
|
|
|
|
3667
|
|
|
2
|
|
|
|
|
333
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub init { |
11
|
1
|
|
|
1
|
0
|
52
|
my $self = shift; |
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
|
|
6
|
$self->install_filter('minify_js'); |
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
|
|
44
|
return $self; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub filter { |
19
|
1
|
|
|
1
|
0
|
72
|
my ($self, $text) = @_; |
20
|
|
|
|
|
|
|
|
21
|
1
|
|
|
|
|
21
|
$text = JavaScript::Minifier::XS::minify($text); |
22
|
|
|
|
|
|
|
|
23
|
1
|
|
|
|
|
4
|
return $text; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |