line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Template::Plugin::Filter::Minify::CSS; |
2
|
|
|
|
|
|
|
# ABSTRACT: CSS::Minifier filter for Template Toolkit |
3
|
|
|
|
|
|
|
$Template::Plugin::Filter::Minify::CSS::VERSION = '0.95'; |
4
|
2
|
|
|
2
|
|
122930
|
use 5.006; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
89
|
|
5
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
81
|
|
6
|
2
|
|
|
2
|
|
20
|
use base 'Template::Plugin::Filter'; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
3447
|
|
7
|
2
|
|
|
2
|
|
402110
|
use CSS::Minifier; |
|
2
|
|
|
|
|
6304
|
|
|
2
|
|
|
|
|
833
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub init { |
11
|
1
|
|
|
1
|
0
|
85
|
my $self = shift; |
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
|
|
9
|
$self->install_filter('minify_css'); |
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
|
|
228
|
return $self; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub filter { |
19
|
1
|
|
|
1
|
0
|
106
|
my ($self, $text) = @_; |
20
|
|
|
|
|
|
|
|
21
|
1
|
|
|
|
|
5
|
$text = CSS::Minifier::minify(input => $text); |
22
|
|
|
|
|
|
|
|
23
|
1
|
|
|
|
|
2636
|
return $text; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |