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


DBIx-Simple-Class

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

        - Slight improvements in documentation
        - Prefixed default namespace with 'DSCS::'
        to reduce possible namespace collision.

0.991   2012-09-07 17:30:04 EEST
        - Fixed failing tests on windows related to chmod.
        Thanks to Peter du Marchie van Voorthuysen.

0.99    2012-09-07 15:38:49 EEST
        - Added dbix method to the generated base/schema class
        so generated classes can have their

 view all matches for this distribution


DBIx-SpatialKey

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN

use ExtUtils::MakeMaker;

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

 view all matches for this distribution


DBIx-Web

 view release on metacpan or  search on metacpan

readme  view on Meta::CPAN

	- edit 'script.cgi' source, set appropriate '-path', '-url', '-urf', 
	  another settings.
	- create '-icons' by downloading Apache icons if Microsoft IIS
	- start 'script.cgi -setup'. File store path and 
	  sample web server configuration will be created.
	- chmod o+rw,g+rw,a+rw '-path'
	- configure web server according to '-path' files.

 view all matches for this distribution


DBIx-glueHTML

 view release on metacpan or  search on metacpan

glueHTML.pm  view on Meta::CPAN


Enables logging of SQL changes to the database automatically
without providing a callback. The script will open the file
specified, with no locking (Althoughthis might be added in 
future). The file must be writeable to the CGI, on UNIX you 
normally need to I<chmod 666 mydb-log>. However this may 
differ depending on your system and what operating system 
you have.

NOTE: check_params() MUST be called or glueHTML will not function correctly.

 view all matches for this distribution


DBM-DBass

 view release on metacpan or  search on metacpan

DBass.pm  view on Meta::CPAN

    my $self = shift;
    return 1 unless defined $self->{'_OBJ'};
    undef $self->{'_OBJ'};
    untie %$self->{'_HASHREF'};
    if ($^O eq 'MacOS' || $^O eq 'MacPerl') {
        chmod 0666, $self->{'_LOCK'};
    } else {
        flock $self->{'_FH'}, LOCK_UN;
        CORE::close $self->{'_FH'};
    }
}

