Perl6-Pugs
view release on metacpan or search on metacpan
docs/Perl6/Overview/File.pod view on Meta::CPAN
-z "file" # true if size is 0
-s "file" # returns file size in bytes
mkdir "dirname"
rmdir "dirname"
chdir "dirname"
unlink
chmod
chown
docs/Perl6/Spec/IO.pod view on Meta::CPAN
against the file first, as in C<next unless -f $file && -T $file>.
The return value of a test is both a boolean and a stat buffer. So you can say:
if -r -w -x $filename {...}
Or chain tests together in OO style:
if $filename.'-e'.'-x' {...}
=item chown
=item chmod LIST
X<chmod> X<permission> X<mode>
Changes the permissions of a list of files. The first element of the
list must be the numerical mode, which should probably be an octal
number, and which definitely should I<not> be a string of octal digits:
C<0o644> is okay, C<0644> is not. Returns the number of files
successfully changed.
examples/shell.pl view on Meta::CPAN
# TODO
# BACKPSACE, history, editing ?
my $prompt = '<p6shell>$ ';
my $VERSION = '0.01';
# we should have this list from some internal command
# probably along with the signature of these functions
my @available_commands = <exit print say>;
@available_commands.push( <mkdir rmdir chdir unlink chmod chown> );
@available_commands.push( <pop push> );
# Enable reading character as they ar typed, see Perl5: perldoc -f getc
# It would be better to use Term::ReadKey but it has to be implemented for Perl6
my $BSD_STYLE = 1;
if ($BSD_STYLE) {
system "stty cbreak </dev/tty >/dev/tty 2>&1";
}
misc/pX/Common/Regexp-Test-Perl5Tests/t/op/taint.t view on Meta::CPAN
test !eval { rename '', $TAINT }, 'rename';
test $@ =~ /^Insecure dependency/, $@;
test !eval { unlink $TAINT }, 'unlink';
test $@ =~ /^Insecure dependency/, $@;
test !eval { utime $TAINT }, 'utime';
test $@ =~ /^Insecure dependency/, $@;
SKIP: {
skip "chown() is not available", 2 unless $Config{d_chown};
test !eval { chown -1, -1, $TAINT }, 'chown';
test $@ =~ /^Insecure dependency/, $@;
}
SKIP: {
skip "link() is not available", 2 unless $Config{d_link};
test !eval { link $TAINT, '' }, 'link';
test $@ =~ /^Insecure dependency/, $@;
}
src/PIL/misc/S29code.pl view on Meta::CPAN
# item
# want
# caller
# tie tied untie
# -X accept alarm bind binmode chown close closedir connect eof fcntl
# fileno flock getc getpeername
# /[get|set][host|net|proto|serv|sock].*/ glob ioctl link listen
# lstat mkdir open opendir pipe print printf read readdir readline
# readlink readpipe recv rename rewinddir rmdir seek seekdir select(both)
# send setsockopt shutdown slurp socket socketpair stat symlink
# syscall sysopen sysread sysseek syswrite tell telldir truncate umask
# unlink utime warn
# chroot crypt exec getlogin /[get|set][pw|gr].*/ kill setpgrp setpriority
util/cperl-mode.el view on Meta::CPAN
"class" "try")
"\\|") ; Flow control
"\\)\\>") 2) ; was "\\)[ \n\t;():,\|&]"
; In what follows we use `type' style
; for overwritable builtins
(list
(concat
"\\(^\\|[^$@%&\\]\\)\\<\\("
;; "CORE" "__FILE__" "__LINE__" "abs" "accept" "alarm" "all" "as"
;; "and" "any" "atan2" "bind" "binmode" "bless" "caller"
;; "chdir" "chmod" "chown" "chr" "chroot" "close"
;; "closedir" "cmp" "connect" "continue" "cos" "crypt"
;; "dbmclose" "dbmopen" "die" "dump" "endgrent"
;; "endhostent" "endnetent" "endprotoent" "endpwent"
;; "endservent" "eof" "eq" "exec" "exit" "exp" "fcntl"
;; "fileno" "flock" "fork" "formline" "ge" "getc"
;; "getgrent" "getgrgid" "getgrnam" "gethostbyaddr"
;; "gethostbyname" "gethostent" "getlogin"
;; "getnetbyaddr" "getnetbyname" "getnetent"
;; "getpeername" "getpgrp" "getppid" "getpriority"
;; "getprotobyname" "getprotobynumber" "getprotoent"
util/cperl-mode.el view on Meta::CPAN
DATA Input filehandle for what follows after __END__ or __DATA__.
accept(NEWSOCKET,GENERICSOCKET)
alarm(SECONDS)
atan2(X,Y)
bind(SOCKET,NAME)
binmode(FILEHANDLE)
caller[(LEVEL)]
chdir(EXPR)
chmod(LIST)
chop[(LIST|VAR)]
chown(LIST)
chroot(FILENAME)
close(FILEHANDLE)
closedir(DIRHANDLE)
... cmp ... String compare.
connect(SOCKET,NAME)
continue of { block } continue { block }. Is executed after `next' or at end.
cos(EXPR)
crypt(PLAINTEXT,SALT)
dbmclose(%HASH)
dbmopen(%HASH,DBNAME,MODE)
util/package-osx.pl view on Meta::CPAN
print REMOVER "$_\n" for @header;
print REMOVER " $_\n" for @files;
print REMOVER "$_\n" for @footer;
close REMOVER;
chmod 0755, "$dest$files[-1]";
print "Made $dest$files[-1]\n";
}
sub chown_all {
my ($dest) = @_;
system("sudo -S chown -R root:wheel $dest < ~/.pass");
}
&change_files($dest, %change_files) if (keys %change_files > 0);
©_files($dest, @files);
&make_symlinks($dest, %symlinks) if (keys %symlinks > 0);
&create_remover($dest, values %change_files, @files, %symlinks, $remover);
&chown_all($dest);
( run in 1.080 second using v1.01-cache-2.11-cpan-5511b514fd6 )