view release on metacpan or search on metacpan
} else {
open my $cfile, '>', $config_file or die "Unable to create $config_file: $!\n";
close $cfile;
}
}
chmod 0600, $config_file if (defined $config_file);
}
my ($c, $alias, $url, $key, $user, $passwd, %instances);
my $history_file = catfile($conf_dir, 'history');
my @history;
view all matches for this distribution
view release on metacpan or search on metacpan
script/perlall view on Meta::CPAN
$c->addopts('latest|l');
my $branch = $c->options->{latest} ? 'master' : 'release';
$c->_system("wget","--no-check-certificate","-O","perlall.tmp",
"http://github.com/rurban/App-perlall/raw/$branch/script/perlall");
if (-s "perlall.tmp" > 5000) {
$c->_system("chmod","0755","perlall.tmp");
$c->_system("mv","perlall.tmp",-l $0 ? readlink($0) : $0) or
"$0 updated"
} else {
"wget download from github failed"
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/perlbrew.pm view on Meta::CPAN
close($fh);
copy( $executable, $target );
}
chmod( 0755, $target );
my $path = $target->stringify_with_tilde;
print "perlbrew is installed: $path\n" unless $self->{quiet};
lib/App/perlbrew.pm view on Meta::CPAN
unless ( -x $patchperl && -f _ ) {
$patchperl = "patchperl";
}
push @preconfigure_commands, 'chmod -R +w .', $patchperl;
}
my $configure_flags = $self->env("PERLBREW_CONFIGURE_FLAGS") || '-de';
my @configure_commands = (
lib/App/perlbrew.pm view on Meta::CPAN
$self->root->bin->mkpath;
open my $OUT, '>', $out or die "cannot open file($out): $!";
print $OUT $body;
close $OUT;
chmod 0755, $out;
print "\n$program_name is installed to\n\n $out\n\n" unless $self->{quiet};
}
sub do_exit_with_error_code {
my ( $self, $code ) = @_;
lib/App/perlbrew.pm view on Meta::CPAN
my $TMPDIR = $ENV{TMPDIR} || "/tmp";
my $TMP_PERLBREW = App::Perlbrew::Path->new( $TMPDIR, "perlbrew" );
http_download( 'https://raw.githubusercontent.com/gugod/App-perlbrew/master/perlbrew', $TMP_PERLBREW );
chmod 0755, $TMP_PERLBREW;
my $new_version = qx($TMP_PERLBREW version);
chomp $new_version;
if ( $new_version =~ /App::perlbrew\/(\d+\.\d+)$/ ) {
$new_version = $1;
}
lib/App/perlbrew.pm view on Meta::CPAN
);
open my $fh, ">", "$output" or die $!;
print $fh $shim;
close $fh;
chmod 0755, $output;
if ( $self->{verbose} ) {
print "The shim $output is made.\n";
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
git/setup.sh view on Meta::CPAN
#!/usr/bin/env bash
chmod +x git/hooks/pre-commit
cd .git/hooks
ln -s ../../git/hooks/pre-commit
view all matches for this distribution
view release on metacpan or search on metacpan
examples/install.sh view on Meta::CPAN
echo "to your $profile file"
echo ""
mkdir -p "$dir"
$get $url > "$dir/perluse"
chmod +x "$dir/perluse"
"$dir/perluse"
view all matches for this distribution
view release on metacpan or search on metacpan
git/setup.sh view on Meta::CPAN
#!/usr/bin/env bash
chmod +x git/hooks/pre-commit
cd .git/hooks
ln -s ../../git/hooks/pre-commit
view all matches for this distribution
view release on metacpan or search on metacpan
t/oddmuse-wiki.pl view on Meta::CPAN
sub IsDir { return -d encode_utf8(shift); }
sub ZeroSize { return -z encode_utf8(shift); }
sub Unlink { return unlink(map { encode_utf8($_) } @_); }
sub Modified { return (stat(encode_utf8(shift)))[9]; }
sub Glob { return map { decode_utf8($_) } bsd_glob(encode_utf8(shift)); }
sub ChangeMod { return chmod(shift, map { encode_utf8($_) } @_); }
sub Rename { return rename(encode_utf8($_[0]), encode_utf8($_[1])); }
sub RemoveDir { return rmdir(encode_utf8(shift)); }
sub ChangeDir { return chdir(encode_utf8(shift)); }
sub CreateDir {
view all matches for this distribution
view release on metacpan or search on metacpan
- run it from where you unpacked it -- as either of
./pl ...
perl pl ...
- copy pl to some directory in your PATH, e.g. ~/bin -- you may need to
chmod a+x pl
You can save some space (and maybe a bit of starting time) by compacting pl:
./pl -rp 'last if /=head1/; s/^(?: |\t+ *)//; $. > 1 ? s/^(?:#.*|\cL)?\n// : s/env //; s/\s+#.*//' pl > DESTINATION/pl
On Windows you have 3 options:
view all matches for this distribution
view release on metacpan or search on metacpan
- run it from where you unpacked it -- as either of
./pltest ...
perl pltest ...
- copy pltest to some directory in your PATH, e.g. ~/bin -- you may need to
chmod a+x pltest
You can save some space (and maybe a bit of starting time) by compacting pltest:
./pltest -rp 'last if /=head1/; s/^(?: |\t+ *)//; $. > 1 ? s/^(?:#.*|\cL)?\n// : s/env //; s/\s+#.*//' pltest > DESTINATION/pltest
On Windows you have 3 options:
view all matches for this distribution
view release on metacpan or search on metacpan
bin/plx-packed view on Meta::CPAN
$fatpacked{"App/cpanminus/Dependency.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_CPANMINUS_DEPENDENCY';
package App::cpanminus::Dependency;use strict;use CPAN::Meta::Requirements;sub from_prereqs {my($class,$prereqs,$phases,$types)=@_;my@deps;for my$type (@$types){push@deps,$class->from_versions($prereqs->merged_requirements($phases,[$type])->as_st...
APP_CPANMINUS_DEPENDENCY
$fatpacked{"App/cpanminus/script.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_CPANMINUS_SCRIPT';
package App::cpanminus::script;use strict;use Config;use Cwd ();use App::cpanminus;use App::cpanminus::Dependency;use File::Basename ();use File::Find ();use File::Path ();use File::Spec ();use File::Copy ();use File::Temp ();use Getopt::Long ();...
It appears your cpanm executable was installed via `perlbrew install-cpanm`.
cpanm --self-upgrade won't upgrade the version of cpanm you're running.
Run the following command to get it upgraded.
view all matches for this distribution
view release on metacpan or search on metacpan
script/powerdiff view on Meta::CPAN
if (($m1 & PERM_ALL) != ($m2 & PERM_ALL)) {
my $prev = sprintf '%04o', $m1 & PERM_ALL;
my $perms = sprintf '%04o', $m2 & PERM_ALL; # TODO use text form?
my $m = $m2 & ~PERM_ALL;
if ($m == MODE_DIR) {
push @SH_POST, "chmod $perms $pathname/ # was $prev";
}
elsif ($m == MODE_FIFO || $m == MODE_REG) {
push @SH_POST, "chmod $perms $pathname # was $prev";
}
}
return;
}
view all matches for this distribution
view release on metacpan or search on metacpan
script/_ppgrep view on Meta::CPAN
# return [$type, $clsets] unless $err;
# die "Can't check whether $type is a builtin Sah type: $err"
# unless $err =~ /\ACan't locate/;
#
# # not a type, try a schema under Sah::Schema
# my $schmod = "Sah::Schema::$type";
# (my $schmod_pm = "$schmod.pm") =~ s!::!/!g;
# eval { require $schmod_pm; 1 };
# die "Not a known built-in Sah type '$type' (can't locate ".
# "Data::Sah::Type::$type) and not a known schema name '$type' ($@)"
# if $@;
# no strict 'refs';
# my $sch2 = ${"$schmod\::schema"};
# die "BUG: Schema module $schmod doesn't contain \$schema" unless $sch2;
# unshift @$clsets, $sch2->[1];
# _resolve($opts, $sch2->[0], $clsets, $seen);
#}
#
#sub resolve_schema {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/remarkpl/public/remark.min.js view on Meta::CPAN
beginKeywords:"class interface",end:/[{;=]/,illegal:/[^\s:]/,contains:[e.TITLE_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",end:/[{;=]/,illegal:/[^\s:]/,contains:[e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),...
},a={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0},r={className:"symbol",variants:[{begin:/\=[lgenxc]=/},{begin:/\$/}]},s={className:"comment",variants:[{begin:"'",end:"'"},{begin:'"',end:'"'}],illegal:"\\n",contains:[e.BACKSL...
},{begin:":\\s*"+t}]}]}}},{name:"hsp",create:function(e){return{case_insensitive:!0,lexemes:/[\w\._]+/,keywords:"goto gosub return break repeat loop continue wait await dim sdim foreach dimtype dup dupptr end stop newmod delmod mref run exgoto on mca...
},contains:[t,{className:"keyword",begin:"\\bend\\sif\\b"},{className:"function",beginKeywords:"function",end:"$",contains:[t,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE,r]},{className:"function",begin:"\\bend\\s+",e...
contains:[{className:"comment",begin:/\(\*/,end:/\*\)/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{begin:/\{/,end:/\}/,illegal:/:/}]}}},{name:"matlab",create:function(e){var t=[e.C_NUMBER_MODE,{className:"string",begin:"'",end:"'",contai...
illegal:"</",contains:[e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:"[\\$\\%\\@](\\^\\w\\b|#\\w+|[^\\s\\w{]|{\\w+}|\\w+)"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_M...
contains:[i]});return{aliases:["ps"],lexemes:/-?[A-z\.\-]+/,case_insensitive:!0,keywords:{keyword:"if else foreach return function do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try...
},{className:"meta",begin:"#\\!?\\[",end:"\\]",contains:[{className:"meta-string",begin:/"/,end:/"/}]},{className:"class",beginKeywords:"type",end:";",contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{endsParent:!0})],illegal:"\\S"},{className:"class",beg...
literal:"true false nil"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.NUMBER_MODE,a,t.preprocessor],illegal:/#/}}},{name:"sql",create:function(e){var t=e.COMMENT("--","$");return{case_insensitive:!0,illegal:/[<>{}*#]/,contains:[{beginKey...
return{aliases:["styl"],case_insensitive:!1,keywords:"if else for in",illegal:"("+o.join("|")+")",contains:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,{begin:"\\.[a-zA-Z][a-zA-Z0-9_-]*"+i,returnBegin:!0,cont...
built_in:"ip eip rip al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d rax rbx rcx rdx...
view all matches for this distribution
view release on metacpan or search on metacpan
bin/rename.PL view on Meta::CPAN
($file = basename($0)) =~ s/\.PL$//;
$file =~ s/\.pl$//
if ($Config{'osname'} eq 'VMS' or
$Config{'osname'} eq 'OS2'); # "case-forgiving"
open OUT,">$file" or die "Can't create $file: $!";
chmod(0755, $file);
print "Extracting $file\n";
$code = <<"!DO!SUBST!";
$Config{'startperl'} -CASL
view all matches for this distribution
view release on metacpan or search on metacpan
script/_reposdb-inline view on Meta::CPAN
# return [$type, $clsets] unless $err;
# die "Can't check whether $type is a builtin Sah type: $err"
# unless $err =~ /\ACan't locate/;
#
# # not a type, try a schema under Sah::Schema
# my $schmod = "Sah::Schema::$type";
# (my $schmod_pm = "$schmod.pm") =~ s!::!/!g;
# eval { require $schmod_pm; 1 };
# die "Not a known built-in Sah type '$type' (can't locate ".
# "Data::Sah::Type::$type) and not a known schema name '$type' ($@)"
# if $@;
# no strict 'refs';
# my $sch2 = ${"$schmod\::schema"};
# die "BUG: Schema module $schmod doesn't contain \$schema" unless $sch2;
# unshift @$clsets, $sch2->[1];
# _resolve($opts, $sch2->[0], $clsets, $seen);
#}
#
#sub resolve_schema {
view all matches for this distribution
view release on metacpan or search on metacpan
share/revealjs/plugin/highlight/highlight.esm.js view on Meta::CPAN
function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(...
/*!
* reveal.js plugin that adds syntax highlight support.
*/
var of={id:"highlight",HIGHLIGHT_STEP_DELIMITER:"|",HIGHLIGHT_LINE_DELIMITER:",",HIGHLIGHT_LINE_RANGE_DELIMITER:"-",hljs:rf,init:function(e){var t=e.getConfig().highlight||{};t.highlightOnLoad="boolean"!=typeof t.highlightOnLoad||t.highlightOnLoad,t....
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/App/rlibperl/Tester.pm view on Meta::CPAN
@scripts;
copy( catfile(@$source, $_.$ext), $scripts{$_} )
for keys %scripts;
chmod 0755, values %scripts;
return {
root => $dir,
%subdirs,
%scripts,
t/lib/App/rlibperl/Tester.pm view on Meta::CPAN
return $file;
}
sub make_script {
my $file = make_file(@_);
chmod 0755, $file;
return $file;
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
*{$f x 2} = sub () { ['bold', $c] };
}
}
sub set {
my ($f, $m) = @_;
# chown should be called before chmod to prevent setuid, setgid bit gets reset.
chown @$m{qw/uid gid/}, $f and chmod $m->{mode} & 07777, $f and utimensat($f, $m->{mtime}) or die "$f: $!";
}
sub equiv {
my ($p, $q) = @_;
no warnings 'uninitialized';
all { $p->{$_} eq $q->{$_} } qw/mode uid gid size mtime hl sl/;
view all matches for this distribution
view release on metacpan or search on metacpan
sub build_slackware_pkg {
my ($pkg) = @_;
local $ENV{OUTPUT} = $CONFIG{TMPDIR}; # all SlackBuilds use the $OUTPUT env var to determine output pkg location
my $staging_dir = prepare_pkg($pkg);
my $slackbuild = $pkg->{PRGNAM} . '.SlackBuild';
my $cmd = sbozyp_open('-|', "cd '$staging_dir' && chmod +x ./$slackbuild && ./$slackbuild");
my $slackware_pkg;
while (my $line = <$cmd>) {
$slackware_pkg = $1 if $line =~ /^Slackware package (.+) created\.$/;
print $line; # magically knows to print to stdout or stderr
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/sh2p/Builtins.pm view on Meta::CPAN
return $ntok;
}
########################################################
# TODO: comma separated groups
sub chmod_text_permissions {
my ($in, $file) = @_;
iout "# chmod $in $file\n";
# Remove any surrounding quotes 0.06
$file =~ s/^\"(.*)\"$/$1/;
my $stat = "{ my \$perm = (stat \"$file\")[2] & 07777;\n";
lib/App/sh2p/Builtins.pm view on Meta::CPAN
my $mask = 0;
for (split('', $class)) {$mask += 7 * $classes{$_}}
$mask = sprintf ("0%03d", $mask);
out "\$perm &= ~0$mask;";
out "chmod(\$perm,\"$file\");chmod(\$perm|$perms"
}
elsif ($op eq '+') {
out "chmod (\$perm | $perms";
}
else {
out "chmod (\$perm & ~$perms";
}
out ", \"$file\")}\n";
}
########################################################
# also used by umask
sub do_chmod {
my ($cmd) = shift;
my ($opt) = shift;
my $perms;
my $ntok = 2;
lib/App/sh2p/Builtins.pm view on Meta::CPAN
my $comment = '';
my $text = '';
if ( $perms !~ /^\d+$/ ) {
for my $file (@args) {
chmod_text_permissions ($perms, $file);
$ntok++;
}
return $ntok;
}
iout "$cmd ";
if (defined $perms) {
#$ntok++; 0.06
if ($cmd eq 'chmod') {
out "0$perms,";
}
elsif ($cmd eq 'umask') {
out "0$perms";
}
lib/App/sh2p/Builtins.pm view on Meta::CPAN
sub do_autoload
sub do_break
sub do_colon
sub do_continue
sub do_cd
sub chmod_text_permissions
sub do_chmod
# also used by umask
sub do_chown
sub do_exec
sub do_exit
sub do_export
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/shcompgen.pm view on Meta::CPAN
for my $hs (@helper_scripts) {
log_info("Writing helper script %s ...", $hs->{path});
$written_files{$hs->{path}}++;
eval {
write_text($hs->{path}, $hs->{content});
chmod 0755, $hs->{path};
};
if ($@) {
$envres->add_result(500, "Can't write helper script to '$hs->{path}': $@",
{item_id=>$prog0});
next PROG;
view all matches for this distribution
view release on metacpan or search on metacpan
sub ssh_file {
my ($self, $file) = @_;
if (!$self->{ssh_dir}) {
mkdir "$ENV{HOME}/.ssh" or die "Could not mkdir $ENV{HOME}/.ssh: $!" unless -d "$ENV{HOME}/.ssh";
chmod 0700, "$ENV{HOME}/.ssh";
$self->{ssh_dir} = "$ENV{HOME}/.ssh";
}
return $self->{ssh_dir} unless $file;
return join '/', $self->{ssh_dir}, $file;
view all matches for this distribution
view release on metacpan or search on metacpan
script/sitelen-mute view on Meta::CPAN
} elsif ($pngoptim && $props{FileType} eq "PNG") {
sys('pngcrush', '-s', $absFout, $absFtmp);
rename($absFtmp, $absFout);
}
}
chmod($filemode, $absFout);
sys('touch', '-r', $file, $absFout);
# intermediate sRGB colorspace conversion
if ( !$sRGB || !defined($props{ProfileID})
|| ($props{ColorSpace} // 65535) == 1
view all matches for this distribution
view release on metacpan or search on metacpan
t/app_spaceless.t view on Meta::CPAN
splice @PATH, 0, 2;
$tmp->file('caller2.sh')->openw->print($set_path, "\n\nscript2.sh\n");
$dir1->file('script2.sh')->openw->print("#!$sh_exe\necho this is script TWO\n");
chmod(0700, $dir1->file('script2.sh'));
subtest 'script2' => sub {
my($out, $err, $exit) = capture { $run_sh->($tmp->file('caller2.sh')) };
is $exit, 0, 'exit okay';
is $err, '', 'error is empty';
like $out, qr{TWO}, "out matches";
};
$tmp->file('caller3.sh')->openw->print($set_path, "\n\nscript3.sh\n");
$dir2->file('script3.sh')->openw->print("#!$sh_exe\necho this is script THREE\n");
chmod(0700, $dir2->file('script3.sh'));
subtest 'script3' => sub {
my($out, $err, $exit) = capture { $run_sh->($tmp->file('caller3.sh')) };
is $exit, 0, 'exit okay';
is $err, '', 'error is empty';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/sslmaker.pm view on Meta::CPAN
my $file;
$home->mkpath;
-w $home or croak "Can't write to $home";
mkdir $home->child($_) for qw(certs csr crl newcerts private);
chmod 0700, $home->child('private') or croak "Couldn't chmod 0700 'private' in $home";
if ($args->{templates}) {
local $UMASK = 0122; # make files with mode 644
$self->render_to_file('crlnumber', $file, {}) unless -e ($file = $home->child('crlnumber'));
$self->render_to_file('index.txt', $file, {}) unless -e ($file = $home->child('index.txt'));
view all matches for this distribution
view release on metacpan or search on metacpan
build-standalone view on Meta::CPAN
next if /^#!/;
next if /^use App::termpub/;
print {$standalone} $_;
}
chmod 0755, $target;
exit 0;
view all matches for this distribution
view release on metacpan or search on metacpan
#sysread $FH , my $s1 , 2 * $LEN ;
#my $s2 = substr $s1 , $LEN , $LEN , '' ;
#$flg = 0 unless $s1 =~ m/^\Q$H\E.*:.*\n$/ && $s2 =~ m/^\Q$H\E.*:.*\n$/ ;
#$flg ? sysseek $FH , -$LEN , 1 : sysseek $FH , 0, 2 ;
#my $fp = (stat($FH))[2] ; say $fp ;chmod 000, $FH ; $FH->flush ;
print $FH "$DTSTR\n" ; # flock $FH , LOCK_UN ;
#$FH->flush ;chmod $fp, $FH ;
#sleep 5 ;
close $FH ;
view all matches for this distribution
view release on metacpan or search on metacpan
% brew install Songmu/tap/tmclean
## Single Packed Executable
% curl -L https://raw.githubusercontent.com/Songmu/App-tmclean/master/tmclean > /usr/local/bin/tmclean; chmod +x /usr/local/bin/tmclean
# LICENSE
Copyright (C) Songmu.
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
use lib "$lib";
my \$ret = do "$script";
die \$@ if \$@;
\$ret;
EOF
$t_script->chmod('a+x');
}
}
create_t_scripts();
view all matches for this distribution