view release on metacpan or search on metacpan
lib/Gedcom.pm view on Meta::CPAN
# Add the required elements, unless they are already there.
unless ($r->get_record("head")) {
my $me = "Unknown user";
my $login = $me;
if ($login = getlogin || (getpwuid($<))[0] ||
$ENV{USER} || $ENV{LOGIN}) {
my $name;
eval { $name = (getpwnam($login))[6] };
$me = $name || $login;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Genezzo/GenDBI.pm view on Meta::CPAN
my %args = (
@_);
greet @_ ;
my ($uname, $cryptpwd) = (getpwuid($<))[0,1];
my $plainword;
# XXX XXX : looks like this getpwuid returns the crypt from the
# shadow file - an 'x'
# XXX XXX : need term::readkey
system "stty -echo";
view all matches for this distribution
view release on metacpan or search on metacpan
t/sandbox/usr/portage/app-portage/gentoolkit/files/scripts/echangelog view on Meta::CPAN
$input = Text::Wrap::fill('', '', $input) if ($input =~ /^.{80}/m);
$input =~ s/^/ /gm; # add indentation
# Prepend the user info to the input
$user = $ENV{'ECHANGELOG_USER'} ||
sprintf("%s <%s\@gentoo.org>", (getpwuid($<))[6,0]);
# Make sure that we didn't get "root"
die "Please set ECHANGELOG_USER or run as non-root\n" if $user =~ / root@/;
$date = strftime("%d %b %Y", localtime);
$entry = "$date; $user ";
$entry .= join ', ', grep !/files.digest|Manifest/, @files; # don't list digests
view all matches for this distribution
view release on metacpan or search on metacpan
t/postgis.t view on Meta::CPAN
use DBI;
BEGIN { use_ok('Geo::OGC::Service::WFS') };
# create a test database first
my $user = getlogin || getpwuid($<) || "Kilroy";
my $pass = $user;
my $test_db = 'wfstest';
my $dbh;
sub setup_db {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/ExtUtils/MakeMaker.pm view on Meta::CPAN
my($name, $value) = ($1, $2);
if ($value =~ m/^~(\w+)?/) { # tilde with optional username
$value =~ s [^~(\w*)]
[$1 ?
((getpwnam($1))[7] || "~$1") :
(getpwuid($>))[7]
]ex;
}
# Remember the original args passed it. It will be useful later.
$self->{ARGS}{uc $name} = $self->{uc $name} = $value;
view all matches for this distribution
view release on metacpan or search on metacpan
$self->{'multivalues'} = 1;
$self->{'lock'} = 1;
$self->{'locktimeout'} = 15;
$self->{'find_path'} = [
"./",
(getpwuid($>))[7]."/",
$dirname,
"../",
"/usr/local/etc/",
];
find_path contain:
### actual directory
"./",
### home directory
(getpwuid($>))[7]."/",
### program directory by File::Basename::fileparse()
$dirname,
### parent directory
"../",
### default config directory
view all matches for this distribution
view release on metacpan or search on metacpan
MailBot/Sendable.pm view on Meta::CPAN
# Ensure the mail has the following headers
# From, Reply-To
my($from,$name,$tag);
$name = (getpwuid($>))[6] || $ENV{NAME} || "";
while($name =~ s/\([^\(]*\)//) { 1; }
$from = sprintf "%s <%s>", $name, mailaddress();
$from =~ s/\s{2,}/ /g;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Getopt/Complete/Compgen.pm view on Meta::CPAN
$value =~ s/\'/\\'/;
my @f = grep { $_ !~/^\s+$/ } `bash -c "compgen -$option -- '$value'"`;
chomp @f;
if ($option eq 'f' or $option eq 'd') {
# bash is fine with ~/ paths but perl is not, need to translate
my $home_dir = (getpwuid($<))[7];
for (my $i = 0; $i < @f; $i++) {
my $perl_path = $f[$i];
$perl_path =~ s/^~/$home_dir/;
if ( -d $perl_path ) {
$f[$i] .= "/\t";
view all matches for this distribution
view release on metacpan or search on metacpan
Gen/cmdline_c.pm view on Meta::CPAN
if (!filename) return; /* ignore NULL filenames */
#if defined(HAVE_GETUID) && defined(HAVE_GETPWUID)
if (*filename == '~') {
/* tilde-expansion hack */
struct passwd *pwent = getpwuid(getuid());
if (!pwent) {
fprintf(stderr, "%s: user-id %d not found!\n", PROGRAM, getuid());
return;
}
if (!pwent->pw_dir) {
view all matches for this distribution
view release on metacpan or search on metacpan
t/Getopt-Tree.t view on Meta::CPAN
{ name => 'debug', abbr => 'd', exists => 1, optional => 1, descr => 'Enable debugging output.' },
{
name => 'user',
abbr => 'u',
optional => 1,
descr => 'Ticketing username, defaults to scalar(getpwuid($<)).'
},
{
name => 'no-cache',
abbr => 'nc',
exists => 1,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Git/Gitalist/Repository.pm view on Meta::CPAN
}
method _build_owner {
return 'system' if $^O =~ 'MSWin32';
my ($gecos, $name) = map { decode(langinfo(CODESET()), $_) } (getpwuid $self->path->stat->uid)[6,0];
$gecos =~ s/,+$//;
return length($gecos) ? $gecos : $name;
}
method _build_last_change {
view all matches for this distribution
view release on metacpan or search on metacpan
deps/libgit2/src/libgit2/sysdir.c view on Meta::CPAN
if ((buflen = sysconf(_SC_GETPW_R_SIZE_MAX)) == -1)
buflen = 1024;
do {
buf = git__realloc(buf, buflen);
error = getpwuid_r(uid, &pwd, buf, buflen, &pwdptr);
buflen *= 2;
} while (error == ERANGE && buflen <= 8192);
if (error) {
git_error_set(GIT_ERROR_OS, "failed to get passwd entry");
view all matches for this distribution
view release on metacpan or search on metacpan
lib/GitLab/API/v4/Config.pm view on Meta::CPAN
my $file = $self->opt_args->{config_file}
|| $self->env_args->{config_file};
return $file if $file;
my ($home) = ( getpwuid($<) )[7];
return '' . path( $home )->child('.gitlab-api-v4-config');
}
=head1 ATTRIBUTES
view all matches for this distribution
view release on metacpan or search on metacpan
terminology.
- Repos has been refactored into a CollectionOfRepositories role
and two differnet concrete implementations (the Catalyst model
chooses which type to build based on the config).
- Remove all tabs and fix no tabs test (Dagfinn Ilmari Mannsåker)
- Decode getpwuid values correctly (Dagfinn Ilmari Mannsåker)
- Generate correct provides information in META.yml so that search.cpan
indexes the classes contained in Gitalist correctly.
- Dropped the dependency on File::Stat::ModeString
0.000003 2009-12-09
view all matches for this distribution
view release on metacpan or search on metacpan
Glade/Two/Generate.pm view on Meta::CPAN
if ($Glade_Perl->app->author) {
$proj_opt->{app}{author} = $Glade_Perl->app->author;
} else {
my $host = hostname;
my $pwuid = [(getpwuid($<))];
my $user = $pwuid->[0];
my $fullname = $pwuid->[6];
my $hostname = [split(" ", $host)];
$proj_opt->{app}{'author'} = "$fullname <$user\@$hostname->[0]>";
}
view all matches for this distribution
view release on metacpan or search on metacpan
Glade/PerlProject.pm view on Meta::CPAN
if ($Glade_Perl->app->author) {
$proj_opt->{app}{author} = $Glade_Perl->app->author;
} else {
my $host = hostname;
my $pwuid = [(getpwuid($<))];
my $user = $pwuid->[0];
my $fullname = $pwuid->[6];
my $hostname = [split(" ", $host)];
$proj_opt->{app}{'author'} = "$fullname <$user\@$hostname->[0]>";
}
view all matches for this distribution
view release on metacpan or search on metacpan
my $perm = $stat->st_mode & (S_IRWXU | S_IRWXG | S_IRWXO);
cmp_ok($perm, '==', 0644, ' mode : ' . sprintf('%o', $perm));
};
my ($login, $pass, $uid, $gid) = getpwuid($<);
# chown
subtest 'chown' => sub
{
my $retval = GlusterFS::GFAPI::FFI::glfs_chown($fs, "/$fname", $uid, $gid);
view all matches for this distribution
view release on metacpan or search on metacpan
bin/perlmine.pl view on Meta::CPAN
$game_status = STOP;
Glib::Source->remove($timer);
$image_but->set_image(Gtk2::Image->new_from_file($image{'win'}));
return;
my $new_entry = [$Config{name} || getlogin || getpwuid($<) || 'Nobody', $elapse_time];
my ($idx, $new_iter);
if ( $#$history > 8 ) {
$#$history = 8;
}
push @$history, $new_entry;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Goo/Thing/pm/Perl5.pm view on Meta::CPAN
###############################################################################
use strict;
# lists functions not reserved words
my @functions = qw(abs accept alarm atan2 binmode binmode bless caller chdir chmod chomp chomp chown chr chroot close closedir connect continue close crypt data dbmclose dbmopen defined delete die do dump each endgrent endhostent endnetent endprotoen...
# common functions and reserved words
my @common = qw(abs accept binmode bless caller chdir chmod chomp chown chr chroot close continue defined delete
die do each else eval exec exists exit flock for foreach fork format glob gmtime goto grep hex if import index int ioctl join keys last lc lcfirst length link listen local localtime log map mkdir my next oct open ord pack package pipe pop pos print p...
view all matches for this distribution
view release on metacpan or search on metacpan
src/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
src/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
t/lib/Test/Utils.pm view on Meta::CPAN
# this is for etc/log4perl.conf to call back to get the log file name.
sub log_file_name {
my $logfile = shift or die "No log file passed";
$logfile .= ".log";
my $username = ($ENV{LOGNAME} || $ENV{USER} || getpwuid($<)) or die "No user name found";
my $tmpdir = File::Spec->tmpdir();
my $logdir = File::Spec->catfile($tmpdir, $username);
make_path($logdir);
my $logpath = File::Spec->catfile($logdir, $logfile);
view all matches for this distribution
view release on metacpan or search on metacpan
Tk/myConfig view on Meta::CPAN
{
# retain author's favourite warnings if using gcc
$gccopt .= " -ggdb -Wall -Wno-implicit-int -Wno-comment -Wno-unused -D__USE_FIXED_PROTOTYPES__";
eval
{
if ((getpwuid($<))[6] =~ /Nick\s+Ing-Simmons/)
{
# This is the author - catch as many bugs as possible
$gccopt .= " -MMD -Werror";
@macro = ( macro => { INSTALLDIRS => 'perl' });
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Egreek.pm view on Meta::CPAN
### More-desperate methods
# Light desperation on any (Unixish) platform
else {
$home = CORE::eval q{ (getpwuid($<))[7] };
}
# On Unix in general, a non-existant home means "no home"
# For example, "nobody"-like users might use /nonexistant
if (defined $home and ! -d($home)) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Grid/Request/Command.pm view on Meta::CPAN
$self->{state} = $default_state;
# This is important for systems such as psearch, which change
# uid's in order to submit jobs on behalf of users.
# We should use the real user id.
$self->{username} = getpwuid($<);
$logger->debug("Set the username to the effective UID: " . $self->{username});
# Set the default block size.
$logger->debug("Setting the default block size.");
$self->{block_size} = $DEFAULT_BLOCK_SIZE;
view all matches for this distribution
view release on metacpan or search on metacpan
if($^O eq "MacOS") {
$home = $ENV{HOME} || `pwd`;
chomp($home);
$file = ($home =~ /:$/ ? $home . "gripsrc" : $home . ":gripsrc");
} else {
# Some OS's don't have `getpwuid', so we default to $ENV{HOME}
$home = eval { (getpwuid($>))[7] } || $ENV{HOME};
$file = $home . "/.gripsrc";
}
my $fh;
local $_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Guacamole.pm view on Meta::CPAN
OpKeywordGetpwnam ~ 'getpwnam'
OpKeywordGetgrnam ~ 'getgrnam'
OpKeywordGethostbyname ~ 'gethostbyname'
OpKeywordGetnetbyname ~ 'getnetbyname'
OpKeywordGetprotobyname ~ 'getprotobyname'
OpKeywordGetpwuid ~ 'getpwuid'
OpKeywordGetgrgid ~ 'getgrgid'
OpKeywordGetservbyname ~ 'getservbyname'
OpKeywordGethostbyaddr ~ 'gethostbyaddr'
OpKeywordGetnetbyaddr ~ 'getnetbyaddr'
OpKeywordGetprotobynumber ~ 'getprotobynumber'
view all matches for this distribution
view release on metacpan or search on metacpan
getpgrp($;)
getpid($;)
getppid($;)
getpriority($;$$)
getproto($;$)
getpwuid($;$)
getserv($;$$)
getsockname($;$)
getsockopt($;$$$)
gettimeofday($;)
getuid($;)
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/HADaemon/Control.pm view on Meta::CPAN
and die "ipc_cl_options: 'max_procs' should be at least 1\n";
$self->{process_name_change}
and $self->{ipc_cl_options}->{process_name_change} = 1;
if ($self->uid) {
my @uiddata = getpwuid($self->uid);
@uiddata or die "failed to get info about " . $self->uid . "\n";
if (!$self->gid) {
$self->gid($uiddata[3]);
$self->trace("Implicit GID => " . $uiddata[3]);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HPC/Runner/Command/submit_jobs/Utils/Scheduler/Directives.pm view on Meta::CPAN
=cut
option 'user' => (
is => 'rw',
isa => 'Str',
default => sub { return $ENV{USER} || $ENV{LOGNAME} || getpwuid($<); },
required => 1,
documentation =>
q{This defaults to your current user ID. This can only be changed if running as an admin user}
);
view all matches for this distribution