CGI-Application-Framework
view release on metacpan or search on metacpan
);
$user = 'nobody';
$group = 'nobody';
$webuser = 'nobody';
$webgroup = 'nobody';
if ($^O !~ /Win32/) {
my $default_user = getpwuid($<);
my $default_group = getgrgid($();
my @users = ($default_user, qw(www-data web www nobody));
my @groups = ($default_group, qw(www-data web www nobody));
$user = $builder->multiple_choice(
question_name => 'user',
preamble => qq{
Examples User
-------------
What user do you want the installed example files
CAF_MB_Installer.pm view on Meta::CPAN
$self->notes('path_sqlite'),
$self->notes('path_weblog'),
$self->notes('path_session_dir'),
$self->notes('path_session_locks'),
);
my @server_files = (
$self->notes('file_sqlite_db'),
);
my $uid = $self->notes('web_server_user_num');
my $gid = $self->notes('web_server_group_num');
my $destdir = $self->{properties}{destdir} || '';
foreach my $server_path (@server_paths) {
if ($destdir) {
# Need to remove volume from $map{$_} using splitpath, or else
# we'll create something crazy like C:\Foo\Bar\E:\Baz\Quux
my ($volume, $path) = File::Spec->splitpath( $server_path, 1 );
$server_path = File::Spec->catdir($destdir, $path);
CAF_MB_Installer.pm view on Meta::CPAN
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' ) }
( run in 1.989 second using v1.01-cache-2.11-cpan-5735350b133 )