view release on metacpan or search on metacpan
lib/Bio/Gonzales/Project.pm view on Meta::CPAN
plain_value => sub {
return unless defined $_;
$_ =~ s{ ^ ~ ( [^/]* ) }
{ $1
? (getpwnam($1))[7]
: ( $ENV{HOME} || (getpwuid($>))[7] )
}ex;
my $subsre = join "|", keys %subs;
s{__($subsre)(?:\((.+?)\))?__}{ $subs{ $1 }->( $2 ? split( /,/, $2 ) : () ) }eg;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/Grid/Run/SGE/Util.pm view on Meta::CPAN
for my $file (@files) {
confess "trying to expand empty path" unless($file);
$file =~ s{ ^ ~ ( [^/]* ) }
{ $1
? (getpwnam($1))[7]
: ( $ENV{HOME} || $ENV{LOGDIR} || (getpwuid($>))[7] )
}ex;
push @expanded, $file;
}
return wantarray ? @expanded : ( shift @expanded );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/VertRes/Config/CommandLine/LogParameters.pm view on Meta::CPAN
sub _build__user_name
{
my ($self) = @_;
getpwuid( $< );
}
sub _build__output_string {
my ($self) = @_;
my $output_str = time()." ";
view all matches for this distribution
view release on metacpan or search on metacpan
Bio/DB/Registry.pm view on Meta::CPAN
=cut
sub _load_registry {
my $self = shift;
eval { $HOME = (getpwuid($>))[7]; } unless $HOME;
if ($@) {
# Windows can have Win32::LoginName to get the Username, so check if it works before giving up
( defined &Win32::LoginName ) ? ( $HOME = Win32::LoginName() )
: $self->warn("This Perl doesn't implement function getpwuid(), no \$HOME");
}
my @ini_files = $self->_get_ini_files();
@ini_files = $self->_make_private_registry() unless (@ini_files);
view all matches for this distribution
view release on metacpan or search on metacpan
sub get_perl_keywords{
my(%perl_keywords);
my @keywords=qw( AUTOLOAD BEGIN CORE DESTROY END abs accept alarm and atan2 bind binmode bless caller chdir chmod chop chown chr chroot
close closedir cmp connect continue cos crypt dbmclose dbmopen defined delete die do dump each else elsif endgrent endhostent endnetent endprotoent endpwent endservent
eof eq eval exec exit exp 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 glob gmtime goto grep gt hex if index int ioctl join keys kill last lc lcfirst le length link listen local localtime log lstat
lt m mkdir msgctl msgget msgrcv msgsnd my ne next no not oct open opendir or ord pack package pipe pop print printf push q qq quotemeta qw qx rand read readdir readline
readlink readpipe recv redo ref rename require reset return reverse rewinddir rindex rmdir s scalar seek seekdir select
semctl semget semop send setgrent sethostent setnetent setpgrp setpriority setprotoent setpwent setservent setsockopt shift
shmctl shmget shmread shmwrite shutdown sin sleep socket socketpair sort splice split sprintf sqrt srand stat
view all matches for this distribution
view release on metacpan or search on metacpan
GETPWENT_R_PROTO|5.008000|5.008000|Vn
getpwnam|5.009000||Viu
GETPWNAM_R_HAS_BUFFER|5.008000||Viu
GETPWNAM_R_HAS_PTR|5.008000||Viu
GETPWNAM_R_PROTO|5.008000|5.008000|Vn
getpwuid|5.009000||Viu
GETPWUID_R_HAS_PTR|5.008000||Viu
GETPWUID_R_PROTO|5.008000|5.008000|Vn
get_quantifier_value|5.033006||Viu
get_re_arg|||xciu
get_re_gclass_nonbitmap_data|5.031011||Viu
KEY_getprotobyname|5.003007||Viu
KEY_getprotobynumber|5.003007||Viu
KEY_getprotoent|5.003007||Viu
KEY_getpwent|5.003007||Viu
KEY_getpwnam|5.003007||Viu
KEY_getpwuid|5.003007||Viu
KEY_getservbyname|5.003007||Viu
KEY_getservbyport|5.003007||Viu
KEY_getservent|5.003007||Viu
KEY_getsockname|5.003007||Viu
KEY_getsockopt|5.003007||Viu
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Brackup/Backup.pm view on Meta::CPAN
sub uid_map {
my $self = shift;
my @map;
my $uidcounts = $self->{idcounts}{u};
for my $uid (sort { $a <=> $b } keys %$uidcounts) {
if (my $name = getpwuid($uid)) {
push @map, "$uid:$name";
}
}
return join(' ', @map);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bryar/DataSource/FlatFile.pm view on Meta::CPAN
my $fileuid = (stat _)[4];
my $who;
if (exists $UID_Cache{$fileuid}) {
$who = $UID_Cache{$fileuid};
} else {
$who = $UID_Cache{$fileuid} = getpwuid($fileuid);
}
my $title = <$in>;
chomp $title;
local $/;
my $content = <$in>;
view all matches for this distribution
view release on metacpan or search on metacpan
bin/fm_diff_config view on Meta::CPAN
my %duplicates = ();
my %ignoredChanges = ();
my %descriptions = ();
my $username = "na";
eval{
$username = getpwuid( $< );
};
if( $@ ){
# $@ is $EVAL_ERROR
# unix way has failed, so try the win32 way
$username = Win32::LoginName;
view all matches for this distribution
view release on metacpan or search on metacpan
GETPWENT_R_PROTO|5.008000|5.008000|Vn
getpwnam|5.009000||Viu
GETPWNAM_R_HAS_BUFFER|5.008000||Viu
GETPWNAM_R_HAS_PTR|5.008000||Viu
GETPWNAM_R_PROTO|5.008000|5.008000|Vn
getpwuid|5.009000||Viu
GETPWUID_R_HAS_PTR|5.008000||Viu
GETPWUID_R_PROTO|5.008000|5.008000|Vn
get_re_arg|||xciu
get_re_gclass_nonbitmap_data|5.031010||Viu
get_regclass_nonbitmap_data|5.031010||Viu
KEY_getprotobyname|5.003007||Viu
KEY_getprotobynumber|5.003007||Viu
KEY_getprotoent|5.003007||Viu
KEY_getpwent|5.003007||Viu
KEY_getpwnam|5.003007||Viu
KEY_getpwuid|5.003007||Viu
KEY_getservbyname|5.003007||Viu
KEY_getservbyport|5.003007||Viu
KEY_getservent|5.003007||Viu
KEY_getsockname|5.003007||Viu
KEY_getsockopt|5.003007||Viu
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CDDB.pm view on Meta::CPAN
"ID 'win32usr'"
);
$login = 'win32usr';
}
else {
$login = getpwuid($>)
or croak(
"Can't get login ID. " .
"Set LOGNAME or USER environment variable and try again: $!"
);
}
lib/CDDB.pm view on Meta::CPAN
if it is on.
B<Login> is the login ID you want to advertise to the cddbp server.
It defaults to the login ID your computer assigns you, if that can be
determined. The default login ID is determined by the presence of a
LOGNAME or USER environment variable, or by the getpwuid() function.
On Windows systems, it defaults to "win32usr" if no default method can
be found and no Login parameter is set.
B<Submit_Address> is the e-mail address where new disc submissions go.
This defaults to 'freedb-submit@freedb.org'. Note, that testing
view all matches for this distribution
view release on metacpan or search on metacpan
my $folderStore = shift;
$o->{ui}->space;
$o->{ui}->p('Traversal failed because a file or folder could not be accessed. You may have to fix the permissions manually, or run this command with other privileges.');
$o->{ui}->p('If you have root privileges, you can take over this store using:');
my $userName = getpwuid($<);
my $groupName = getgrgid($();
$o->{ui}->line($o->{ui}->gold(' sudo chown -R ', $userName, ':', $groupName, ' ', $folderStore->folder));
$o->{ui}->p('and then set the desired permission scheme:');
$o->{ui}->line($o->{ui}->gold(' cds set permissions of ', $folderStore->folder, ' to â¦'));
$o->{ui}->space;
}
sub username {
my $uid = shift;
return getpwuid($uid) // $uid;
}
sub groupname {
my $gid = shift;
sub user {
my $o = shift;
my $uid = $o->{uid} // return;
return getpwuid($uid) // $uid;
}
sub group {
my $o = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
$webuser = 'nobody';
$webgroup = 'nobody';
if ($^O !~ /Win32/) {
my $default_user = getpwuid($<);
my $default_group = getgrgid($();
my @users = ($default_user, qw(www-data web www nobody));
my @groups = ($default_group, qw(www-data web www nobody));
view all matches for this distribution
view release on metacpan or search on metacpan
local/lib/perl5/Module/Build/Platform/Unix.pm view on Meta::CPAN
sub _detildefy {
my ($self, $value) = @_;
$value =~ s[^~([^/]+)?(?=/|$)] # tilde with optional username
[$1 ?
(eval{(getpwnam $1)[7]} || "~$1") :
($ENV{HOME} || eval{(getpwuid $>)[7]} || glob("~"))
]ex;
return $value;
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/CurlLog.pm view on Meta::CPAN
$opts{fh} = \*STDERR;
}
else {
my $file2 = $opts{file};
if ($file2 =~ m{^~/}) {
my $home = $ENV{HOME} || (getpwuid($<))[7];
$file2 =~ s{^~/}{$home/};
}
open $opts{fh}, ">>", $file2 or die "Can't open $opts{file}: $!";
}
select($opts{fh});
view all matches for this distribution
view release on metacpan or search on metacpan
{
my $module_name = $Module;
$module_name =~ s/::/-/g;
my $uid = (stat( $0 ))[4];
my $user = getpwuid($uid);
### Control to
#
my %default_to = (
browser => 1,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/BigDeath.pm view on Meta::CPAN
local $SIG{__DIE__} = undef;
my $cout = $out;
$cout =~ s/\</</g;
$cout =~ s/\>/>/g;
$mailto = getpwuid($<)
unless $mailto;
print <<"";
Content-type: text/html
\n
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/My/PerlFunctions/Command/Summary.pm view on Meta::CPAN
getprotobyname - get protocol record given name
getprotobynumber - get protocol record numeric protocol
getprotoent - get next protocols record
getpwent - get next passwd record
getpwnam - get passwd record given user login name
getpwuid - get passwd record given user ID
getservbyname - get services record given its name
getservbyport - get services record given numeric port
getservent - get next services record
getsockname - retrieve the sockaddr for a given socket
getsockopt - get socket options on a given socket
view all matches for this distribution
view release on metacpan or search on metacpan
easyxs/ppport.h view on Meta::CPAN
GETPWENT_R_PROTO|5.008000|5.008000|Vn
getpwnam|5.009000||Viu
GETPWNAM_R_HAS_BUFFER|5.008000||Viu
GETPWNAM_R_HAS_PTR|5.008000||Viu
GETPWNAM_R_PROTO|5.008000|5.008000|Vn
getpwuid|5.009000||Viu
GETPWUID_R_HAS_PTR|5.008000||Viu
GETPWUID_R_PROTO|5.008000|5.008000|Vn
get_quantifier_value|5.033006||Viu
get_re_arg|||xciu
get_re_gclass_nonbitmap_data|5.031011||Viu
easyxs/ppport.h view on Meta::CPAN
KEY_getprotobyname|5.003007||Viu
KEY_getprotobynumber|5.003007||Viu
KEY_getprotoent|5.003007||Viu
KEY_getpwent|5.003007||Viu
KEY_getpwnam|5.003007||Viu
KEY_getpwuid|5.003007||Viu
KEY_getservbyname|5.003007||Viu
KEY_getservbyport|5.003007||Viu
KEY_getservent|5.003007||Viu
KEY_getsockname|5.003007||Viu
KEY_getsockopt|5.003007||Viu
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CPAN/Packager/Builder/RPM/Spec.pm view on Meta::CPAN
$defaults{'outdir'} = './';
$defaults{'tmpdir'} = '/tmp';
$defaults{'release'} = '8';
$defaults{'installdirs'} = "";
{
my ( $username, $fullname ) = ( getpwuid($<) )[ 0, 6 ];
$fullname = ( split /,/, $fullname )[0];
$defaults{'email'} = $fullname ? $fullname . ' ' : '';
$defaults{'email'} .= '<';
$defaults{'email'} .= $ENV{REPLYTO} || $username . '@redhat.com';
$defaults{'email'} .= '>';
view all matches for this distribution
view release on metacpan or search on metacpan
bin/mirror_cleanup view on Meta::CPAN
print "Reloading CPAN client indexes...\n";
CPAN::HandleConfig->load;
CPAN::Shell::setup_output;
CPAN::Index->force_reload;
print "Starting cleanup...\n";
my $self = scalar( getpwuid($<) );
my $dbfile = "/home/$self/.cpan/cpandb.sql";
my $dbh = DBI->connect( "dbi:SQLite:dbname=$dbfile", "", "" );
my $query_distros = $dbh->prepare(
q{select A.dist_file from dists A join auths B on A.auth_id = B.auth_id where B.cpanid = ?}
);
view all matches for this distribution
view release on metacpan or search on metacpan
build/gen_conf.pl view on Meta::CPAN
END
my $db = prompt('Name of database?', 'pause');
$cfg->newval('DB', 'db', $db);
my $user = WIN32 ? $ENV{USERNAME} : getpwuid($>);
$user = prompt('User to create/query/alter/drop tables?', $user);
$cfg->newval('DB', 'user', $user);
my $passwd = prompt("Password for '$user'?", 'q1w2e3r4');
$cfg->newval('DB', 'passwd', $passwd);
my $host = hostname;
view all matches for this distribution
view release on metacpan or search on metacpan
bin/mirror_cleanup view on Meta::CPAN
print "Reloading CPAN client indexes...\n";
CPAN::HandleConfig->load;
CPAN::Shell::setup_output;
CPAN::Index->force_reload;
print "Starting cleanup...\n";
my $self = scalar( getpwuid($<) );
my $dbfile = "/home/$self/.cpan/cpandb.sql";
my $dbh = DBI->connect( "dbi:SQLite:dbname=$dbfile", "", "" );
my $query_distros = $dbh->prepare(
q{select A.dist_file from dists A join auths B on A.auth_id = B.auth_id where B.cpanid = ?}
);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CPAN/FTP.pm view on Meta::CPAN
eval {
chown $stat[4], $stat[5], $dest
or do {
my $save_err = $!; # otherwise it's lost in the get... calls
$CPAN::Frontend->mywarn("Can't chown '$dest' to " .
(getpwuid($stat[4]))[0] . "/" .
(getgrgid($stat[5]))[0] . ": $save_err\n"
);
};
};
warn $@ if $@;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CPANPLUS/Dist/Debora/Package.pm view on Meta::CPAN
}
}
my $user;
my @pw = eval { getpwuid $UID };
if (@pw) {
$user = eval { decode_utf8($pw[0]) };
if (!$name) {
my $gecos = eval { decode_utf8($pw[6]) };
view all matches for this distribution
view release on metacpan or search on metacpan
inc/bundle/Archive/Tar/Constant.pm view on Meta::CPAN
use constant READ_ONLY => sub { shift() ? 'rb' : 'r' };
use constant WRITE_ONLY => sub { $_[0] ? 'wb' . shift : 'w' };
use constant MODE_READ => sub { $_[0] =~ /^r/ ? 1 : 0 };
# Pointless assignment to make -w shut up
my $getpwuid; $getpwuid = 'unknown' unless eval { my $f = getpwuid (0); };
my $getgrgid; $getgrgid = 'unknown' unless eval { my $f = getgrgid (0); };
use constant UNAME => sub { $getpwuid || scalar getpwuid( shift() ) || '' };
use constant GNAME => sub { $getgrgid || scalar getgrgid( shift() ) || '' };
use constant UID => $>;
use constant GID => (split ' ', $) )[0];
use constant MODE => do { 0666 & (0777 & ~umask) };
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Cache/Memcached/Managed.pm view on Meta::CPAN
my $started = 0;
foreach (@_) {
my ($ip,$port) = split ':';
$started++ unless system 'memcached',
'-d','-u',(scalar getpwuid $>),'-l',$ip,'-p',$port;
}
# Return whether all servers started
$started == @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Cache/SimpleDir.pm view on Meta::CPAN
# Called automatically when a subroutine called functional instead of OO
sub __NOT_AN_OBJECT
{
my ($class,$method) = shift =~/^(.*?)::(.*)/;
my $user = $ENV{USERNAME} // [getpwuid $>]->[0];
my $args = join ', ', @_;
print STDOUT<<STOP;
Hello $user,
view all matches for this distribution
view release on metacpan or search on metacpan
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl test.pl'
use Calendar::CSA;
$user = scalar getpwuid($>);
$host = "localhost";
print "Attempting to open database $user\@$host...\n";
$caladdr = "$user\@$host";
view all matches for this distribution