view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 }
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/SeismicUnixGui/misc/manage_files_by.pm view on Meta::CPAN
# default situation is to have a file that is empty
my $answer = 1;
# find status of file to see whether it is empty
#$fsize[1] = (stat($$ref_file))[2];
#print("\nfile is: $$ref_file\n");
# -s is for size
#verified by JL
my $j = ( -s $$ref_file );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/SimpleBackuper/Backup.pm view on Meta::CPAN
}
while(my($full_path, $dir2upd) = each %dirs2upd) {
print "Updating dir $full_path..." if $options->{verbose};
my $file = $files->find_by_parent_id_name($dir2upd->{parent_id}, $dir2upd->{filename});
my @stat = lstat($full_path);
if(@stat and $file->{versions}->[-1]->{backup_id_max} != $state->{last_backup_id}) {
my($uid, $gid) =_proc_uid_gid($stat[4], $stat[5], $state->{db}->{uids_gids});
if($file->{versions}->[-1]->{backup_id_max} == $state->{last_backup_id} - 1) {
$file->{versions}->[-1] = {
%{ $file->{versions}->[-1] },
lib/App/SimpleBackuper/Backup.pm view on Meta::CPAN
}
$state->{profile}->{fs} -= time;
$state->{profile}->{fs_lstat} -= time;
$file_time_spent -= time;
my @stat = lstat($task->[0]);
$file_time_spent += time;
$state->{profile}->{fs} += time;
$state->{profile}->{fs_lstat} += time;
if(! @stat) {
print ". Not exists\n" if $options->{verbose};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Slaughter/API/generic.pm view on Meta::CPAN
#
my ( $dev, $ino, $mode, $nlink, $orig_uid,
$orig_gid, $rdev, $size, $atime, $mtime,
$ctime, $blksize, $blocks
)
= stat($file);
$::verbose && print "\tSetting owner to $owner/$uid\n";
chown( $uid, $orig_gid, $file );
$changed += 1;
lib/Slaughter/API/generic.pm view on Meta::CPAN
#
my ( $dev, $ino, $mode, $nlink, $orig_uid,
$orig_gid, $rdev, $size, $atime, $mtime,
$ctime, $blksize, $blocks
)
= stat($file);
$::verbose && print "\tSetting group to $group/$gid\n";
chown( $orig_uid, $gid, $file );
$changed += 1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/SlideServer.pm view on Meta::CPAN
$content= $self->markdown_to_html($content, %opts)
unless $srcfile =~ /^\s*</;
$change_token= (0+$srcfile) .'_'. tell($srcfile);
}
else {
my $st= stat($srcfile)
or croak "Can't stat '$srcfile'";
return undef
if defined $opts{if_changed} && $st->mtime == $opts{if_changed};
$content= path($srcfile)->slurp;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 and (stat($0))[9] > time ) { die <<"END_DIE" }
Your installer $0 has a modification time in the future.
This is known to create infinite loops in make.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 }
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 and (stat($0))[9] > time ) { die <<"END_DIE" }
Your installer $0 has a modification time in the future.
This is known to create infinite loops in make.
view all matches for this distribution
view release on metacpan or search on metacpan
t/Installer.t view on Meta::CPAN
$environment->run_test('creates config file', sub {
App::Spoor::Installer::install(\%installation_config, $root_path);
ok(-d $config_file_directory, 'Spoor config directory created');
ok(-o $config_file_directory, 'Spoor config directory owned by effective user');
is((stat($config_file_directory))[2] & 07777, 0700, 'Spoor config directory has correct permissions');
ok(-f $config_file_path, 'Spoor config file created');
is((stat($config_file_path))[2] & 07777, 0600, 'Spoor config file has correct permissions');
});
my %expected_config = (
followers => {
login => {
t/Installer.t view on Meta::CPAN
$environment->run_test('creates directory structure for storing state', sub {
App::Spoor::Installer::install(\%installation_config, $root_path);
ok(-d $spoor_state_directory, 'Spoor state directory created');
ok(-o $spoor_state_directory, 'Spoor state directory owned by effective user');
is((stat($spoor_state_directory))[2] & 07777, 0700, 'Spoor state directory has correct permissions');
ok(-d $spoor_parsed_state_directory, 'Spoor parsed state directory created');
ok(-o $spoor_parsed_state_directory, 'Spoor parsed state directory owned by effective user');
is((stat($spoor_parsed_state_directory))[2] & 07777, 0700, 'Spoor parsed state directory has correct permissions');
ok(-d $spoor_transmitted_state_directory, 'Spoor transmitted state directory created');
ok(-o $spoor_transmitted_state_directory, 'Spoor transmitted state directory owned by effective user');
is(
(stat($spoor_transmitted_state_directory))[2] & 07777,
0700,
'Spoor transmitted state directory has correct permissions'
);
ok(-d $spoor_transmission_failed_state_directory, 'Spoor transmission failed state directory created');
ok(-o $spoor_transmission_failed_state_directory, 'Spoor transmission failed state directory owned by effective user');
is((stat($spoor_transmission_failed_state_directory))[2] & 07777,
0700,
'Spoor transmission failed state directory has correct permissions'
);
});
t/Installer.t view on Meta::CPAN
is(
path($login_follower_unit_file)->slurp_utf8,
App::Spoor::LoginUnitFile::contents(),
'Login unit file contents do not match'
);
is((stat($login_follower_unit_file))[2] & 07777,
0644,
'Spoor login follower unit file permissions'
);
});
t/Installer.t view on Meta::CPAN
is(
path($access_follower_unit_file)->slurp_utf8,
App::Spoor::AccessUnitFile::contents(),
'Access unit file contents do not match'
);
is((stat($access_follower_unit_file))[2] & 07777,
0644,
'Spoor access follower unit file permissions'
);
});
t/Installer.t view on Meta::CPAN
is(
path($error_follower_unit_file)->slurp_utf8,
App::Spoor::ErrorUnitFile::contents(),
'Error unit file contents do not match'
);
is((stat($error_follower_unit_file))[2] & 07777,
0644,
'Spoor error follower unit file permissions'
);
});
t/Installer.t view on Meta::CPAN
is(
path($transmitter_unit_file)->slurp_utf8,
App::Spoor::TransmitterUnitFile::contents(),
'Transmitter unit file contents do not match'
);
is((stat($transmitter_unit_file))[2] & 07777,
0644,
'Spoor transmitter unit file permissions'
);
});
$environment->run_test('creates the hook file in the cpanel directory', sub {
App::Spoor::Installer::install(\%installation_config, $root_path);
is(
(stat("$root_path/var/cpanel/perl5"))[2] & 07777,
0755,
'Perl5 dir permissions'
);
is(
(stat("$root_path/var/cpanel/perl5/lib"))[2] & 07777,
0755,
'Perl5 lib dir permissions'
);
ok(-f $cpanel_hook_file_path, 'Cpanel Hook File');
is(
path($cpanel_hook_file_path)->slurp_utf8,
App::Spoor::CpanelHookFile::contents('/var/log/spoor_forward'),
'Hook file contents'
);
is((stat($cpanel_hook_file_path))[2] & 07777,
0644,
'Cpanel hook file permissions'
);
});
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 and (stat($0))[9] > time ) {
die << "END_DIE";
Your installer $0 has a modification time in the future.
This is known to create infinite loops in make.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 }
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 }
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 and (stat($0))[9] > time ) { die <<"END_DIE" }
Your installer $0 has a modification time in the future.
This is known to create infinite loops in make.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Devel/CheckOS.pm view on Meta::CPAN
$re_AssertOS = qr/$case_flag ^AssertOS$/x;
}
# sort by mtime, so oldest last
my @modules = sort {
(stat($a->{file}))[9] <=> (stat($b->{file}))[9]
} map {
my (undef, $dir_part, $file_part) = File::Spec->splitpath($_);
$file_part =~ s/\.pm$//;
my (@dirs) = grep {+length} File::Spec->splitdir($dir_part);
foreach my $i (reverse 1..$#dirs) {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 }
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 }
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 }
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 and (stat($0))[9] > time ) {
die << "END_DIE";
Your installer $0 has a modification time in the future.
This is known to create infinite loops in make.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 and (stat($0))[9] > time ) {
die << "END_DIE";
Your installer $0 has a modification time in the future.
This is known to create infinite loops in make.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 and (stat($0))[9] > time ) {
die << "END_DIE";
Your installer $0 has a modification time in the future.
This is known to create infinite loops in make.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 and (stat($0))[9] > time ) {
die << "END_DIE";
Your installer $0 has a modification time in the future.
This is known to create infinite loops in make.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Templer/Plugin/TimeStamp.pm view on Meta::CPAN
#
# Get mtime of the source file - if we've not already done so.
#
if ( !$mtime )
{
$mtime = ( stat( $page->source() ) )[9];
}
#
# Store formatted modification time
#
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 }
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/TestOnTap/PackInfo.pm view on Meta::CPAN
write_file($scriptFile, $script) || die("Failed to write '$scriptFile': $!\n");
if (!$IS_WINDOWS)
{
my $mode = (stat($scriptFile))[2];
$mode |= 0100;
chmod($mode, $scriptFile);
}
return $scriptFile;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 }
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 }
view all matches for this distribution
view release on metacpan or search on metacpan
bin/todo.pl view on Meta::CPAN
}
sub check_config_perms {
return unless -e $CONFFILE;
my @stat = stat($CONFFILE);
my $mode = $stat[2];
if($mode & S_IRGRP || $mode & S_IROTH) {
warn("Config file $CONFFILE is readable by someone other than you, fixing.");
chmod 0600, $CONFFILE;
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 }
view all matches for this distribution