DBass.pm  view on Meta::CPAN

    ($self->{'_FILE'} = $argv{'-file'}) =~ s/^([+<>]+)//;
    $self->{'_MODE'} = $1 || '';
    $self->{'_LOCK'} = $argv{'-lock'};
    $self->{'_UNTAGGED'} = {};
    if ($^O eq 'MacOS' || $^O eq 'MacPerl') {
        chmod 0444, $self->{'_LOCK'};
    } else {
        if ($self->{'_MODE'} =~ /[+>]/) {
            open FH, '>>' . $self->{'_LOCK'} or die $!;
            unless (flock FH, LOCK_EX) {
                CORE::close FH;

 view all matches for this distribution


DBM-Deep

 view release on metacpan or  search on metacpan

lib/DBM/Deep/Storage/File.pm  view on Meta::CPAN

    my @stats = stat( $self->{fh} );
    my $perms = $stats[2] & 07777;
    my $uid = $stats[4];
    my $gid = $stats[5];
    chown( $uid, $gid, $temp_filename );
    chmod( $perms, $temp_filename );
}

sub flush {
    my $self = shift;

 view all matches for this distribution


DB_File

 view release on metacpan or  search on metacpan

DB_File.pm  view on Meta::CPAN


    if ($db_version > 1 and defined $arg[4] and $arg[4] =~ /RECNO/ and
        $arg[1] and ! -e $arg[1]) {
        open(FH, ">$arg[1]") or return undef ;
        close FH ;
        chmod $arg[3] ? $arg[3] : 0666 , $arg[1] ;
    }

    DoTie_($tieHASH, @arg) ;
}

 view all matches for this distribution


DBass

 view release on metacpan or  search on metacpan

DBass.pm  view on Meta::CPAN

    my $self = shift;
    return 1 unless defined $self->{'_OBJ'};
    undef $self->{'_OBJ'};
    untie %$self->{'_HASHREF'};
    if ($^O eq 'MacOS' || $^O eq 'MacPerl') {
        chmod 0666, $self->{'_LOCK'};
    } else {
        flock $self->{'_FH'}, LOCK_UN;
        CORE::close $self->{'_FH'};
    }
}

DBass.pm  view on Meta::CPAN

    ($self->{'_FILE'} = $argv{'-file'}) =~ s/^([+<>]+)//;
    $self->{'_MODE'} = $1 || '';
    $self->{'_LOCK'} = $argv{'-lock'};
    $self->{'_UNTAGGED'} = {};
    if ($^O eq 'MacOS' || $^O eq 'MacPerl') {
        chmod 0444, $self->{'_LOCK'};
    } else {
        if ($self->{'_MODE'} =~ /[+>]/) {
            open FH, '>>' . $self->{'_LOCK'} or die $!;
            unless (flock FH, LOCK_EX) {
                CORE::close FH;

 view all matches for this distribution


DBedit

 view release on metacpan or  search on metacpan

lib/DBstorage/RDB.pm  view on Meta::CPAN

	    print FILE "$_\t$inarray{$_}\n";
	}
	close (FILE);
    } elsif($type{"type"} eq "table") {
	`cp $table /tmp/file.$$`;
	chmod 0664, "/tmp/file.$$";
	open (FILE ,">>/tmp/file.$$");
	print FILE join("\t", @inarray{@fields}) . "\n";
	close (FILE);
    } else {
	$lock->release();

lib/DBstorage/RDB.pm  view on Meta::CPAN

    } else {
	print "Error cannot write to file $filename";
	croak;
    }
    if (-e "${filename}.bak") {
	chmod 0666, "${filename}.bak";
    }
}

sub checkout {
    my ($self, $filename, $options) = @_;

 view all matches for this distribution


DDL-Oracle

 view release on metacpan or  search on metacpan

defrag.pl  view on Meta::CPAN

    check_imp_log( $script, $prttn_imp_log );
  create_shell( $script, $text );
}

my @shells = glob( "$sqldir/$prefix$tblsp.sh*" );
chmod( 0754, @shells ) == @shells or die "\nCan't chmod some shells: $!\n";

print "\n$0 completed successfully\non ", scalar localtime,"\n\n";

exit 0;

 view all matches for this distribution


DMS-Parser-XS

 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_break|5.027008||Viu
KEY_caller|5.003007||Viu
KEY_catch|5.033007||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|5.021003|n
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


DMS-XS-Parser

 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_break|5.027008||Viu
KEY_caller|5.003007||Viu
KEY_catch|5.033007||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|5.021003|n
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


DNS-Unbound

 view release on metacpan or  search on metacpan

easyxs/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|

easyxs/ppport.h  view on Meta::CPAN

KEY_break|5.027008||Viu
KEY_caller|5.003007||Viu
KEY_catch|5.033007||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

easyxs/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|5.021003|n
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

easyxs/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


DSL-Tiny

 view release on metacpan or  search on metacpan

perlcritic.rc  view on Meta::CPAN


# Put packages (especially subclasses) in separate files.
# TODO Think about test harness code, other neatness....
[Modules::ProhibitMultiplePackages]

# Write `oct(755)' instead of `0755', allows for chmod et al.
[ValuesAndExpressions::ProhibitLeadingZeros]

# from Perl-Critic-Nits
[ValuesAndExpressions::ProhibitAccessOfPrivateData]

 view all matches for this distribution


DTA-CAB

 view release on metacpan or  search on metacpan

CAB/Server/HTTP/UNIX.pm  view on Meta::CPAN


  ##-- setup socket permissions
  if ( ($srv->{socketPerms}//'') ne '' ) {
    my $sockperms = oct($srv->{socketPerms});
    $srv->vlog('info', sprintf("setting socket permissions (0%03o) on %s", $sockperms, $sockpath));
    chmod($sockperms, $sockpath)
      or $srv->logconfess("prepareLocal(): failed to set permissions for socket '$sockpath': $!");
    foreach my $dir (reverse @{$srv->{_socketDirs}||[]}) {
      $srv->vlog('info', sprintf("setting directory permissions (0%03o) on %s", ($sockperms|0111), $dir));
      chmod(($sockperms|0111), $dir)
	or $srv->logconfess("prepareLocal(): failed to set permissions for directory '$dir': $!");
    }
  }

  ##-- setup TCP relay subprocess

 view all matches for this distribution


Daemon-Generic

 view release on metacpan or  search on metacpan

t/daemon.t  view on Meta::CPAN

while (<STDIN>) {
	print \$out \$_;
}

END_LOGGER
chmod(0755, "$tmp/logger") or die;

$ENV{LOGGER_OUTPUT} = "$tmp/log";
$ENV{PATH} = "$tmp:$ENV{PATH}";

# diag read_file("$tmp/config");

 view all matches for this distribution


Daizu

 view release on metacpan or  search on metacpan

lib/Daizu/Publish.pm  view on Meta::CPAN

        delete $url_info->{fh};

        if ($file->property('svn:executable')) {
            my $umask = umask;
            if (defined $umask) {
                chmod +(0777 & ~$umask), $tmpfile
                    or die "Error making '$tmpfile' executable: $!\n";
            }
        }

        if (!-f $filename || _file_hash($tmpfile) ne _file_hash($filename) ||

 view all matches for this distribution


Daje-Plugin-Tools

 view release on metacpan or  search on metacpan

_Deparsed_XSubs.pm  view on Meta::CPAN

sub cfgetispeed;
sub cfgetospeed;
sub cfsetispeed;
sub cfsetospeed;
sub chdir;
sub chmod;
sub chown;
sub clearerr;
sub clock;
sub close;
sub closedir;

 view all matches for this distribution


Dancer-Logger-File-PerRequest

 view release on metacpan or  search on metacpan

lib/Dancer/Logger/File/PerRequest.pm  view on Meta::CPAN


    return $expected_path if -d $expected_path && -x _ && -w _;

    unless (-w $logroot and -x _) {
        my $perm = (stat $logroot)[2] & 07777;
        chmod($perm | 0700, $logroot);
        unless (-w $logroot and -x _) {
            carp "app directory '$logroot' isn't writable/executable and can't chmod it";
            return;
        }
    }
    return $expected_path;
}

 view all matches for this distribution


Dancer-Plugin-Scoped

 view release on metacpan or  search on metacpan

Makefile  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


Dancer

 view release on metacpan or  search on metacpan

lib/Dancer/Logger/File.pm  view on Meta::CPAN


    return $expected_path if -d $expected_path && -x _ && -w _;

    unless (-w $logroot and -x _) {
        my $perm = (stat $logroot)[2] & 07777;
        chmod($perm | 0700, $logroot);
        unless (-w $logroot and -x _) {
            carp "app directory '$logroot' isn't writable/executable and can't chmod it";
            return;
        }
    }
    return $expected_path;
}

 view all matches for this distribution


Dancer2-Plugin-WebService

 view release on metacpan or  search on metacpan

INSTALL  view on Meta::CPAN

  $plackup --version

Make executable any authentication script that needs root privileges, e.g the  Linux_native_authentication.sh

  /usr/bin/find $(/usr/bin/perl -M File::Basename -E 'use Dancer2::Plugin::WebService; print [ fileparse $INC{"Dancer2/Plugin/WebService.pm"} ]->[1]') -regex ".*\.\(sh\|pl|py\)\$"
  /usr/bin/find $(/usr/bin/perl -M File::Basename -E 'use Dancer2::Plugin::WebService; print [ fileparse $INC{"Dancer2/Plugin/WebService.pm"} ]->[1]') -regex ".*\.\(sh\|pl|py\)\$" -type f -exec /usr/bin/chmod 755 {} \;

Give the authentication scripts   sudo "no password prompt" e.g

  vi /etc/sudoers.d/Dancer2-Plugin-WebService

 view all matches for this distribution


Dancer2

 view release on metacpan or  search on metacpan

lib/Dancer2/CLI/Gen.pm  view on Meta::CPAN

            $content = $self->_process_template($content, $vars);
        }

        path( $to )->spew_raw( $content );
        if( $ex ) {
            $to->chmod( 0755 ) or warn "unable to change permissions for $to: $!";
        }
    }
}

