CGI-Application-Framework
view release on metacpan or search on metacpan
CAF_MB_Installer.pm view on Meta::CPAN
$server_file = File::Spec->catdir($destdir, $path, $file);
}
}
foreach my $server_path (@server_paths) {
File::Path::mkpath($server_path, 0, 0777);
}
foreach my $server_path (@server_paths, @server_files) {
# skip chown on Win32 - instead notify the user
if ($^O =~ /Win32/) {
print "Make sure this path is writeable by your webserver:\n\t$server_path\n";
next;
}
print "making path writeable by webserver: $server_path\n" if $verbose;
chown $uid, $gid, $server_path
or warn "Could not make the following path writeable by the webserver - you'll have to do it manually:\n\t$server_path\n";
# Make writeable
my $current_mode = (stat $server_path)[2];
chmod $current_mode | 0600, $server_path;
}
}
sub find_caf_cgi_files { shift->_find_file_by_type('.*', 'caf_cgi' ) }
sub find_caf_config_files { shift->_find_file_by_type('conf', 'caf_config' ) }
CAF_MB_Installer.pm view on Meta::CPAN
if ($diff){
if (-f $targetfile){
forceunlink($targetfile);
}
else {
File::Path::mkpath($targetdir,0,0755);
print "mkpath($targetdir,0,0755)\n" if $verbose>1;
if ($user && $group) {
chown $user, $group, $targetdir;
print "chown($user, $group, $targetdir)\n" if $verbose>1;
}
}
File::Copy::copy($sourcefile, $targetfile);
print "Installing $targetfile\n";
utime($atime,$mtime + $is_vms, $targetfile);
print "utime($atime,$mtime,$targetfile)\n" if $verbose>1;
CAF_MB_Installer.pm view on Meta::CPAN
if ($executable) {
my $mode = (stat $targetfile)[2];
$mode = $mode | $executable;
chmod $mode, $targetfile;
print "chmod($mode, $targetfile)\n" if $verbose>1;
}
# MAG - allow changing ownership of installed files
if ($user && $group) {
chown $user, $group, $targetfile;
print "chown($user, $group, $targetfile)\n" if $verbose>1;
}
}
else {
print "Skipping $targetfile (unchanged)\n" if $verbose;
}
# File::Find can get confused if you leave the directory it
# placed you in so we chdir back to the directory it put us in.
chdir $save_cwd;
lib/CGI/Application/Framework.pm view on Meta::CPAN
installation script. However these instructions also apply to SQLite
databases you create for other projects.
Create a directory to contain the SQLite databases:
$ mkdir /home/rdice/Framework/sqlite
Change its permissions so that it is writeable by the group the
webserver runs under:
# chown .web /home/rdice/Framework/sqlite
# chmod g+w /home/rdice/Framework/sqlite
Add the group "sticky" bit so that files created in this directory
retain the group permissions:
# chmod g+s /home/rdice/Framework/sqlite
Now import the example database shema.
SQLite does not come with a command line shell. Instead, use the
( run in 1.926 second using v1.01-cache-2.11-cpan-71847e10f99 )