line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Template::Plugin::Filter::Minify::CSS::XS; |
2
|
|
|
|
|
|
|
$Template::Plugin::Filter::Minify::CSS::XS::VERSION = '0.96'; |
3
|
|
|
|
|
|
|
# ABSTRACT: CSS::Minifier::XS filter for Template Toolkit |
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
82464
|
use 5.006; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
159
|
|
6
|
2
|
|
|
2
|
|
18
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
93
|
|
7
|
2
|
|
|
2
|
|
23
|
use base 'Template::Plugin::Filter'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
2182
|
|
8
|
2
|
|
|
2
|
|
46033
|
use CSS::Minifier::XS; |
|
2
|
|
|
|
|
35904
|
|
|
2
|
|
|
|
|
394
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub init { |
11
|
1
|
|
|
1
|
0
|
95
|
my $self = shift; |
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
|
|
7
|
$self->install_filter('minify_css'); |
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
|
|
52
|
return $self; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub filter { |
19
|
1
|
|
|
1
|
0
|
87
|
my ($self, $text) = @_; |
20
|
|
|
|
|
|
|
|
21
|
1
|
|
|
|
|
19
|
$text = CSS::Minifier::XS::minify($text); |
22
|
|
|
|
|
|
|
|
23
|
1
|
|
|
|
|
5
|
return $text; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |