Catalyst-Plugin-ServeFile
view release on metacpan or search on metacpan
lib/Catalyst/Plugin/ServeFile.pm view on Meta::CPAN
unless(-f $full_path) {
$c->log->debug("Static File at '$full_path' not found!") if $c->debug;
return;
}
open(my $fh, '<', $full_path) || do {
$c->log->debug("Static file at '$full_path' cannot be open'd for read with error: $@")
if $c->debug;
return;
};
my @stat = stat($full_path);
unless(@stat) {
$c->log->debug("Static file at '$full_path' cannot be stat'd with error: $@")
if $c->debug;
return;
}
Plack::Util::set_io_path($fh, Cwd::realpath($full_path)); # Support Xsendfile
return ($fh, @stat);
( run in 0.993 second using v1.01-cache-2.11-cpan-49f99fa48dc )