35 |
default => '/', |
default => '/', |
36 |
); |
); |
37 |
|
|
38 |
|
has 'title' => ( |
39 |
|
is => 'rw', |
40 |
|
isa => 'Str', |
41 |
|
lazy => 1, |
42 |
|
default => sub { |
43 |
|
my ($self) = @_; |
44 |
|
ref($self); |
45 |
|
}, |
46 |
|
); |
47 |
|
|
48 |
=head2 inline_smaller_than |
=head2 inline_smaller_than |
49 |
|
|
50 |
Inline JavaScript and CSS smaller than this size into page reducing |
Inline JavaScript and CSS smaller than this size into page reducing |
136 |
|
|
137 |
my $status_line = ''; |
my $status_line = ''; |
138 |
foreach my $part ( @{ $self->status } ) { |
foreach my $part ( @{ $self->status } ) { |
139 |
confess "part not hash ",dump( $part ) unless ref($part) eq 'HASH'; |
if ( ref($part) ne 'HASH' ) { |
140 |
|
warn "part not hash ",dump( $part ) ; |
141 |
|
#$self->status( $part ); |
142 |
|
next; |
143 |
|
} |
144 |
foreach my $name ( keys %$part ) { |
foreach my $name ( keys %$part ) { |
145 |
my $content = $part->{$name}; |
my $content = $part->{$name}; |
146 |
if ( ref($content) ) { |
if ( ref($content) ) { |
158 |
my $html = join("\n", |
my $html = join("\n", |
159 |
qq|<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"><html><head>|, |
qq|<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"><html><head>|, |
160 |
$self->_head_html, |
$self->_head_html, |
161 |
'<title>' . ( $a->{title} || ref($self) ) . '</title>', |
'<title>' . ( $self->title || $a->{title} || ref($self) ) . '</title>', |
162 |
'<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">', |
'<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">', |
163 |
( $a->{head} || '' ), |
( $a->{head} || '' ), |
164 |
'</head><body>', |
'</head><body>', |
165 |
( $a->{body} || '<!-- no body -->' ), |
( $a->{body} || $self->markup || '<!-- no body -->' ), |
166 |
qq| |
qq| |
167 |
<div class="frey-status-line"> |
<div class="frey-status-line"> |
168 |
<a href="/">Frey</a> $Frey::VERSION |
<a href="/">Frey</a> $Frey::VERSION |