--- trunk/lib/Frey/Web.pm 2008/11/18 13:57:52 410 +++ trunk/lib/Frey/Web.pm 2008/11/19 01:37:49 439 @@ -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 }, ] }, ); @@ -35,6 +35,16 @@ default => '/', ); +has 'title' => ( + is => 'rw', + isa => 'Str', + lazy => 1, + default => sub { + my ($self) = @_; + ref($self); + }, +); + =head2 inline_smaller_than Inline JavaScript and CSS smaller than this size into page reducing @@ -126,7 +136,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) ) { @@ -141,18 +155,21 @@ } } + my $url = $self->request_url; + $url =~ s{\?reload=\d+}{}; + my $html = join("\n", qq||, $self->_head_html, - '' . ( $a->{title} || ref($self) ) . '', + '' . ( $self->title || $a->{title} || ref($self) ) . '', '', ( $a->{head} || '' ), '', - ( $a->{body} || '' ), + ( $a->{body} || $self->markup || '' ), qq|
Frey $Frey::VERSION - | . $self->request_url . qq| + $url $status_line
@@ -171,6 +188,7 @@ $error .= " at $filename line $line" if $error !~ m{ at }; warn "WARN: $error\n"; $error =~ s{at\s+(\S+)\s+line\s+(\d+)}{at $1 line $2}gsm; + $error =~ s{(via package ")([\w:]+)(")}{$1$2$3}gsm; return qq|
$error
|; }