--- trunk/lib/Frey/Web.pm 2008/11/18 16:54:10 418 +++ trunk/lib/Frey/Web.pm 2008/11/19 02:52:42 444 @@ -25,7 +25,7 @@ lazy => 1, default => sub { [ { 'Bookmarklets' => Frey::Bookmarklet->new->markup }, - { 'ClassBrowser' => Frey::ClassBrowser->new->markup }, + { 'ClassBrowser' => Frey::ClassBrowser->new( usage_on_top => 0 )->markup }, ] }, ); @@ -81,6 +81,8 @@ $out .= $self->_inline_path( $path ) ? qq|| : qq||; + } elsif ( $path =~ m{<.+>} ) { + $out .= $path; } else { confess "don't know how to render $path"; } @@ -102,17 +104,19 @@ return if ! defined $path || $path eq ''; $path =~ s!^/!!; - if ( -e $path ) { + if ( $path =~ m{<.*>} ) { + push @{ $self->head }, $path; + } elsif ( -e $path ) { if ( $path =~ m/\.(?:js|css)$/ ) { push @{ $self->head }, $path; } else { confess "can't add_head( $path ) it's not js or css"; } + return -s $path; } else { confess "can't find $path: $!"; } - return -s $path; } our $reload_counter = 0; @@ -136,7 +140,11 @@ my $status_line = ''; foreach my $part ( @{ $self->status } ) { - confess "part not hash ",dump( $part ) unless ref($part) eq 'HASH'; + if ( ref($part) ne 'HASH' ) { + warn "part not hash ",dump( $part ) ; + #$self->status( $part ); + next; + } foreach my $name ( keys %$part ) { my $content = $part->{$name}; if ( ref($content) ) { @@ -151,6 +159,9 @@ } } + my $url = $self->request_url; + $url =~ s{\?reload=\d+}{}; + my $html = join("\n", qq||, $self->_head_html, @@ -162,7 +173,7 @@ qq|
Frey $Frey::VERSION - | . $self->request_url . qq| + $url $status_line