view release on metacpan or search on metacpan
local/lib/perl5/PPI/Singletons.pm view on Meta::CPAN
'qr' => 'QuoteLike::Regexp',
'm' => 'Regexp::Match',
's' => 'Regexp::Substitute',
'tr' => 'Regexp::Transliterate',
'y' => 'Regexp::Transliterate',
);
# List of keywords is from regen/keywords.pl in the perl source.
our %KEYWORDS = map { $_ => 1 } qw{
abs accept alarm and atan2 bind binmode bless break caller chdir chmod
chomp chop chown chr chroot close closedir cmp connect continue cos
crypt dbmclose dbmopen default defined delete die do dump each else
elsif endgrent endhostent endnetent endprotoent endpwent endservent
eof eq eval evalbytes exec exists exit exp fc fcntl fileno flock for
foreach fork format formline ge getc getgrent getgrgid getgrnam
gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr
getnetbyname getnetent getpeername getpgrp getppid getpriority
getprotobyname getprotobynumber getprotoent getpwent getpwnam
getpwuid getservbyname getservbyport getservent getsockname
getsockopt given glob gmtime goto grep gt hex if index int ioctl join
keys kill last lc lcfirst le length link listen local localtime lock
local/lib/perl5/Perl/Tidy.pm view on Meta::CPAN
my ( $mode_i, $uid_i, $gid_i ) = @{$rinput_file_stat}[ 2, 4, 5 ];
my ( $uid_o, $gid_o ) = ( stat($output_file) )[ 4, 5 ];
my $input_file_permissions = $mode_i & oct(7777);
my $output_file_permissions = $input_file_permissions;
#rt128477: avoid inconsistent owner/group and suid/sgid
if ( $uid_i != $uid_o || $gid_i != $gid_o ) {
# try to change owner and group to match input file if
# in -b mode. Note: chown returns number of files
# successfully changed.
if ( $in_place_modify
&& chown( $uid_i, $gid_i, $output_file ) )
{
# owner/group successfully changed
}
else {
# owner or group differ: do not copy suid and sgid
$output_file_permissions = $mode_i & oct(777);
if ( $input_file_permissions != $output_file_permissions ) {
Warn(
"Unable to copy setuid and/or setgid bits for output file '$output_file'\n"
local/lib/perl5/Perl/Tidy/Tokenizer.pm view on Meta::CPAN
atan2
bind
binmode
bless
break
caller
chdir
chmod
chomp
chop
chown
chr
chroot
close
closedir
cmp
connect
continue
cos
crypt
dbmclose
local/lib/perl5/Perl/Tidy/Tokenizer.pm view on Meta::CPAN
push( @Keywords, @special_keywords );
# Keywords after which list formatting may be used
# WARNING: do not include |map|grep|eval or perl may die on
# syntax errors (map1.t).
my @keyword_taking_list = qw(
and
chmod
chomp
chop
chown
dbmopen
die
elsif
exec
fcntl
for
foreach
formline
getsockopt
if
local/lib/perl5/x86_64-linux-thread-multi/AnyEvent/IO.pm view on Meta::CPAN
=cut
package AnyEvent::IO;
use AnyEvent (); BEGIN { AnyEvent::common_sense }
use base "Exporter";
our @AIO_REQ = qw(
aio_load aio_open aio_close aio_seek aio_read aio_write aio_truncate
aio_utime aio_chown aio_chmod aio_stat aio_lstat
aio_link aio_symlink aio_readlink aio_rename aio_unlink
aio_mkdir aio_rmdir aio_readdir
);
*EXPORT = \@AIO_REQ;
our @FLAGS = qw(O_RDONLY O_WRONLY O_RDWR O_CREAT O_EXCL O_TRUNC O_APPEND);
*EXPORT_OK = \@FLAGS;
our %EXPORT_TAGS = (flags => \@FLAGS, aio => \@AIO_REQ);
our $MODEL;
local/lib/perl5/x86_64-linux-thread-multi/AnyEvent/IO.pm view on Meta::CPAN
Calls C<utime> on the path or perl file handle and passes a true value to
the callback on success.
The special case of both C<$atime> and C<$mtime> being C<undef> sets the
times to the current time, on systems that support this.
Example: try to touch F<file>.
aio_utime "file", undef, undef, sub { };
=item aio_chown $fh_or_path, $uid, $gid, $cb->($success)
Calls C<chown> on the path or perl file handle and passes a true value to
the callback on success.
If C<$uid> or C<$gid> can be specified as C<undef>, in which case the
uid or gid of the file is not changed. This differs from Perl's C<chown>
built-in, which wants C<-1> for this.
Example: update the group of F<file> to 0 (root), but leave the owner alone.
aio_chown "file", undef, 0, sub {
@_
or return AE::log error => "chown 'file': $!";
};
=item aio_chmod $fh_or_path, $perms, $cb->($success)
Calls C<chmod> on the path or perl file handle and passes a true value to
the callback on success.
Example: change F<file> to be user/group/world-readable, but leave the other flags
alone.
local/lib/perl5/x86_64-linux-thread-multi/AnyEvent/IO/IOAIO.pm view on Meta::CPAN
sub aio_truncate($$$) {
my $cb = $_[2];
IO::AIO::aio_truncate $_[0], $_[1], sub { $cb->($_[0] ? () : 1) };
}
sub aio_utime($$$$) {
my $cb = $_[3];
IO::AIO::aio_utime $_[0], $_[1], $_[2], sub { $cb->($_[0] ? () : 1) };
}
sub aio_chown($$$$) {
my $cb = $_[3];
IO::AIO::aio_chown $_[0], $_[1], $_[2], sub { $cb->($_[0] ? () : 1) };
}
sub aio_chmod($$$) {
my $cb = $_[2];
IO::AIO::aio_chmod $_[0], $_[1], sub { $cb->($_[0] ? () : 1) };
}
sub aio_stat($$) {
my $cb = $_[1];
IO::AIO::aio_stat $_[0], sub { $cb->($_[0] ? () : 1) };
local/lib/perl5/x86_64-linux-thread-multi/AnyEvent/IO/Perl.pm view on Meta::CPAN
sub aio_truncate($$$) {
#TODO: raises an exception on !truncate|ftruncate systems, maybe eval + set errno?
$_[2](truncate $_[0], $_[1] or ());
}
sub aio_utime($$$$) {
$_[3](utime $_[1], $_[2], $_[0] or ());
}
sub aio_chown($$$$) {
$_[3](chown defined $_[1] ? $_[1] : -1, defined $_[2] ? $_[2] : -1, $_[0] or ());
}
sub aio_chmod($$$) {
$_[2](chmod $_[1], $_[0] or ());
}
sub aio_stat($$) {
$_[1](stat $_[0]);
}