line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package File::Assets::Filter::CSS; |
2
|
|
|
|
|
|
|
|
3
|
9
|
|
|
9
|
|
13582
|
use strict; |
|
9
|
|
|
|
|
23
|
|
|
9
|
|
|
|
|
317
|
|
4
|
9
|
|
|
9
|
|
49
|
use warnings; |
|
9
|
|
|
|
|
187
|
|
|
9
|
|
|
|
|
286
|
|
5
|
|
|
|
|
|
|
|
6
|
9
|
|
|
9
|
|
46
|
use base qw/File::Assets::Filter/; |
|
9
|
|
|
|
|
20
|
|
|
9
|
|
|
|
|
896
|
|
7
|
|
|
|
|
|
|
|
8
|
9
|
|
|
9
|
|
55
|
use Digest; |
|
9
|
|
|
|
|
17
|
|
|
9
|
|
|
|
|
317
|
|
9
|
9
|
|
|
9
|
|
154
|
use File::Assets; |
|
9
|
|
|
|
|
16
|
|
|
9
|
|
|
|
|
91
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my %default = (qw/ |
12
|
|
|
|
|
|
|
skip_single 0 |
13
|
|
|
|
|
|
|
check_age 1 |
14
|
|
|
|
|
|
|
check_digest 1 |
15
|
|
|
|
|
|
|
/, |
16
|
|
|
|
|
|
|
); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub new { |
19
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
20
|
0
|
|
|
|
|
|
my $self = $class->SUPER::new(@_); |
21
|
0
|
|
|
|
|
|
local %_ = @_; |
22
|
0
|
|
|
|
|
|
while (my ($setting, $value) = each %default) { |
23
|
0
|
0
|
|
|
|
|
$self->cfg->{$setting} = exists $_{$setting} ? $_{$setting} : $value; |
24
|
|
|
|
|
|
|
} |
25
|
0
|
|
|
|
|
|
return $self; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub post { |
29
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
30
|
0
|
|
|
|
|
|
$self->SUPER::post(@_); |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
my $assets = shift; |
33
|
0
|
|
|
|
|
|
my $matched = shift; |
34
|
|
|
|
|
|
|
|
35
|
0
|
0
|
|
|
|
|
return unless @$matched; |
36
|
|
|
|
|
|
|
|
37
|
0
|
0
|
0
|
|
|
|
return if $self->cfg->{skip_single} && 1 == @$matched; |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
my %bucket; |
40
|
0
|
|
|
|
|
|
for my $asset (@$matched) { |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
0
|
|
|
|
|
|
my $type = $self->type; |
44
|
|
|
|
|
|
|
|
45
|
0
|
0
|
|
|
|
|
return if $self->skip_if_exists; |
46
|
|
|
|
|
|
|
|
47
|
0
|
|
|
|
|
|
my $build = $self->should_build; |
48
|
|
|
|
|
|
|
|
49
|
0
|
0
|
|
|
|
|
if ($build) { |
50
|
0
|
|
|
|
|
|
$self->check_digest_file->touch; |
51
|
0
|
|
|
|
|
|
$self->build; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
0
|
|
|
|
|
|
$self->replace; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
1; |