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 |
154 |
my $html = join("\n", |
my $html = join("\n", |
155 |
qq|<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"><html><head>|, |
qq|<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"><html><head>|, |
156 |
$self->_head_html, |
$self->_head_html, |
157 |
'<title>' . ( $a->{title} || ref($self) ) . '</title>', |
'<title>' . ( $self->title || $a->{title} || ref($self) ) . '</title>', |
158 |
'<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">', |
'<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">', |
159 |
( $a->{head} || '' ), |
( $a->{head} || '' ), |
160 |
'</head><body>', |
'</head><body>', |
161 |
( $a->{body} || '<!-- no body -->' ), |
( $a->{body} || $self->markup || '<!-- no body -->' ), |
162 |
qq| |
qq| |
163 |
<div class="frey-status-line"> |
<div class="frey-status-line"> |
164 |
<a href="/">Frey</a> $Frey::VERSION |
<a href="/">Frey</a> $Frey::VERSION |
181 |
$error .= " at $filename line $line" if $error !~ m{ at }; |
$error .= " at $filename line $line" if $error !~ m{ at }; |
182 |
warn "WARN: $error\n"; |
warn "WARN: $error\n"; |
183 |
$error =~ s{at\s+(\S+)\s+line\s+(\d+)}{at <a target="editor" href="/editor+$1+$2">$1</a> line $2}gsm; |
$error =~ s{at\s+(\S+)\s+line\s+(\d+)}{at <a target="editor" href="/editor+$1+$2">$1</a> line $2}gsm; |
184 |
|
$error =~ s{(via package ")([\w:]+)(")}{$1<a target="editor" href="/editor+$2+1">$2</a>$3}gsm; |
185 |
return qq|<pre class="frey-error">$error</pre>|; |
return qq|<pre class="frey-error">$error</pre>|; |
186 |
} |
} |
187 |
|
|