--- trunk/lib/Frey/Web.pm 2009/02/03 20:55:45 1033 +++ trunk/lib/Frey/Web.pm 2009/07/02 18:56:17 1167 @@ -1,12 +1,13 @@ package Frey::Web; use Moose::Role; -with 'Frey::Session'; +with 'Frey::Session', 'Frey::Class::Icon'; use Data::Dump qw/dump/; use Carp qw/confess cluck carp/; use File::Slurp; use Text::Tabs; # expand, unexpand +use Digest::MD5 qw/md5/; use lib 'lib'; @@ -196,6 +197,9 @@ sub _add_css_js { my ( $self, $what, $content ) = @_; + my $md5 = md5( $content ); + return if $self->{_add_css_js_seen}->{$what}->{$md5}++; + my $tag = $what eq 'css' ? 'style' : 'script'; my $type = $what eq 'css' ? 'text/css' : 'text/javascript'; my $head; @@ -203,7 +207,7 @@ my ( $package, $path, $line ) = caller(1); $content = "/$content" if $content !~ m{[\n\r]} && -e $content; - if ( $content =~ $re_html ) { + if ( $content =~ $re_html && $what ne 'js' ) { $head = qq| $content @@ -258,8 +262,6 @@ our @status; sub status { @status }; -our $icon_html; - sub html_page { my $self = shift; my $a = {@_}; @@ -310,7 +312,15 @@ my $revision = $svk->info->{Revision} || ''; $revision = $1 if $info->{'Mirrored From'} =~ m{Rev\.\s+(\d+)}; - $self->add_icon unless $icon_html; + $status_line = $ENV{FREY_DEV} ? qq| +