--- trunk/lib/Frey/Web.pm 2009/03/12 20:56:04 1045 +++ trunk/lib/Frey/Web.pm 2009/04/27 18:40:41 1064 @@ -7,6 +7,7 @@ use Carp qw/confess cluck carp/; use File::Slurp; use Text::Tabs; # expand, unexpand +use Digest::MD5 qw/md5/; use lib 'lib'; @@ -193,9 +194,14 @@ } +my $seen; + sub _add_css_js { my ( $self, $what, $content ) = @_; + my $md5 = md5( $content ); + return if $seen->{$what}->{$md5}++; + my $tag = $what eq 'css' ? 'style' : 'script'; my $type = $what eq 'css' ? 'text/css' : 'text/javascript'; my $head;