view release on metacpan or search on metacpan
lib/Software/Packager/Object/Aix.pm view on Meta::CPAN
if ($value)
{
# if we only have digits then get the name.
if ($value =~ /^\d+$/)
{
$value = getpwuid($value);
}
$self->{'USER'} = $value;
}
else
{
unless (scalar $self->{'USER'})
{
$self->{'USER'} = getpwuid($<);
}
return $self->{'USER'};
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Software/Packager/Rpm.pm view on Meta::CPAN
# here is where we specify all the installable objects
print SPEC "\%files\n";
foreach my $object ($self->get_directory_objects(), $self->get_file_objects(), $self->get_link_objects())
{
my $destination = $object->destination();
my $user = getpwuid($object->user());
my $group = getgrgid($object->group());
my $mode = $object->mode();
print SPEC "\%attr($mode, $user, $group)";
print SPEC " \%" . $object->kind() if $object->kind();
print SPEC " /$destination\n"
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Software/Packager/Object/Solaris.pm view on Meta::CPAN
{
$data{'PART'} = 1;
}
$data{'CLASS'} = "none" unless scalar $data{'CLASS'};
$data{'USER'} = getpwuid($<) unless $data{'USER'};
unless ($data{'GROUP'})
{
my $groups = $(;
my ($group, $crap) = split / /, $groups;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Software/Packager/Object/Svr4.pm view on Meta::CPAN
my $self = shift;
my $value = shift;
$self->{USER} = $value
if $value;
$self->{USER} ||= [getpwuid([lstat($self->source)]->[4])]->[0];
return $self->{USER};
}
sub group
{
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Spreadsheet/Edit/IO.pm view on Meta::CPAN
my ($uid) = @_;
$uid //= eval{ $> } // -1; # default to EUID
state $answer = {};
return $answer->{$uid} //= do {
# https://stackoverflow.com/questions/12081246/how-to-get-system-user-full-name-on-windows-in-perl
eval { getpwuid($uid) // $uid }
||
($^O =~ /MSWin/ && $uid == (eval{$>}//-1) && eval{ # untested...
require Win32API::Net;
Win32API::Net::UserGetInfo($ENV{LOGONSERVER}||'',Win32::LoginName(),10,my $info={});
$info->{fullName}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Stem/Boot.pm view on Meta::CPAN
my $cmd ;
if ( my $user = $self->{'user'} ) {
if ( getpwuid($<) ne $user ) {
$cmd .= "su - $user ; " ;
}
}
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
# Replace tilde with home path.
$path =~ s{ ^ ~ ( [^/]* ) }
{ $1
? (getpwnam($1))[7]
: ( $ENV{HOME} || $ENV{LOGDIR}
|| (getpwuid($<))[7]
)
}ex;
# Replace espaced tilde with regular tilde.
$path =~ s/\\~/~/g;
return $path
view all matches for this distribution
view release on metacpan or search on metacpan
# ----------------------------------------------------------------------
# Version 1.14 December 22, 2005
# ----------------------------------------------------------------------
* Updated tests so that 04subrefs.t no longer fails if getpwuid is not
defined. RT#2083.
# ----------------------------------------------------------------------
# Version 1.13 February 11, 2002
# ----------------------------------------------------------------------
view all matches for this distribution
view release on metacpan or search on metacpan
t/01_warnings.t view on Meta::CPAN
Useless use of localtime in void context at - line 48.
Useless use of gmtime in void context at - line 49.
Useless use of getgrnam in void context at - line 50.
Useless use of getgrgid in void context at - line 51.
Useless use of getpwnam in void context at - line 52.
Useless use of getpwuid in void context at - line 53.
Useless use of subroutine prototype in void context at - line 54.
Useless use of sort in scalar context at - line 3.
Useless use of string in void context at - line 3.
Useless use of telldir in void context at - line 13.
Useless use of getppid in void context at - line 13.
t/01_warnings.t view on Meta::CPAN
Useless use of localtime in void context at - line 48.
Useless use of gmtime in void context at - line 49.
Useless use of getgrnam in void context at - line 50.
Useless use of getgrgid in void context at - line 51.
Useless use of getpwnam in void context at - line 52.
Useless use of getpwuid in void context at - line 53.
Useless use of subroutine prototype in void context at - line 54.
Useless use of sort in scalar context at - line 3.
Useless use of string in void context at - line 3.
Useless use of telldir in void context at - line 13.
Useless use of getppid in void context at - line 13.
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
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
[ sub { each %h }, { 0 => 0.5, 2 => 0.5 } ],
[ sub { stat $0 }, { 0 => 0.5, 13 => 0.5 } ],
[ sub { do { getpwnam 'root' } }, { 0 => 0.5, 10 => 0.5 } ],
[ sub { 1; getpwuid '0' }, { 0 => 0.5, 10 => 0.5 } ],
[ sub { eval { return getpwent } }, { 0 => 0.5, 10 => 0.5 } ],
[ sub { do { getgrnam 'root' } }, { 0 => 0.5, 4 => 0.5 } ],
[ sub { 1; getgrgid '0' }, { 0 => 0.5, 4 => 0.5 } ],
[ sub { eval { return getgrent } }, { 0 => 0.5, 4 => 0.5 } ],
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Sudo.pm view on Meta::CPAN
# test for remote execution ... you need to have the ssh keys
# setup before this ...
#$remote_machine=$self->{hostname}if (defined($self->{hostname}));
if (defined($remote_machine))
{
$remote_user = getpwuid($<); # default user name is the user running the script
if (defined($self->{username}))
{
$remote_user = $self->{username};
}
push @cmd,"ssh";
view all matches for this distribution
view release on metacpan or search on metacpan
File/File.xs view on Meta::CPAN
if (oflags & O_CREAT && creator == NULL) {
uid_t uid;
struct passwd *pwent;
uid = getuid();
if ((pwent = getpwuid(uid)) == NULL) {
snprintf(user, sizeof (user), "%d", uid);
} else {
strlcpy(user, pwent->pw_name, sizeof (user));
}
creator = user;
view all matches for this distribution
view release on metacpan or search on metacpan
$linelen += length($comment) + 1;
# Validate users.
foreach my $u (@$user) {
push(@err, [6, gettext("User \"%s\" does not exist"), $u])
if (! (($u =~ /^\d+$/ && defined(getpwuid($u))) ||
($u =~ /^\*$/) || ($u =~ /^\!\*$/) ||
($u =~ /^\!(\S+)$/ && defined(getpwnam($1))) ||
defined(getpwnam($u))));
$linelen += length($u) + 1;
}
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
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
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/Syntax/Highlight/Engine/Kate/Octave.pm view on Meta::CPAN
'getpgrp',
'getpid',
'getppid',
'getpwent',
'getpwnam',
'getpwuid',
'getrusage',
'getuid',
'givens',
'glob',
'gls',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Syntax/Highlight/Engine/Simple/Perl.pm view on Meta::CPAN
'getgrgid',
'getgrnam',
'getlogin',
'getpwent',
'getpwnam',
'getpwuid',
'readline',
'readlink',
'readpipe',
'setgrent',
'setpwent',
view all matches for this distribution
view release on metacpan or search on metacpan
t/subclass.t view on Meta::CPAN
'getgrgid',
'getgrnam',
'getlogin',
'getpwent',
'getpwnam',
'getpwuid',
'readline',
'readlink',
'readpipe',
'setgrent',
'setpwent',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Syntax/Highlight/Perl/Improved.pm view on Meta::CPAN
| prototype
| getnetent
| endnetent
| rewinddir
| wantarray
| getpwuid
| closedir
| getlogin
| readlink
| endgrent
| getgrgid
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Syntax/Highlight/Perl.pm view on Meta::CPAN
| prototype
| getnetent
| endnetent
| rewinddir
| wantarray
| getpwuid
| closedir
| getlogin
| readlink
| endgrent
| getgrgid
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Syntax/Highlight/Universal/hrc/base/perl-keywords.hrc view on Meta::CPAN
<word name="getprotobyname"/>
<word name="getprotobynumber"/>
<word name="getprotoent"/>
<word name="getpwent"/>
<word name="getpwnam"/>
<word name="getpwuid"/>
<word name="getservbyname"/>
<word name="getservbyport"/>
<word name="getservent"/>
<word name="getsockname"/>
<word name="getsockopt"/>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Syntax/Highlight/WithEmacs.pm view on Meta::CPAN
method start_server {
return if $self->{made_server};
my ($cout, $cin, $cerr);
my @cmd = ($self->emacs_cmd, @{$self->emacs_args},
'--daemon' . ($self->server_name ? '='.$self->server_name : ''));
local $ENV{HOME} = (getpwuid $<)[7] unless $ENV{HOME};
local $ENV{TERM} = $self->term_spec;
run \@cmd, \$cin, \$cout, \$cerr;
$self->{made_server} = 1;
}
lib/Syntax/Highlight/WithEmacs.pm view on Meta::CPAN
@cmd_args = grep { !/^-q$/i } @cmd_args if $self->use_client;
my $hyper = $self->htmlize_generate_hyperlinks ? 't' : 'nil';
my @args = (@cmd, '-nw', @cmd_args,
-eval => qq((ignore-errors (require 'htmlize) (setq htmlize-generate-hyperlinks $hyper) (setq htmlize-output-type "$mode") (htmlize-file $in $out))),
-eval => $kill_command);
local $ENV{HOME} = (getpwuid $<)[7] unless $ENV{HOME};
local $ENV{TERM} = $self->term_spec;
my ($tin, $tout, $err);
run \@args, '<pty<', \$tin, '>pty>', \$tout, '2>', \$err;
$self->{made_server} = $self->use_client;
}
lib/Syntax/Highlight/WithEmacs.pm view on Meta::CPAN
method kill_server {
my @cmd = ($self->_client_cmd_args,
-eval => '(kill-emacs)');
my ($cout, $cin, $cerr);
local $ENV{HOME} = (getpwuid $<)[7] unless $ENV{HOME};
local $ENV{TERM} = $self->term_spec;
run \@cmd, \$cin, \$cout, \$cerr;
$self->{made_server} = 0;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Syntax/Infix/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
lib/Syntax/Infix/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/Syntax/Kamelon/XML/octave.xml view on Meta::CPAN
<item> getgrent </item>
<item> getgrgid </item>
<item> getgrnam </item>
<item> getpwent </item>
<item> getpwnam </item>
<item> getpwuid </item>
<item> getrusage </item>
<item> givens </item>
<item> gmtime </item>
<item> hess </item>
<item> ifft </item>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Sys/Info/Driver/OSX.pm view on Meta::CPAN
sub powermetrics {
my @opt = @_;
if ( $< ) {
croak sprintf 'powermetrics can only be executed as root and not %s (%s)',
(getpwuid $<)[0],
$<,
;
}
my $success;
my($out, $error) = capture {
view all matches for this distribution
view release on metacpan or search on metacpan
t/03lastlog.t view on Meta::CPAN
ok($ll = Sys::Lastlog->new(),"Create object");
my ($llent,$lp);
my $login = getpwuid($<);
ok($lp = $ll->lastlog_path(),"lastlog_path()");
ok($llent = $ll->getlluid($<),"Get Entry by UID");
ok($llent = $ll->getllnam($login),"Get Entry by logname");
ok(my $t = $llent->ll_time(),"Get ll_time");
view all matches for this distribution