121 |
$path =~ s!^/!!; |
$path =~ s!^/!!; |
122 |
if ( $path =~ m/\.js$/ ) { |
if ( $path =~ m/\.js$/ ) { |
123 |
$out .= $self->_inline_path( $path ) ? |
$out .= $self->_inline_path( $path ) ? |
124 |
qq|<!-- $path --><script type="text/javascript">\n| . read_file($path) . qq|\n</script>| : |
qq|<script type="text/javascript">\n/* inline $path */\n\n| . read_file($path) . qq|\n</script>| : |
125 |
qq|<script type="text/javascript" src="/$path"></script>|; |
qq|<script type="text/javascript" src="/$path"></script>|; |
126 |
} elsif ( $path =~ m/\.css$/ ) { |
} elsif ( $path =~ m/\.css$/ ) { |
127 |
$out .= $self->_inline_path( $path ) ? |
$out .= $self->_inline_path( $path ) ? |
128 |
qq|<!-- $path --><style type="text/css">\n| . read_file( $path ) . qq|\n</style>| : |
qq|<style type="text/css">\n/* inline $path */\n\n| . read_file( $path ) . qq|\n</style>| : |
129 |
qq|<link type="text/css" rel="stylesheet" href="/$path" media="screen">|; |
qq|<link type="text/css" rel="stylesheet" href="/$path" media="screen">|; |
130 |
} elsif ( $path =~ m{<.+>}s ) { |
} elsif ( $path =~ m{<.+>}s ) { |
131 |
$out .= $path; |
$out .= $path; |