7 |
use Carp qw/confess cluck carp/; |
use Carp qw/confess cluck carp/; |
8 |
use File::Slurp; |
use File::Slurp; |
9 |
use Text::Tabs; # expand, unexpand |
use Text::Tabs; # expand, unexpand |
10 |
|
use Digest::MD5 qw/md5/; |
11 |
|
|
12 |
use lib 'lib'; |
use lib 'lib'; |
13 |
|
|
194 |
|
|
195 |
} |
} |
196 |
|
|
197 |
|
my $seen; |
198 |
|
|
199 |
sub _add_css_js { |
sub _add_css_js { |
200 |
my ( $self, $what, $content ) = @_; |
my ( $self, $what, $content ) = @_; |
201 |
|
|
202 |
|
my $md5 = md5( $content ); |
203 |
|
return if $seen->{$what}->{$md5}++; |
204 |
|
|
205 |
my $tag = $what eq 'css' ? 'style' : 'script'; |
my $tag = $what eq 'css' ? 'style' : 'script'; |
206 |
my $type = $what eq 'css' ? 'text/css' : 'text/javascript'; |
my $type = $what eq 'css' ? 'text/css' : 'text/javascript'; |
207 |
my $head; |
my $head; |