CGI-Buffer
view release on metacpan or search on metacpan
lib/CGI/Buffer.pm view on Meta::CPAN
# Purpose: find when the script was last changed
# Entry criteria: none
# Exit status: the script's modification time, or undef if it can't be read
# Side effects: remembers the answer, may create $info. Croaks if CGI::Info
# can't find the script
sub _my_age {
unless(defined($script_mtime)) {
my $path = _info()->script_path();
croak(_i18n('no_script_path')) unless(defined($path));
if(my @statb = stat($path)) {
$script_mtime = $statb[9];
} else {
_log('debug', _i18n('no_script_age', { path => $path, error => "$!" }));
}
}
return $script_mtime;
}
# Purpose: choose the content encoding to use
# Entry criteria: @content_type and $script_encoded are set from the headers
( run in 1.687 second using v1.01-cache-2.11-cpan-eb134014566 )