118 |
|
|
119 |
sub _inline { |
sub _inline { |
120 |
my ( $self, $path ) = @_; |
my ( $self, $path ) = @_; |
121 |
|
return unless defined $path; |
122 |
warn "# _inline $path"; |
warn "# _inline $path"; |
123 |
-e $path && -s $path < $self->inline_smaller_than && -s $path; |
-e $path && -s $path < $self->inline_smaller_than && -s $path; |
124 |
} |
} |
187 |
|
|
188 |
my ( $package, $path, $line ) = caller(1); |
my ( $package, $path, $line ) = caller(1); |
189 |
|
|
190 |
if ( $content =~ m{\.(js|css)} ) { |
$content = "/$content" if $content !~ m{[\n\r]} && -e $content; |
191 |
$content = "/$content" if -e $content; |
if ( $content =~ $re_html ) { |
192 |
if ( $content =~ $re_html ) { |
$head = qq| |
193 |
$head = qq| |
$content |
194 |
$content |
<!-- $type via $package at $path line $line --> |
195 |
<!-- $type via $package at $path line $line --> |
|; |
196 |
|; |
} elsif ( $content =~ m{^(/|https?://)} ) { |
197 |
} elsif ( $what eq 'js' ) { |
if ( $what eq 'js' ) { |
198 |
$head = qq| |
$head = qq| |
199 |
<$tag type="$type" src="$content"> |
<$tag type="$type" src="$content"> |
200 |
/* $what via $package at $path line $line */ |
/* $what via $package at $path line $line */ |
249 |
my $self = shift; |
my $self = shift; |
250 |
my $a = {@_}; |
my $a = {@_}; |
251 |
|
|
|
warn "## page ",dump($a); |
|
|
|
|
252 |
$reload_counter++; |
$reload_counter++; |
253 |
|
|
254 |
my $status_line = ''; |
my $status_line = ''; |