HTML-EP-Glimpse
view release on metacpan or search on metacpan
lib/HTML/EP/Glimpse/Install.pm view on Meta::CPAN
die "No such user: $cfg->{'httpd_user'}" unless defined $uid;
if (-d $vardir) {
my ($dev, $ino, $mode,$nlink,$u,$g) = stat $vardir;
print STDERR "Warning: Directory $vardir is not owned by the httpd",
" user, $cfg->{'httpd_user'}\n" unless $u == $uid;
print STDERR "Warning: Directory $vardir is not writable and readable",
" by the owner" unless ($mode & 0700) == 0700;
} else {
print "Creating directory $vardir, mode 0700, owned by $cfg->{'httpd_user'}.\n";
File::Path::mkpath($vardir, 0, 0700);
chown $uid, $gid, $vardir;
}
}
sub PathOf {
my $self = shift; my $prog = shift;
foreach my $dir (File::Spec->path()) {
my $f = File::Spec->catfile($dir, $prog);
return $f if -x $f;
}
( run in 0.662 second using v1.01-cache-2.11-cpan-71847e10f99 )