view release on metacpan or search on metacpan
lib/Dunce/Files.pm view on Meta::CPAN
making silly mistakes.
The list of overridden functions is:
chdir
chmod
chop
chown
chroot
dbmopen
flock
lib/Dunce/Files.pm view on Meta::CPAN
# Commonly abused file functions.
use vars qw(@File_Functions);
@File_Functions= qw(
chdir
chmod
chown
chroot
dbmopen
flock
link
lib/Dunce/Files.pm view on Meta::CPAN
A few functions have some additional warnings:
=over 4
=item B<chmod>
Often, people will gratuitiously grant files more permissions than
they really need causing unnecessary security problems. Making
non-program files executable is a common mistake. Unnecessarily
giving world write permission is another. Dunce::Files will throw a
lib/Dunce/Files.pm view on Meta::CPAN
I<Note: It may be worthwhile to split this out into a seperate module>
=cut
override('chmod',
sub {
my $mode = $_[0];
carp "Don't make files executable without a good reason"
if $mode & 0111;
carp "Don't make files writable by others without a good reason"
if $mode & 0003;
my $wantarray = (caller(1))[5];
carp "You didn't check if chmod() succeeded"
unless defined $wantarray;
}
);
=pod
lib/Dunce/Files.pm view on Meta::CPAN
my $hash = $_[0];
carp "Hash given to dbmopen() already contains data"
if keys %$hash;
my $wantarray = (caller(1))[5];
carp "You didn't check if chmod() succeeded"
unless defined $wantarray;
}
);
=pod
view all matches for this distribution
view release on metacpan or search on metacpan
script/dwimmer_admin.pl view on Meta::CPAN
if (not $opt{dbonly}) {
foreach my $dir (qw(views public bin environments)) {
my $from = File::Spec->catdir( $dist_dir, $dir );
my $to = File::Spec->catdir( $opt{root}, $dir );
print "dircopy $from $to\n";
chmod 0644, File::Find::Rule->file()->in($to) if -d $to;
File::Copy::Recursive::dircopy( $from, $to ) or die $!;
}
my $from = File::Spec->catdir( $dist_dir, 'config.yml');
my $to = File::Spec->catdir( $opt{root} );
print "fcopy $from $to\n";
chmod 0644, File::Find::Rule->file()->in($to) if -d $to;
File::Copy::Recursive::fcopy( $from, $to ) or die $!;
}
# backup the database
if ($opt{upgrade}) {
view all matches for this distribution
view release on metacpan or search on metacpan
dyncall/test/pack-tests.sh view on Meta::CPAN
cp $I/$I _work/${NAME}
printf "./$I\n" >>_work/${NAME}/run.sh
printf "%-20s <- %-20s\n" "$I" "$PWD/$I/$I" >>_work/${NAME}/CONTENTS.txt
done
mkdir -p _packed
chmod +x _work/${NAME}/run.sh
tar -cvzf _packed/${NAME}.tar.gz -C _work ${NAME}
printf "finished: tests are in ${PWD}/_packed/${NAME}.tar.gz, execute run-all.sh\n"
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DynGig/CLI/Service.pm view on Meta::CPAN
$path = File::Spec->join( $path, 'run' );
$handle->unlink_on_destroy( 0 );
croak "failed to mv $temp $path" if system 'mv', $temp, $path;
croak "chmod $path: $!" unless chmod 0544, $path;
}
=head1 NOTE
See DynGig::CLI
view all matches for this distribution
view release on metacpan or search on metacpan
print FH "#!$^X\n" or skip "$error$!", 1;
print FH <DATA> or skip "$error$!", 1;
close FH or skip "$error$!", 1;
chmod 0755, $filename;
$e_mail->($filename);
ok(-e "sendmail.log", "we created a sendmail log");
view all matches for this distribution
view release on metacpan or search on metacpan
examples/TypeA/OpenEAFDSS-TypeA-Filter.pl view on Meta::CPAN
$dbh = DBI->connect("dbi:SQLite:dbname=$SQLITE","","");
if ($dbh) {
$dbh->do("CREATE TABLE invoices" .
" (id INTEGER PRIMARY KEY, tm, job_id, user, job_name, copies, options, signature, text);" );
}
chmod(0774, $SQLITE);
}
unless ($dbh) {
printf(STDERR "ERROR: [OpenEAFDSS] Cannot connect to sqlite db [%s]! Exiting\n", $SQLITE);
exit 1;
}
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
WriteMakefile(
dist => {
'PREOP' => 'pod2text lib/EAV/XS.pm'
. ' | tee README >$(DISTVNAME)/README;'
. ' chmod -R u=rwX,go=rX . ;',
'COMPRESS' => 'gzip -9v',
'SUFFIX' => '.gz',
},
NAME => 'EAV::XS',
VERSION_FROM => 'lib/EAV/XS.pm',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/EBook/Generator/Exporter/PDF.pm view on Meta::CPAN
# it able to find garamond files ;)
'cd "'.$tmpdir->dirname().'"; '.
"TEXMFHOME='".$self->{'options'}->{'local-tex-tree-path'}."' ".
#EBook::Generator::Parser::getCommandPath('pdflatex').' '.
(-f '/usr/bin/pdflatex' ? '/usr/bin/pdflatex' : '/usr/texbin/pdflatex ').' '.
($ebook->{'options'}->{'debug'} == 1 ? () : '-interaction=batchmode').' '.
'main.tex'.
' 2>&1';
#' > /dev/null 2>&1';
my $output = `$cmd`;
view all matches for this distribution
view release on metacpan or search on metacpan
use File::Copy;
use File::Path;
mkpath 'bin';
copy('scripts/ebook.pl','bin/ebook') or die("Could not create bin/ebook");
chmod(0755,'bin/ebook');
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ELF/Writer.pm view on Meta::CPAN
$mode= 0755 unless defined $mode;
require File::Temp;
my ($fh, $tmpname)= File::Temp::tempfile( $filename.'-XXXXXX' );
print $fh $self->serialize or croak "write: $!";
close $fh or croak "close: $!";
chmod($mode, $tmpname) or croak "chmod: $!";
rename($tmpname, $filename) or croak "rename: $!";
}
# coerce arrayref of hashrefs into arrayref of objects
sub _coerce_segments {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/EMDIS/ECS.pm view on Meta::CPAN
}
# module/package version
$VERSION = '0.44';
# file creation mode (octal, a la chmod)
$FILEMODE = 0660;
# subclass Exporter and define Exporter set up
require Exporter;
@ISA = qw(Exporter);
lib/EMDIS/ECS.pm view on Meta::CPAN
warn "Error within ECS library: $! " . $cfg->LOG_FILE;
return;
};
print LOG join("|",$timestamp,$origin,$LOG_LEVEL[$level],$text),"\n";
close LOG;
chmod $FILEMODE, $cfg->LOG_FILE if $setmode;
if ( $level >= $cfg->MAIL_LEVEL )
{
send_admin_email (join("|",$timestamp,$origin,$LOG_LEVEL[$level],$text));
}
return '';
lib/EMDIS/ECS.pm view on Meta::CPAN
return "unable to open tempfile in directory $targetdir: $!"
unless $fh;
$err = "unable to copy $filename to $tempfilename: $!"
unless copy($filename, $fh);
close $fh;
chmod $FILEMODE, $tempfilename;
return $err;
}
# ----------------------------------------------------------------------
# Move file to specified directory. If necessary, rename file to avoid
lib/EMDIS/ECS.pm view on Meta::CPAN
$err = "EMDIS::ECS::send_admin_email(): unable to create 'out' file"
unless $fh;
if($fh) {
print $fh @_;
close $fh;
chmod $FILEMODE, $filename;
}
}
if(not $err)
{
lib/EMDIS/ECS.pm view on Meta::CPAN
$fh->print("Subject: $subject\n");
$fh->print("To: $node->{addr}\n");
$fh->print("From: " . $cfg->SMTP_FROM . "\n\n");
$fh->print(@_);
$fh->close();
chmod $FILEMODE, $filename;
if ( $err ) {
$err = "EMDIS::ECS::send_ecs_message(): unable to update node $node_id: $err";
}
elsif ( not $seq_num and ($node->{encr_meta} !~ /true/i) ) {
lib/EMDIS/ECS.pm view on Meta::CPAN
SUFFIX => '.tmp');
return "EMDIS::ECS::send_encrypted_message(): unable to create temporary file"
unless $fh;
print $fh @_;
close $fh;
chmod $FILEMODE, $filename;
# create file containing encrypted message
my $encr_filename = "$filename.pgp";
my $result = '';
for ($encr_typ) {
lib/EMDIS/ECS.pm view on Meta::CPAN
unless ecs_is_configured();
open PIDFILE, ">$pidfile";
print PIDFILE "$$\n";
close PIDFILE;
chmod $FILEMODE, $pidfile;
$pid_saved = 1;
}
# ----------------------------------------------------------------------
# Select the Win32 or Unix version of timelimit_cmd
view all matches for this distribution
view release on metacpan or search on metacpan
t/config/deploy.yml view on Meta::CPAN
---
files :
- t/test.t
- index.cgi :
chmod : 755
- MANIFEST
view all matches for this distribution
view release on metacpan or search on metacpan
script/etlp view on Meta::CPAN
| File | Purpose |
+---------------+----------------------------------------------+
| etlp | This script |
| env.conf | Defines the environment. Make sure this is |
| | only readable by the OS account: |
| | chmod 600 env.cfg |
| <source>.conf | Configuration of the pipeline processing |
| <file>.ctl | Defines the data file fileds and validation |
| | rules |
+---------------+----------------------------------------------+
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
EOF
my $mm = MM->new({EV::MakeMaker::ev_args (
dist => {
PREOP => 'pod2text ADNS.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;',
COMPRESS => 'gzip -9v',
SUFFIX => '.gz',
},
NAME => "EV::ADNS",
VERSION_FROM => "ADNS.pm",
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
%glib = ExtUtils::PkgConfig->find ("glib-2.0");
my $mm = MM->new({EV::MakeMaker::ev_args (
dist => {
PREOP => 'pod2text EV.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;',
COMPRESS => 'gzip -9v',
SUFFIX => '.gz',
},
NAME => "EV::Glib",
VERSION_FROM => "Glib.pm",
view all matches for this distribution