Result:
found more than 1006 distributions - search limited to the first 2001 files matching your query ( run in 0.866 )


Business-FO-Postalcode

 view release on metacpan or  search on metacpan

t/perlcriticrc  view on Meta::CPAN

# set_themes                         = bugs certrec core pbp
# add_themes                         =
# severity                           = 5
# maximum_violations_per_document    = no_limit

# Don't allow any leading zeros at all.  Otherwise builtins that deal with Unix permissions, e.g. chmod, don't get flagged.
# strict = 0


# Long chains of method calls indicate tightly coupled code.
[ValuesAndExpressions::ProhibitLongChainsOfMethodCalls]

 view all matches for this distribution


Business-GL-Postalcode

 view release on metacpan or  search on metacpan

t/perlcriticrc  view on Meta::CPAN

# set_themes                         = bugs certrec core pbp
# add_themes                         =
# severity                           = 5
# maximum_violations_per_document    = no_limit

# Don't allow any leading zeros at all.  Otherwise builtins that deal with Unix permissions, e.g. chmod, don't get flagged.
# strict = 0


# Long chains of method calls indicate tightly coupled code.
[ValuesAndExpressions::ProhibitLongChainsOfMethodCalls]

 view all matches for this distribution


Business-KontoCheck

 view release on metacpan or  search on metacpan

0_history.txt  view on Meta::CPAN


 - Die main-Routine im Beispielsprogramm wurde etwas erweitert; falls keine
   Datei angegeben wird, geht das Programm in einen interaktiven Modus, in dem
   interaktiv diverse Tests gemacht werden können sowie die LUT-Datei neu
   geladen werden kann; außerdem kann auch das benutzte Systemdatum gesetzt
   werden, um einen Datumswechsel zu simulieren. Hilfe gibt es in dem Batchmodus
   mit dem Kommando -h.

 - Für die LUT-Datei können jetzt mehrere Suchpfade angegeben werden, die
   nacheinander durchsucht werden; außerdem sind mehrere Default-Dateinamen
   möglich. Falls bei der Initialisierung kein Dateiname für die LUT-Datei

 view all matches for this distribution


Business-OnlinePayment-Cardstream

 view release on metacpan or  search on metacpan

Makefile.old  view on Meta::CPAN



# --- MakeMaker tools_other section:

SHELL = /bin/sh
CHMOD = chmod
CP = cp
LD = gcc
MV = mv
NOOP = $(SHELL) -c true
RM_F = rm -f

Makefile.old  view on Meta::CPAN

POD2MAN_EXE = /usr/bin/pod2man
POD2MAN = $(PERL) -we '%m=@ARGV;for (keys %m){' \
-e 'next if -e $$m{$$_} && -M $$m{$$_} < -M $$_ && -M $$m{$$_} < -M "Makefile";' \
-e 'print "Manifying $$m{$$_}\n";' \
-e 'system(qq[$$^X ].q["-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" $(POD2MAN_EXE) ].qq[$$_>$$m{$$_}])==0 or warn "Couldn\047t install $$m{$$_}\n";' \
-e 'chmod(oct($(PERM_RW))), $$m{$$_} or warn "chmod $(PERM_RW) $$m{$$_}: $$!\n";}'

manifypods : pure_all Cardstream.pm
	@$(POD2MAN) \
	Cardstream.pm \
	$(INST_MAN3DIR)/Business::OnlinePayment::Cardstream.$(MAN3EXT)

 view all matches for this distribution


Business-OnlinePayment-Ogone

 view release on metacpan or  search on metacpan

lib/Business/OnlinePayment/Ogone.pm  view on Meta::CPAN

    export OGONE_USERID=bob_api
    export OGONE_PSWD=foobar
    
Limit access to the F<~/.ogone> file

    chmod 600 ~/.ogone

