Apache2-Archive
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
7677787980818283848586878889909192939495# we shouldn't really depend on it. See RT #24194 for detail.
# (Also, this module only supports Perl 5.6 and above).
eval
"use Win32::UTCFileTime"
if
$^O eq
'MSWin32'
&& $] >= 5.006;
# If the script that is loading Module::Install is from the future,
# then make will detect this and cause it to re-run over and over
# again. This is bad. Rather than taking action to touch it (which
# is unreliable on some platforms and requires write permissions)
# for now we should catch this and refuse to run.
if
( -f $0 ) {
my
$s
= (
stat
($0))[9];
# If the modification time is only slightly in the future,
# sleep briefly to remove the problem.
my
$a
=
$s
-
time
;
if
(
$a
> 0 and
$a
< 5 ) {
sleep
5 }
# Too far in the future, throw an error.
my
$t
=
time
;
if
(
$s
>
$t
) {
die
<<
"END_DIE"
}
lib/Apache2/Archive.pm view on Meta::CPAN
444546474849505152535455565758596061626364##
# Create the Tar object;
##
$t
->{filename} =
$r
->filename;
unless
(-e
$t
->{filename} && -r
$t
->{filename}) {
return
Apache2::Const::NOT_FOUND;
}
my
(
$dev
,
$ino
,
$mode
,
$nlink
,
$uid
,
$gid
,
$rdev
,
$size
,
$atime
,
$mtime
,
$ctime
,
$blksize
,
$blocks
)=
stat
(
$t
->{filename});
(
$t
->{FileInfo}->{
'name'
}) =
$t
->{filename} =~ m!(([^/\\]|\\\/)+)$!;
$t
->{FileInfo}->{
'date'
} =
&getDatestring
(
$mtime
,
$r
->dir_config(
'Months'
));
$t
->{FileInfo}->{
'rawsize'
} = -s
$t
->{filename};
$t
->{FileInfo}->{
'size'
} =
&getSizestring
(
$t
->{FileInfo}->{
'rawsize'
});
$t
->{FileInfo}->{
'view_location'
} =
$r
->uri .
"/display/"
.
$t
->{FileInfo}->{
'name'
};
$t
->{FileInfo}->{
'compressed'
} = 1
if
$t
->{FileInfo}->{
'name'
} =~ /\.gz$/;
if
(!
$t
->{Tar}->
read
(
$t
->{filename},
$t
->{FileInfo}->{
'compressed'
})){
&error_response
(
$t
,
$r
);
return
Apache2::Const::SERVER_ERROR;
( run in 0.269 second using v1.01-cache-2.11-cpan-c6e0e5ac2a7 )