81 |
$out .= $self->_inline_path( $path ) ? |
$out .= $self->_inline_path( $path ) ? |
82 |
qq|<!-- $path --><style type="text/css">\n| . read_file( $path ) . qq|\n</style>| : |
qq|<!-- $path --><style type="text/css">\n| . read_file( $path ) . qq|\n</style>| : |
83 |
qq|<link type="text/css" rel="stylesheet" href="/$path" media="screen">|; |
qq|<link type="text/css" rel="stylesheet" href="/$path" media="screen">|; |
84 |
|
} elsif ( $path =~ m{<.+>} ) { |
85 |
|
$out .= $path; |
86 |
} else { |
} else { |
87 |
confess "don't know how to render $path"; |
confess "don't know how to render $path"; |
88 |
} |
} |
104 |
return if ! defined $path || $path eq ''; |
return if ! defined $path || $path eq ''; |
105 |
$path =~ s!^/!!; |
$path =~ s!^/!!; |
106 |
|
|
107 |
if ( -e $path ) { |
if ( $path =~ m{<.*>} ) { |
108 |
|
push @{ $self->head }, $path; |
109 |
|
} elsif ( -e $path ) { |
110 |
if ( $path =~ m/\.(?:js|css)$/ ) { |
if ( $path =~ m/\.(?:js|css)$/ ) { |
111 |
push @{ $self->head }, $path; |
push @{ $self->head }, $path; |
112 |
} else { |
} else { |
113 |
confess "can't add_head( $path ) it's not js or css"; |
confess "can't add_head( $path ) it's not js or css"; |
114 |
} |
} |
115 |
|
return -s $path; |
116 |
} else { |
} else { |
117 |
confess "can't find $path: $!"; |
confess "can't find $path: $!"; |
118 |
} |
} |
119 |
|
|
|
return -s $path; |
|
120 |
} |
} |
121 |
|
|
122 |
our $reload_counter = 0; |
our $reload_counter = 0; |