Then load this file into your env en perform the testcases:

    source ~/.ogone
    perl -I lib/ t/*.t

 view all matches for this distribution


Business-Payment-SwissESR

 view release on metacpan or  search on metacpan

lib/Business/Payment/SwissESR/PaymentSlip.pm  view on Meta::CPAN


has tmpDir => sub {
    my $tmpDir = '/tmp/SwissESR'.$$;
    if (not -d $tmpDir){
       mkdir $tmpDir or die "Failed to create $tmpDir";
       chmod 0700, $tmpDir;
    }
    return $tmpDir;
};

# clean up the temp data

 view all matches for this distribution


C-DynaLib

 view release on metacpan or  search on metacpan

script/pl2exe.pl  view on Meta::CPAN

    print OUT "#!perl\n";
}
print OUT $_, <IN>;
close IN;
close OUT;
chmod 0755, $name;

 view all matches for this distribution


C3000

 view release on metacpan or  search on metacpan

Makefile.old  view on Meta::CPAN


# --- MakeMaker tool_xsubpp section:


# --- MakeMaker tools_other section:
CHMOD = $(ABSPERLRUN) -MExtUtils::Command -e chmod --
CP = $(ABSPERLRUN) -MExtUtils::Command -e cp --
MV = $(ABSPERLRUN) -MExtUtils::Command -e mv --
NOOP = rem
NOECHO = @
RM_F = $(ABSPERLRUN) -MExtUtils::Command -e rm_f --

 view all matches for this distribution


CBOR-XS

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN


use Canary::Stability CBOR::XS => 1, 5.010001;

WriteMakefile(
    dist	 => {
	             PREOP	=> 'pod2text XS.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;',
	             COMPRESS	=> 'gzip -9v',
	             SUFFIX	=> '.gz',
	            },
    VERSION_FROM => "XS.pm",
    NAME         => "CBOR::XS",

 view all matches for this distribution


CDB_File

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

check_type_and_open|5.009003||Viu
check_uni|5.003007||Viu
check_utf8|5.008000||Viu
check_utf8_print|5.013009||Viu
child_offset_bits|5.009003||Viu
chmod|5.005000||Viu
chsize|5.005000||Viu
ckDEAD|5.006000||Viu
ck_entersub_args_core|||iu
ck_entersub_args_list|5.013006|5.013006|
ck_entersub_args_proto|5.013006|5.013006|

ppport.h  view on Meta::CPAN

KEY_bless|5.003007||Viu
KEY_break|5.027008||Viu
KEY_caller|5.003007||Viu
KEY_chdir|5.003007||Viu
KEY_CHECK|5.006000||Viu
KEY_chmod|5.003007||Viu
KEY_chomp|5.003007||Viu
KEY_chop|5.003007||Viu
KEY_chown|5.003007||Viu
KEY_chr|5.003007||Viu
KEY_chroot|5.003007||Viu

ppport.h  view on Meta::CPAN

Perl_langinfo|5.027004|5.027004|n
PERL_LANGINFO_H|5.027004||Viu
PERL_LAST_5_18_0_INTERP_MEMBER|5.017009||Viu
Perl_ldexp|5.021003||Viu
PerlLIO_access|5.005000||Viu
PerlLIO_chmod|5.005000||Viu
PerlLIO_chown|5.005000||Viu
PerlLIO_chsize|5.005000||Viu
PerlLIO_close|5.005000||Viu
PerlLIO_dup2|5.005000||Viu
PerlLIO_dup2_cloexec|5.027008||Viu

ppport.h  view on Meta::CPAN

Perl_pp_aelemfast_lex|5.015000||Viu
Perl_pp_andassign|5.013009||Viu
Perl_pp_avalues|5.013009||Viu
Perl_pp_bind|5.013009||Viu
Perl_pp_bit_xor|5.013009||Viu
Perl_pp_chmod|5.013009||Viu
Perl_pp_chomp|5.013009||Viu
Perl_pp_connect|5.013009||Viu
Perl_pp_cos|5.013009||Viu
Perl_pp_custom|5.013009||Viu
Perl_pp_dbmclose|5.013009||Viu

 view all matches for this distribution


CDS

 view release on metacpan or  search on metacpan

lib/CDS.pm  view on Meta::CPAN

	$ui->command('cds check permissions [of STORE]');
	$ui->p('Checks the permissions (owner, mode) of all accounts, boxes, box entries, and objects of the store, and reports any error. The permission scheme (user, group, or everybody) is derived from the "accounts" and "objects" folders.');
	$ui->p('If the store is omitted, the selected store is used.');
	$ui->space;
	$ui->command('cds fix permissions [of STORE]');
	$ui->p('Same as above, but tries to fix the permissions (chown, chmod) instead of just reporting them.');
	$ui->space;
	$ui->command('cds show permission scheme [of STORE]');
	$ui->p('Reports the permission scheme of the store.');
	$ui->space;
	$ui->command('cds set permission scheme [of STORE] to (user USER|group GROUP|everybody)');

lib/CDS.pm  view on Meta::CPAN

	# Create the folders to here if necessary
	for my $intermediateFolder (CDS->intermediateFolders($folder)) {
		mkdir $intermediateFolder, 0755;
	}

	# mkdir (if it does not exist yet) and chmod (if it does exist already)
	mkdir $folder, $o->{permissions}->baseFolderMode;
	chmod $o->{permissions}->baseFolderMode, $folder;
	chown $o->{permissions}->uid // -1, $o->{permissions}->gid // -1, $folder;

	# Check if the result is correct
	my @s = stat $folder;
	return $o->{ui}->error('Unable to create ', $o->{foldername}, '.') if ! scalar @s;

lib/CDS.pm  view on Meta::CPAN

	open(my $fh, '>:bytes', $temporaryFile) || return;
	print $fh @_;
	close $fh;

	# Set the permissions
	chmod $mode, $temporaryFile;
	my $uid = $o->uid;
	my $gid = $o->gid;
	chown $uid // -1, $gid // -1, $temporaryFile if defined $uid && $uid != $< || defined $gid && $gid != $(;
	return $temporaryFile;
}

lib/CDS.pm  view on Meta::CPAN


	# Create the folder (note: mode is altered by umask)
	my $success = mkdir $folder, $mode;

	# Set the permissions
	chmod $mode, $folder;
	my $uid = $o->uid;
	my $gid = $o->gid;
	chown $uid // -1, $gid // -1, $folder if defined $uid && $uid != $< || defined $gid && $gid != $(;
	return $success;
}

lib/CDS.pm  view on Meta::CPAN

			return $logger->setError($item) if $count < 1;
		}

		# Fix mode
		if ($wrongMode) {
			my $count = chmod $expectedMode, $item;
			return $logger->setError($item) if $count < 1;
		}
	} else {
		# Everything is OK
		$logger->correct($item, $mode, $uid, $gid);

 view all matches for this distribution


CGI-Alert

 view release on metacpan or  search on metacpan

t/01basic.t  view on Meta::CPAN

-


close $script_fh;

chmod 0500 => $script_path;

my @expect = <DATA>;

plan tests => 1 + @expect;

 view all matches for this distribution


CGI-AppBuilder-Log

 view release on metacpan or  search on metacpan

Log.pm  view on Meta::CPAN

        print $fh2 $t; 
    }
    print $fh2 "# End at $b{end_time} $b{result}\n\n"; 
    undef $fh1;   # close breif  file hanlder
    undef $fh2;   # close detail file handler
    chmod 0777, $fn1, $fn2;
}

1;

=head1 CODING HISTORY

 view all matches for this distribution


CGI-AppBuilder-MapDisp2

 view release on metacpan or  search on metacpan

MapDisp2.pm  view on Meta::CPAN

        $m .= "could not mkdir - $dir: $!: $@<br>\n";
      $s->echo_msg($m,0);
      return;
    } 
    if ($^O !~ /^MSWin/i) { 				# non window
        system("chmod -R ugo+w $dir"); 
    }
  }
}

sub backup_file {

 view all matches for this distribution


CGI-AppBuilder-MapSpec

 view release on metacpan or  search on metacpan

MapSpec.pm  view on Meta::CPAN

    return; 
  }
  if (!-d $sqlout) {
      eval { mkpath($sqlout,0,0777) };
      croak "ERR: could not mkdir - $sqlout: $!: $@<br>\n" if ($@);
      system("chmod -R ugo+w $sqlout") 		if ($^O !~ /^MSWin/i); 	# non window
  } 
  if (!-d $odr) {
      eval { mkpath($odr,0,0777) };
      # mkdir $odr; 
      croak "ERR: could not mkdir - $odr: $!: $@<br>\n" if ($@);
      system("chmod -R ugo+w $odr") 		if ($^O !~ /^MSWin/i); 	# non window
  } 
  if (!-d $sdr) {
    my $y4	= strftime "%Y", localtime;
    my $mn	= strftime "%m", localtime;
    my $dy	= strftime "%d", localtime;

MapSpec.pm  view on Meta::CPAN

    for my $i (0..$#a) { 
      my $dd = $a[$i]; 
      if (!-d $dd) { 
        eval { mkpath($dd,0,0777) }; 
        croak "ERR: could not mkdir - $dd: $!: $@<br>\n" if ($@);
        system("chmod -R ugo+w $dd") 		if ($^O !~ /^MSWin/i); 	# non window
      } 
    }
  } 

  # 1. get list information

MapSpec.pm  view on Meta::CPAN

    return; 
  }
  if (!-d $sqlout) {
      eval { mkpath($sqlout,0,0777) };
      croak "ERR: ($prg) could not mkdir - $sqlout: $!: $@<br>\n" if ($@);
      system("chmod -R ugo+w $sqlout") 		if ($^O !~ /^MSWin/i); 	# non window
  } 
  if (!-d $odr) {
      # eval { mkpath($odr,0,0777) };
      mkdir $odr; 
      croak "ERR: ($prg) could not mkdir - $odr: $!: $@<br>\n" if ($@);
      system("chmod -R ugo+w $odr") 		if ($^O !~ /^MSWin/i); 	# non window
  } 
  if (!-d $sdr) {
      eval { mkpath($sdr,0,0777) }; 
      croak "ERR: ($prg) could not mkdir - $sdr: $!: $@<br>\n" if ($@);
      system("chmod -R ugo+w $sdr") 		if ($^O !~ /^MSWin/i); 	# non window
  } 

  # 1. get list information
  $s->echo_msg(" 1. get list info for list id $lid...", 1); 
  my $whr = " WHERE  list_id = $lid ";

 view all matches for this distribution


CGI-AppBuilder-PLSQL

 view release on metacpan or  search on metacpan

PLSQL.pm  view on Meta::CPAN

    # mkdir $pr->{tgt_dir}, 0777 if (! -d $pr->{tgt_dir});
    if (! -d $pr->{log_dir}) { 
      eval { mkpath($pr->{log_dir},0,0777) };
      croak "ERR: could not mkdir - $pr->{log_dir}: $!: $@<br>\n" if ($@);
      if ($^O !~ /^MSWin/i) { 				# non window
        system("chmod -R ugo+w $pr->{log_dir}"); 
      }
    } 
    my $radr = $ENV{REMOTE_ADDR}; $radr =~ s/\./_/g;
    my $tmpd = join $ds,$pr->{web_outdir},$sn,$radr,$pr->{y4},$pr->{mm},$pr->{dd};
    if (! -d $tmpd && ! $pr->{is_tasksql}) {
      eval { mkpath($tmpd,0,0777) };
      croak "ERR: could not mkdir - $tmpd: $!: $@<br>\n" if ($@);
      if ($^O !~ /^MSWin/i) { 				# non window
        system("chmod -R ugo+w $tmpd"); 
      }
    } 
    my $tpf1 = join $ds, $tmpd, "${tsk}_$pr->{tm}.sql"; 

    # 5. compose command

 view all matches for this distribution


CGI-AppBuilder-TaskLoads

 view release on metacpan or  search on metacpan

TaskLoads.pm  view on Meta::CPAN

  if (!-d $ofd) {
      $s->echo_msg("INFO: ($prg) make dir - $ofd.", 2);
      eval { mkpath($ofd,0,0777) };
      # mkdir $ofd;
      croak "ERR: ($prg) could not mkdir - $ofd: $!: $@<br>\n" if ($@);
      system("chmod -R ugo+w $ofd") 		if ($^O !~ /^MSWin/i); 	# non window
  }

  if ($mfn && ! -f $mfn) {
    croak "ERR: ($prg) could not find mfn file - $mfn";
  }

 view all matches for this distribution


CGI-Application-Bouquet-Rose

 view release on metacpan or  search on metacpan

lib/CGI/Application/Bouquet/Rose.pm  view on Meta::CPAN

	shell> perl Build
	shell> sudo perl Build install

	Step 9: Install the FastCGId script:
	shell> sudo cp -r htdocs/search /var/www
	shell> sudo chmod a+x /var/www/search/wine.fcgi

	Step 10: Patch httpd.conf (see httpd/httpd.conf.patch):
	LoadModule fcgid_module modules/mod_fcgid.so
	<Location /search>
	    SetHandler fcgid-script

 view all matches for this distribution


CGI-Application-Demo-Ajax

 view release on metacpan or  search on metacpan

lib/CGI/Application/Demo/Ajax.pm  view on Meta::CPAN

Alternately, edit the now installed .htajax.conf, to adjust tmpl_path.

=head2 Install the trivial instance script

	shell>cp distro's/htdocs/ajax.cgi to /usr/lib/cgi-bin
	shell>sudo chmod 755 /usr/lib/cgi-bin/ajax.cgi

=head2 Install the fancy instance script

	shell>cd /var/www
	shell>sudo mkdir local
	shell>cp distro's/htdocs/ajax to local
	shell>sudo chmod 755 local/ajax

=head2 Configure C<Apache> to use local/ajax

If in fancy mode, add these to httpd.conf:

 view all matches for this distribution


CGI-Application-Demo-Basic

 view release on metacpan or  search on metacpan

lib/CGI/Application/Demo/Basic/Util/Create.pm  view on Meta::CPAN

	my($dsn)    = $$config{dsn};
	$dsn        =~ s/.+dbname=(.+)/$1/;

	if ($self -> db_vendor eq 'SQLITE')
	{
		`chmod a+w $dsn`;
	}

}	# End of create_all_tables.

# --------------------------------------------------

 view all matches for this distribution


CGI-Application-Framework

 view release on metacpan or  search on metacpan

CAF_MB_Installer.pm  view on Meta::CPAN

        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

#    (note that umask might not be correct if the user is installing on behalf of a different user,
#     e.g. a web virtual host user with a restrictive group)
#

sub forceunlink {
    chmod 0666, $_[0];
    unlink $_[0] or Carp::croak("Cannot forceunlink $_[0]: $!")
}

sub caf_install_example_files {
    my ($self,$from_to,$verbose,$user,$group) = @_;

CAF_MB_Installer.pm  view on Meta::CPAN

                my $executable = (stat $sourcefile)[2] & 0111;

                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;

 view all matches for this distribution


CGI-Application-Muto-withoutworldwriteables

 view release on metacpan or  search on metacpan

Makefile  view on Meta::CPAN


# --- MakeMaker tool_xsubpp section:


# --- MakeMaker tools_other section:
CHMOD = $(ABSPERLRUN) -MExtUtils::Command -e "chmod" --
CP = $(ABSPERLRUN) -MExtUtils::Command -e "cp" --
MV = $(ABSPERLRUN) -MExtUtils::Command -e "mv" --
NOOP = rem
NOECHO = @
RM_F = $(ABSPERLRUN) -MExtUtils::Command -e "rm_f" --

 view all matches for this distribution


CGI-Application-Plugin-AJAXUpload

 view release on metacpan or  search on metacpan

t/02.warnings.t  view on Meta::CPAN


subtest 'upload_subdir is not writeable' => sub{
    plan tests => 3;
    my $tmpdir = valid_dir();
    my $tmpdir_name = $tmpdir->dirname;
    chmod 300, "$tmpdir_name/img/uploads";
    my $app = TestWebApp->new(
        QUERY=>$tcm->create_cgi(),
        PARAMS=>{
            document_root=>sub {
                my $c = shift;

 view all matches for this distribution


CGI-Application-Plugin-ActionDispatch

 view release on metacpan or  search on metacpan

Makefile.old  view on Meta::CPAN

# --- MakeMaker tool_xsubpp section:


# --- MakeMaker tools_other section:
SHELL = /bin/sh
CHMOD = chmod
CP = cp
MV = mv
NOOP = $(TRUE)
NOECHO = @
RM_F = rm -f

 view all matches for this distribution


CGI-Application-Plugin-Authentication

 view release on metacpan or  search on metacpan

local/lib/perl5/Module/Build/Base.pm  view on Meta::CPAN

  $@ = $status->{message};
  return 0;
}

sub make_executable {
  # Perl's chmod() is mapped to useful things on various non-Unix
  # platforms, so we use it in the base class even though it looks
  # Unixish.

  my $self = shift;
  foreach (@_) {
    my $current_mode = (stat $_)[2];
    chmod $current_mode | oct(111), $_;
  }
}

sub is_executable {
  # We assume this does the right thing on generic platforms, though

local/lib/perl5/Module/Build/Base.pm  view on Meta::CPAN


  @$lines = grep {!exists $existing_files->{$_}} @$lines
    or return;

  my $mode = (stat $manifest)[2];
  chmod($mode | oct(222), $manifest) or die "Can't make $manifest writable: $!";

  open(my $fh, '<', $manifest) or die "Can't read $manifest: $!";
  my $last_line = (<$fh>)[-1] || "\n";
  my $has_newline = $last_line =~ /\n$/;
  close $fh;

  open($fh, '>>', $manifest) or die "Can't write to $manifest: $!";
  print $fh "\n" unless $has_newline;
  print $fh map "$_\n", @$lines;
  close $fh;
  chmod($mode, $manifest);

  $self->log_verbose(map "Added to $manifest: $_\n", @$lines);
}

sub _sign_dir {

local/lib/perl5/Module/Build/Base.pm  view on Meta::CPAN

      (grep { length($_) >= 100 } @$files) ? 0 : 1;

    my $tar   = Archive::Tar->new;
    $tar->add_files(@$files);
    for my $f ($tar->get_files) {
      $f->mode($f->mode & ~022); # chmod go-w
    }
    $tar->write("$file.tar.gz", 1);
  }
}

local/lib/perl5/Module/Build/Base.pm  view on Meta::CPAN

  File::Path::mkpath(File::Basename::dirname($to_path), 0, oct(777));

  $self->log_verbose("Copying $file -> $to_path\n");

  if ($^O eq 'os2') {# copy will not overwrite; 0x1 = overwrite
    chmod 0666, $to_path;
    File::Copy::syscopy($file, $to_path, 0x1) or die "Can't copy('$file', '$to_path'): $!";
  } else {
    File::Copy::copy($file, $to_path) or die "Can't copy('$file', '$to_path'): $!";
  }

  # mode is read-only + (executable if source is executable)
  my $mode = oct(444) | ( $self->is_executable($file) ? oct(111) : 0 );
  chmod( $mode, $to_path );

  return $to_path;
}

sub up_to_date {

 view all matches for this distribution


CGI-Application-Plugin-Authorization-Driver-ActiveDirectory

 view release on metacpan or  search on metacpan

Makefile.old  view on Meta::CPAN

# --- MakeMaker tool_xsubpp section:


# --- MakeMaker tools_other section:
SHELL = /bin/sh
CHMOD = chmod
CP = cp
MV = mv
NOOP = $(SHELL) -c true
NOECHO = @
RM_F = rm -f

 view all matches for this distribution


CGI-Application-Plugin-Config-Simple

 view release on metacpan or  search on metacpan

t/main.t  view on Meta::CPAN

# 17..20
# lets cause some errors
SKIP: {
    # try to change it's permissions
    my $new_file = 't/test_unwriteable.ini';
    chmod(0000, $new_file) || die "Could not chmod $new_file! $!";
    # skip these tests if we can still read the file
    # cause we're probably running as root
    skip('user wont have permission issues', 4) if( -r $new_file );

    # un readable file
    $self->config_file($new_file);
    eval { $self->config_param('param1') };
    like($@, qr/Permission denied/i, 'un readable file');

    # un writeable file
    chmod(0400, $new_file)
        || die "Could not chmod $new_file! $!";
    my $value = $self->config_file($new_file);
    is($value, $new_file, 'new unwriteable file');
    eval { $self->config_param(param1 => 'xyz') };
    like($@, qr/Could not write/i, 'could not write');

 view all matches for this distribution


CGI-Application-Plugin-Config-Std

 view release on metacpan or  search on metacpan

t/lib/cgi/application/plugin/config/std.t  view on Meta::CPAN

# 17..20
# lets cause some errors
SKIP: {
    # try to change it's permissions
    my $new_file = 't/test_unwriteable.ini';
    chmod(0000, $new_file) || die "Could not chmod $new_file! $!";
    # skip these tests if we can still read the file
    # cause we're probably running as root
    skip('user wont have permission issues', 4) if( -r $new_file );

    # un readable file
    $self->config_file($new_file);
    throws_ok { $self->config_param('param1') }
              qr/Permission denied/i, 'un readable file';

    # un writeable file
    chmod(0400, $new_file)
        || die "Could not chmod $new_file! $!";
    my $value = $self->config_file($new_file);
    is($value, $new_file, 'new unwriteable file');
    lives_ok  { $self->config_param(param1 => 'xyz') }
              'Set param ok';
    throws_ok { $self->commit_config() }

 view all matches for this distribution


( run in 0.866 second using v1.01-cache-2.11-cpan-496ff517765 )