35 |
$path =~ s!^/!!; |
$path =~ s!^/!!; |
36 |
if ( $path =~ m/\.js$/ ) { |
if ( $path =~ m/\.js$/ ) { |
37 |
$out .= $self->_inline_path( $path ) ? |
$out .= $self->_inline_path( $path ) ? |
38 |
qq|<script type="text/javascript">| . read_file($path) . qq|</script>| : |
qq|<!-- $path --><script type="text/javascript">\n| . read_file($path) . qq|\n</script>| : |
39 |
qq|<script type="text/javascript" src="/$path"></script>|; |
qq|<script type="text/javascript" src="/$path"></script>|; |
40 |
} elsif ( $path =~ m/\.css$/ ) { |
} elsif ( $path =~ m/\.css$/ ) { |
41 |
$out .= $self->_inline_path( $path ) ? |
$out .= $self->_inline_path( $path ) ? |
42 |
qq|<style type="text/css">| . read_file( $path ) . qq|</style>| : |
qq|<!-- $path --><style type="text/css">\n| . read_file( $path ) . qq|\n</style>| : |
43 |
qq|<link type="text/css" rel="stylesheet" href="/$path" media="screen">|; |
qq|<link type="text/css" rel="stylesheet" href="/$path" media="screen">|; |
44 |
} else { |
} else { |
45 |
confess "don't know how to render $path"; |
confess "don't know how to render $path"; |
46 |
} |
} |
47 |
|
$out .= "\n"; |
48 |
} |
} |
49 |
return $out; |
return $out; |
50 |
} |
} |