Apache-Voodoo
view release on metacpan or search on metacpan
lib/Apache/Voodoo/Install.pm view on Meta::CPAN
stat($dir);
if (-e _ && -d _ ) {
$self->debug(": ok");
}
else {
$pretend || mkdir($dir,770) || $self->{ignore} || die "Can't create directory $dir: $!";
$self->debug(": created");
}
$self->info("- Making sure the $dir directory is writable by apache");
$pretend || chown($uid,$gid,$dir) || $self->{ignore} || die "Can't chown directory: $!";
$pretend || chmod(0770,$dir) || $self->{ignore} || die "Can't chmod directory: $!";
$self->debug(": ok");
}
}
sub make_writeable_files {
my $self = shift;
my @files = shift;
my $pretend = $self->{'pretend'};
my $uid = $self->{'apache_uid'};
lib/Apache/Voodoo/Install.pm view on Meta::CPAN
$self->info("- Checking file $file");
if (-e $file) {
$self->debug(": ok");
}
else {
$pretend || (system("touch $file") && ($self->{ignore} || die "Can't create file: $!"));
$self->debug(": created");
}
$self->info("- Making sure the $file directory is writable by apache");
$pretend || chown($uid,$gid,$file) || $self->{ignore} || die "Can't chown file: $!";
$pretend || chmod(0600,$file) || $self->{ignore} || die "Can't chmod file: $!";
$self->debug(": ok");
}
}
# In a pine box somewhere De Morgan is either spinning violently, or applauding. We're not
# sure which.
1;
################################################################################
( run in 0.311 second using v1.01-cache-2.11-cpan-496ff517765 )