sub _create_manifest {

 view all matches for this distribution


Darcs-Inventory

 view release on metacpan or  search on metacpan

t/diff.t  view on Meta::CPAN

printf "1\n2\nb\n3\n4\d\n5\n" > a
darcs record --ignore-times --all --author="test" -m "3"
printf "1\n2\nb\n3\n4\d\n5\n6\n" > a
darcs record --ignore-times --all --author="test" -m "4"

chmod +w inventory_old inventory_new
cp _darcs/hashed_inventory inventory_old
/bin/echo -n nnyd | darcs unpull
cp _darcs/hashed_inventory inventory_new
SETUP

 view all matches for this distribution


Dash

 view release on metacpan or  search on metacpan

share/assets/dash_renderer/dash_renderer.dev.js  view on Meta::CPAN

(function(global) {
var Module = function(Module) {
  Module = Module || {};
  var Module = Module;

var Module;if(!Module)Module=(typeof Module!=="undefined"?Module:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var...
var asm=(function(global,env,buffer) {
"use asm";var a=new global.Int8Array(buffer);var b=new global.Int16Array(buffer);var c=new global.Int32Array(buffer);var d=new global.Uint8Array(buffer);var e=new global.Uint16Array(buffer);var f=new global.Uint32Array(buffer);var g=new global.Float3...
// EMSCRIPTEN_START_FUNCS
function CV(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,i=0.0,j=0.0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0.0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;$=l;l=l+9...
function s_(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;a:do if((e|0)!=(f|0)){p=b+76|0;l=b+356|0;m=f;n=b+360|0;i=e+1|0;o=b+364|0;h=m-e|0;j=(i|0)==(f|0);k=e+2|0;b:do switch(a[p+(d[e>>0]|0)>>0]|0){case 4:{if(j){e=-1;break a...

 view all matches for this distribution


Data-AnyXfer

 view release on metacpan or  search on metacpan

lib/Data/AnyXfer/Elastic/Import/SpawnTask/Remote.pm  view on Meta::CPAN

        '-a',                                   # archive mode,
        '-v',                                   # verbose
        '-q',                 # keep partial files, show progress
        '--no-p',             # don't preserve permissions
        '--no-g',             # don't preserve groups
        '--chmod=ugo=rwX',    #
    );

    my $remote_target = sprintf '%s:%s', $remote_host->host,
        $args{remote_target};

lib/Data/AnyXfer/Elastic/Import/SpawnTask/Remote.pm  view on Meta::CPAN

    );

    # move the command file to the remote host
    $command_file = $class->_remote_transfer_object( $command_file, $args );
    # (and make it user executable)
    $remote_host->run( 1, qq!chmod u+x $command_file! );

    # spawn a background process running on the remote host
    $remote_host->run( 0, qq/screen -d -m $command_file/ );

    # find the PID of the remote command

 view all matches for this distribution


Data-AutoBimap

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN

  ABSTRACT_FROM     => 'lib/Data/AutoBimap.pm',
  AUTHOR            => 'Bjoern Hoehrmann <bjoern@hoehrmann.de>',
  LICENSE           => 'perl',

  'dist'            => {
    PREOP     => 'chmod 600 Makefile.PL',
    TARFLAGS	=> '--group=none --owner=bjoern --mode=a+rw -cvf',
  },

  META_MERGE        => {
    'meta-spec' => { version => 2 },

 view all matches for this distribution


Data-BloomFilter-Shared

 view release on metacpan or  search on metacpan

bloom.h  view on Meta::CPAN

 * Cross-user sharing is opt-in via a wider `mode` (e.g. 0660); the caller still
 * validates the file's contents via bf_validate_header. */
static int bf_secure_open(const char *path, mode_t mode, char *errbuf) {
    for (int attempt = 0; attempt < 100; attempt++) {
        int fd = open(path, O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW|O_CLOEXEC, mode);
        if (fd >= 0) { (void)fchmod(fd, mode); return fd; }   /* exact mode: umask narrowed the O_EXCL create */
        if (errno != EEXIST) { BF_ERR("create %s: %s", path, strerror(errno)); return -1; }
        fd = open(path, O_RDWR|O_NOFOLLOW|O_CLOEXEC);
        if (fd >= 0) return fd;
        if (errno == ENOENT) continue;   /* creator unlinked between our two opens; retry */
        BF_ERR("open %s: %s", path, strerror(errno));  /* ELOOP => symlink rejected */

 view all matches for this distribution


Data-Buffer-Shared

 view release on metacpan or  search on metacpan

buf_generic.h  view on Meta::CPAN

 * cannot pre-create it as a symlink (O_NOFOLLOW) nor open a wider-permissioned
 * copy.  Sets *created=1 iff this call won the O_EXCL race and made the file. */
static int buf_secure_open(const char *path, mode_t file_mode, int *created, char *errbuf) {
    for (int attempt = 0; attempt < 100; attempt++) {
        int fd = open(path, O_RDWR | O_CREAT | O_EXCL | O_NOFOLLOW | O_CLOEXEC, file_mode);
        if (fd >= 0) { (void)fchmod(fd, file_mode); *created = 1; return fd; }  /* exact mode: umask narrowed the create */
        if (errno != EEXIST) {
            snprintf(errbuf, BUF_ERR_BUFLEN, "create(%s): %s", path, strerror(errno));
            return -1;
        }
        fd = open(path, O_RDWR | O_NOFOLLOW | O_CLOEXEC);

 view all matches for this distribution


Data-CTable

 view release on metacpan or  search on metacpan

CTable.pm  view on Meta::CPAN

Also, if the 0666 permissions on the cache files themselves are too
liberal, you can either 1) turn off cacheing, or 2) call the
prep_cache_file() method to get the name of the cache file that would
have been written, if any, and then restrict its permissions:

	chmod (0600, $this->prep_cache_file());

=head1 READING DATA FILES

	## Replacing data in table with data read from a file

CTable.pm  view on Meta::CPAN

			
			$this->warn("Failed to cache $CacheFileName"), 
			unlink($CacheFileName), 
			goto done                                    ## Successful completion.
				unless $this->write_cache($Data, $CacheFileName);
			chmod 0666, $CacheFileName;					 ## Liberal perms if possible.
		}

		goto done;    ## Successful completion: we read from the file & maybe saved cache.
	}
	

CTable.pm  view on Meta::CPAN

	
	$this->warn("Failed to cache $CacheFileName"), 
	unlink($CacheFileName), 					 ## Delete cache if failure
	goto done                                    ## Successful completion.
		unless $this->write_cache($Data, $CacheFileName);
	chmod 0666, $CacheFileName;					 ## Liberal perms if possible.
	
  done:
	return($WriteFileName);
}

 view all matches for this distribution


( run in 2.325 seconds using v1.01-cache-2.11-cpan-600a1bdf6e4 )