view release on metacpan or search on metacpan
public/javascripts/ace/mode-ocaml.js view on Meta::CPAN
"get_method_label|get_normalize_ratio|get_normalize_ratio_when_printing|" +
"get_print_tags|get_state|get_variable|getcwd|getegid|getegid|getenv|" +
"getenv|getenv|geteuid|geteuid|getgid|getgid|getgrgid|getgrgid|getgrnam|" +
"getgrnam|getgroups|gethostbyaddr|gethostbyname|gethostname|getitimer|" +
"getlogin|getpeername|getpid|getppid|getprotobyname|getprotobynumber|" +
"getpwnam|getpwuid|getservbyname|getservbyport|getsockname|getsockopt|" +
"getsockopt_float|getsockopt_int|getsockopt_optint|gettimeofday|getuid|" +
"global_replace|global_substitute|gmtime|green|grid|group_beginning|" +
"group_end|gt_big_int|gt_num|guard|handle_unix_error|hash|hash_param|" +
"hd|header_size|i|id|ignore|in_channel_length|in_channel_of_descr|incr|" +
"incr_num|index|index_from|inet_addr_any|inet_addr_of_string|infinity|" +
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Netdisco/Environment.pm view on Meta::CPAN
or not -f file($ENV{DANCER_APPDIR}, 'config.yml')) {
FindBin::again();
my $me = File::Spec->catfile($FindBin::RealBin, $FindBin::RealScript);
my $uid = (stat($me))[4] || 0;
my $home = ($ENV{NETDISCO_HOME} || (getpwuid($uid))[7] || $ENV{HOME});
$ENV{NETDISCO_HOME} ||= $home;
my $auto = dir(dist_dir('App-Netdisco'))->absolute;
$ENV{DANCER_APPDIR} ||= $auto->stringify;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Oozie/Role/Fields/Generic.pm view on Meta::CPAN
);
has effective_username => (
is => 'ro',
default => sub {
(getpwuid $<)[0]
|| die 'Unable to locate the effective user name';
},
);
1;
view all matches for this distribution
view release on metacpan or search on metacpan
bin/prefixadmin view on Meta::CPAN
if ($verbose >= 2) {
printf("%3d %8d %10s %2d %5d %5d %6d %15d [%17s] %s\n",
$dev, $ino, $self->format_mode($mode), $nlink, $uid, $gid, $rdev, $size, time2str("%Y-%m-%d %H:%M:%S", $mtime), $path);
}
my ($u_name, $u_pass, $u_uid, $u_gid, $u_quota, $u_comment, $u_gcos, $u_dir, $u_shell, $u_expire) = getpwuid($uid);
print "Uname: $u_name UID: $u_uid\n" if ($verbose >= 2);
my ($grp_name, $grp_passwd, $grp_gid, $grp_members) = getgrgid($gid);
print "Gname: $grp_name GID: $grp_gid Members: $grp_members\n" if ($verbose >= 2);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Padadoy.pm view on Meta::CPAN
foreach (@configs) {
$yaml->{$_} = $values{$_} if defined $values{$_};
}
$self->{user} = $yaml->{user} || getlogin || getpwuid($<);
$self->{repository} = $yaml->{repository} || catdir($self->{base},'repository');
$self->{port} = $yaml->{port} || 6000;
$self->{pidfile} = $yaml->{pidfile} || catfile($self->{base},'starman.pid');
$self->{remote} = $yaml->{remote};
view all matches for this distribution
view release on metacpan or search on metacpan
script/_pick view on Meta::CPAN
# my ($user, $slash) = @_;
# my @ent;
# if (length $user) {
# @ent = getpwnam($user);
# } else {
# @ent = getpwuid($>);
# $user = $ent[0];
# }
# return $ent[7] . $slash if @ent;
# "~$user$slash"; # return as-is when failed
#}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Prove/Elasticsearch/Blamer/System.pm view on Meta::CPAN
my $info = System::Info->sysinfo_hash();
return _get_uname() . '@' . $info->{hostname};
}
sub _get_uname {
my @pw_info = getpwuid($<);
return $pw_info[0];
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
t/02-funcs.t view on Meta::CPAN
local $TODO = "Make a better way to test change_user()";
#skip "You are not root", 2 unless $c->check_root;
my $file = tmpnam;
my ($user, $new_uid);
for my $uid(1 ... 9999){
$user = getpwuid($uid);
$new_uid = $uid;
last if $user;
}
#skip "No user to test", 2 unless $user;
my $pid = fork();
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/RecordStream/Operation/fromps.pm view on Meta::CPAN
$this->{'CONVERTER'} = $func;
}
sub get_converter {
my $this = shift;
$this->{'CONVERTER'} ||= sub { return (getpwuid($_[0]))[0] };
return $this->{'CONVERTER'};
}
sub wants_input {
return 0;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/ReslirpTunnel.pm view on Meta::CPAN
}
}
sub _get_user_name {
my $self = shift;
my $user = getpwuid($<);
return $user if $user;
$self->_warn("Failed to get user name, using 'nobody'");
return 'nobody';
}
view all matches for this distribution
view release on metacpan or search on metacpan
}
# Get the shell from the password data. An empty shell field is
# legal, and means /bin/sh.
my $shell = ( getpwuid $EUID )[8];
return $shell if defined $shell && $shell ne q{};
return '/bin/sh';
}
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
lib/App/SeismicUnixGui/big_streams/RestoreProject.pl view on Meta::CPAN
Internal definitions
=cut
my $success_counter = 0;
my $current_username = getpwuid($<);
my $prog_name = 'Project';
my $home_directory;
my $untar_options = '-xzvf';
my $default_tutorial_name = 'Servilleta';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/SimpleBackuper/Backup.pm view on Meta::CPAN
sub _proc_uid_gid($$$) {
my($uid, $gid, $uids_gids) = @_;
my $last_uid_gid = @$uids_gids ? $uids_gids->unpack( $uids_gids->[-1] )->{id} : 0;
my $user_name = getpwuid($uid);
my($user) = grep { $_->{name} eq $user_name } map { $uids_gids->unpack($_) } @$uids_gids;
if(! $user) {
$user = {id => ++$last_uid_gid, name => $user_name};
$uids_gids->upsert({ id => $user->{id} }, $user );
#printf "new owner user added (unix uid %d, name %s, internal uid %d)\n", $uid, $user_name, $user->{id};
lib/App/SimpleBackuper/Backup.pm view on Meta::CPAN
if(! @stat) {
print ". Not exists\n" if $options->{verbose};
return;
}
else {
printf ", stat: %s:%s %o %s modified at %s", scalar getpwuid($stat[4]), scalar getgrgid($stat[5]), $stat[2], fmt_weight($stat[7]), fmt_datetime($stat[9]) if $options->{verbose};
}
my($backups, $blocks, $files, $parts, $uids_gids) = @{ $state->{db} }{qw(backups blocks files parts uids_gids)};
view all matches for this distribution
view release on metacpan or search on metacpan
t/slaughter-api-user-tests.t view on Meta::CPAN
use strict;
use Test::More qw! no_plan !;
my $SELF = getlogin || getpwuid($<) || $ENV{ 'USER' };
#
# Ensure we have a user we're running as.
#
ok( length($SELF) > 0, "We have a user" );
view all matches for this distribution
view release on metacpan or search on metacpan
share/public/highlight/highlight.min.js view on Meta::CPAN
className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...B]
},H,J,{beginKeywords:"import",end:/$/,contains:[...v],relevance:0
},...B,..._,...M,I,P,...z,...q,U,V]}}})();hljs.registerLanguage("swift",e)})();/*! `perl` grammar compiled for Highlight.js 11.7.0 */
(()=>{var e=(()=>{"use strict";return e=>{
const n=e.regex,t=/[dualxmsipngr]{0,12}/,r={$pattern:/[\w.]+/,
keyword:"abs accept alarm and atan2 bind binmode bless break caller chdir chmod chomp chop chown chr chroot close closedir connect continue cos crypt dbmclose dbmopen defined delete die do dump each else elsif endgrent endhostent endnetent endprotoen...
},s={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:r},i={begin:/->\{/,
end:/\}/},a={variants:[{begin:/\$\d/},{
begin:n.concat(/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")
},{begin:/[$%@][^\s\w{]/,relevance:0}]
},c=[e.BACKSLASH_ESCAPE,s,a],o=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],g=(e,r,s="\\1")=>{
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/SmokeBrew/Plugin/BINGOS.pm view on Meta::CPAN
use vars qw[@RUN_TIME_INC $LIB_DIR $BUNDLE_DIR $BASE $PRIV_LIB];
$LIB_DIR = File::Spec->catdir( $FindBin::Bin, qw[.. lib] );
$BUNDLE_DIR = File::Spec->catdir( $FindBin::Bin, qw[.. inc bundle] );
my $who = getlogin || getpwuid($<) || $<;
$BASE = File::Spec->catfile(
$FindBin::Bin, '..', '.cpanplus', $who);
$PRIV_LIB = File::Spec->catfile( $BASE, 'lib' );
@RUN_TIME_INC = ($PRIV_LIB, @INC);
view all matches for this distribution
view release on metacpan or search on metacpan
t/Installer.t view on Meta::CPAN
use App::Spoor::Config;
use App::Spoor::LoginUnitFile;
use App::Spoor::AccessUnitFile;
my $test_user = getpwuid($>);
sub setup {
mkdir('/tmp/app_spoor_test_root', 0744);
mkdir('/tmp/app_spoor_test_root/etc', 0744);
mkdir('/tmp/app_spoor_test_root/etc/systemd', 0744);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Sqitch.pm view on Meta::CPAN
default => sub {
$ENV{ SQITCH_ORIG_SYSUSER } || do {
# Adapted from User.pm.
require Encode::Locale;
return Encode::decode( locale => getlogin )
|| Encode::decode( locale => scalar getpwuid( $< ) )
|| $ENV{ LOGNAME }
|| $ENV{ USER }
|| $ENV{ USERNAME }
|| try {
require Win32;
view all matches for this distribution
view release on metacpan or search on metacpan
d_gethostbyaddr_r d_gethostbyname_r d_gethostent_r \
d_getlogin_r d_getnbyaddr d_getnbyname d_getnent \
d_getnetbyaddr_r d_getnetbyname_r d_getnetent_r \
d_getpent d_getpbyname d_getpbynumber d_getprotobyname_r \
d_getprotobynumber_r d_getprotoent_r d_getpwent \
d_getpwent_r d_getpwnam_r d_getpwuid_r d_getsent \
d_getservbyname_r d_getservbyport_r d_getservent_r \
d_getspnam_r d_getsbyname
# d_gethbyname
do
PERL_CONFIGURE="$PERL_CONFIGURE -U$sym"
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/App/TestOnTap/PackInfo.pm view on Meta::CPAN
print "Getting username...\\n" if \$verbose;
my (undef, \$usernameFile) = tempfile('testontap_username_XXXX', TMPDIR => 1, UNLINK => 1);
if (\$info)
{
my \$username = \$IS_WINDOWS ? getlogin() : scalar(getpwuid(\$<));
write_file(\$usernameFile, "\$username\\n") || die("Failed to write '\$usernameFile': $!\\n");
}
print "Getting hostname...\\n" if \$verbose;
my (undef, \$hostnameFile) = tempfile('testontap_hostname_XXXX', TMPDIR => 1, UNLINK => 1);
view all matches for this distribution
view release on metacpan or search on metacpan
script/upf-get-user view on Meta::CPAN
=head1 DESCRIPTION
Either C<user> OR C<uid> must be specified.
The function is not dissimilar to Unix's C<getpwnam()> or C<getpwuid()>.
=head1 OPTIONS
C<*> marks required options.
view all matches for this distribution
view release on metacpan or search on metacpan
script/wp-tools view on Meta::CPAN
}
($uid, $gid, $home_dir) = (getpwnam $args->{'username'})[2, 3, 7];
}
else {
my $username;
($username, $uid, $gid, $home_dir) = (getpwuid $<)[0, 2, 3, 7];
$args->{'username'} = $username if !$args->{'username'};
}
### check space and average IO wait time of the home partition
if (my ($homeslash) = $home_dir =~ m{^(/home\d+)/} and !$args->{force}) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Yabsm/Backup/Generic.pm view on Meta::CPAN
my $tmp_snapshot_dir = yabsm_dir($config_ref) . "/.yabsm-var/${backup_type}_backups/$backup/tmp-snapshot/$tframe";
if ($die_unless_exists{DIE_UNLESS_EXISTS}) {
unless (-d $tmp_snapshot_dir && -r $tmp_snapshot_dir) {
my $username = getpwuid $<;
die "yabsm: error: no directory '$tmp_snapshot_dir' that is readable by user '$username'. This directory should have been initialized when the daemon started.\n";
}
}
return $tmp_snapshot_dir;
lib/App/Yabsm/Backup/Generic.pm view on Meta::CPAN
my $bootstrap_dir = yabsm_dir($config_ref) . "/.yabsm-var/${backup_type}_backups/$backup/bootstrap-snapshot";
if ($or_die{DIE_UNLESS_EXISTS}) {
unless (-d $bootstrap_dir && -r $bootstrap_dir) {
my $username = getpwuid $<;
die "yabsm: error: no directory '$bootstrap_dir' that is readable by user '$username'. This directory should have been initialized when the daemon started.\n";
}
}
return $bootstrap_dir;
view all matches for this distribution
view release on metacpan or search on metacpan
script/_chinese-zodiac-of view on Meta::CPAN
# my ($user, $slash) = @_;
# my @ent;
# if (length $user) {
# @ent = getpwnam($user);
# } else {
# @ent = getpwuid($>);
# $user = $ent[0];
# }
# return $ent[7] . $slash if @ent;
# "~$user$slash"; # return as-is when failed
#}
view all matches for this distribution
view release on metacpan or search on metacpan
# my ($user, $slash) = @_;
# my @ent;
# if (length $user) {
# @ent = getpwnam($user);
# } else {
# @ent = getpwuid($>);
# $user = $ent[0];
# }
# return $ent[7] . $slash if @ent;
# "~$user$slash";
#}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/bk.pm view on Meta::CPAN
my %options;
# 'tidier' way to store global variables
# probably shouldnt do it like this - will rework later
$options{debug} ||= 0;
$options{username} = getpwuid($EUID);
if ( $options{username} eq 'root' ) {
logmsg( 2, 'Running as root so dropping username from file backups' );
$options{username} = '';
}
view all matches for this distribution
view release on metacpan or search on metacpan
http://github.com/avenj/app-bmkpasswd"
);
Test::More::plan(skip_all => 'these tests are known to fail on Windows');
}
if ($ENV{AUTOMATED_TESTING} && $^O ne 'MSWin32' && getpwuid($<) eq 'njh') {
# obnoxious and useless test noise, something's fucky with this cat's
# smokers; f.ex:
# http://www.cpantesters.org/cpan/report/82c71a7e-e6a9-11e5-8839-f3218d218ed8
require Test::More;
Test::More::plan(skip_all =>
view all matches for this distribution
view release on metacpan or search on metacpan
(getpwnam $user)[7];
} else {
if (defined $ENV{HOME}) {
$ENV{HOME};
} else {
(getpwuid $<)[7];
}
}
}
};
unless (defined $homedir) {
view all matches for this distribution