view release on metacpan or search on metacpan
t/lib/Apache/test.pm view on Meta::CPAN
my $file = _ask(" Config file", $compiled{SERVER_CONFIG_FILE}, 1);
$conf{modules} = $pkg->_read_existing_conf($file);
}
# Get default user (apache doesn't like to run as root, special-case it)
my $defuser = ($< && getpwuid $<) || 'nobody';
$conf{user} = _ask("User to run tests under", $defuser);
my $defgroup = ($defuser eq 'nobody' ? 'nobody' : getgrgid((getpwnam $conf{user})[3]));
$conf{group} = _ask("Group to run tests under", $defgroup);
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/Apache/test.pm view on Meta::CPAN
my $file = _ask(" Config file", $compiled{SERVER_CONFIG_FILE}, 1);
$conf{modules} = $pkg->_read_existing_conf($file);
}
# Get default user (apache doesn't like to run as root, special-case it)
my $defuser = ($< && getpwuid $<) || 'nobody';
$conf{user} = _ask("User to run tests under", $defuser);
my $defgroup = ($defuser eq 'nobody' ? 'nobody' : getgrgid((getpwnam $conf{user})[3]));
$conf{group} = _ask("Group to run tests under", $defgroup);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Logmonster/Utility.pm view on Meta::CPAN
my %args = ( debug => $p{debug}, fatal => $p{fatal} );
-e $file or return $log->error( "$file does not exist.", %args);
-r $file or return $log->error( "$file is not readable by you ("
. getpwuid($>)
. "). You need to fix this, using chown or chmod.", %args);
return 1;
}
lib/Apache/Logmonster/Utility.pm view on Meta::CPAN
if ( !-e $file ) {
my ( $base, $path, $suffix ) = fileparse($file);
return $log->error( "is_writable: $path not writable by "
. getpwuid($>)
. "$nl$nl", %args) if (-e $path && !-w $path);
return 1;
}
return $log->error( " $file not writable by " . getpwuid($>) . "$nl$nl", %args ) if ! -w $file;
$log->audit( "$file is writable" );
return 1;
}
view all matches for this distribution
view release on metacpan or search on metacpan
PrettyPerl.pm view on Meta::CPAN
fork format formline 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 hex index
int ioctl join keys kill last lc lcfirst
length link listen local localtime log
lstat map map mkdir msgctl msgget msgrcv
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/Apache/test.pm view on Meta::CPAN
my $file = _ask(" Config file", $compiled{SERVER_CONFIG_FILE}, 1);
$conf{modules} = $pkg->_read_existing_conf($file);
}
# Get default user (apache doesn't like to run as root, special-case it)
my $defuser = ($< && getpwuid $<) || 'nobody';
$conf{user} = _ask("User to run tests under", $defuser);
my $defgroup = ($defuser eq 'nobody' ? 'nobody' : getgrgid((getpwnam $conf{user})[3]));
$conf{group} = _ask("Group to run tests under", $defgroup);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/TestConfig.pm view on Meta::CPAN
sub default_user {
return if WINFU;
my $uid = $>;
my $user = $ENV{APACHE_TEST_USER} || (getpwuid($uid) || "#$uid");
if ($user eq 'root') {
my $other = (getpwnam('nobody'))[0];
if ($other) {
$user = $other;
view all matches for this distribution
view release on metacpan or search on metacpan
or return error("unable to open dbm file: $!");
}
@users = () if ($all);
foreach(@users) {
# LOOKUP THE USERNAME IF WE WERE PASSED A UID
$_ = (getpwuid $_)[0] || $_ if ($_ =~ /^\d+$/);
# LOOKUP THE UID
(defined($uid = (getpwnam $_)[2])) || ($uid = $_);
# STORE THE USERNAME INDEXED BY UID (unless $wantuid is true)
$uids{$uid} = ($wantuid ? $uid : $_);
}
if ($all) {
foreach(keys %$ref) {
unless (defined $uids{$_}) {
$uids{$_} = $_;
if ((/^\d+$/) and (! $wantuid)) {
$uids{$_} = (getpwuid $_)[0] || $_;
}
}
}
}
foreach(keys %uids) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/VMonitor.pm view on Meta::CPAN
push @recs, {
cat_id => $cat_id,
count => $cnt,
pid => $pid,
pid_link => fixup_url($self->{url}, pid => $pid),
uid => scalar(getpwuid($state->uid)),
fsize => size_string($mem->size($pid)),
fshare => size_string($mem->share($pid)),
fvsize => size_string($mem->vsize($pid)),
frss => size_string($mem->rss($pid)),
tty => $tty,
lib/Apache/VMonitor.pm view on Meta::CPAN
$max_len{pid} = $len if $len > $max_len{pid};
$len = length $state->cmd;
$max_len{cmd} = $len if $len > $max_len{cmd};
$len = length $uid->tty;
$max_len{tty} = $len if $len > $max_len{tty};
$len = length scalar getpwuid $state->uid;
$max_len{uid} = $len if $len > $max_len{uid};
}
}
return {
lib/Apache/VMonitor.pm view on Meta::CPAN
### generic process info
my $proc_info;
# UID and STATE
my $state = $gtop->proc_state($pid);
$proc_info->{uid} = scalar getpwuid $state->uid;
$proc_info->{gid} = scalar getgrgid $state->gid;
$proc_info->{state} = $state->state;
# TTY
my $proc_uid = $gtop->proc_uid($pid);
my $tty = $proc_uid->tty;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Voodoo/Install/Config.pm view on Meta::CPAN
sub apache_uid {
my $self = shift;
my $default = "apache";
if ($self->{'APACHE_UID'}) {
my $d = (getpwuid($self->{APACHE_UID}))[0];
$default = $d if ($d);
}
while (1) {
my $apache = prompt("User that Apache runs as",$default);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/AutoIndex/XSLT.pm view on Meta::CPAN
atime mtime ctime blksize blocks)} = lstat($filename);
my %rtn;
$rtn{$_} = $stat{$_} for qw(uid gid mtime ctime size);
$rtn{perms} = file_mode($stat{mode});
$rtn{owner} = scalar getpwuid($rtn{uid});
$rtn{group} = scalar getgrgid($rtn{gid});
$rtn{nicesize} = comify(sprintf('%d KB',
($rtn{size} + ($rtn{size} ? 1024 : 0))/1024
));
view all matches for this distribution
view release on metacpan or search on metacpan
endprotoent endpwent endservent eof eval exec exists
exit exp fcntl fileno flock fork format formline 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 hex import index int
ioctl join keys kill last lc lcfirst length link listen
local localtime lock log lstat m map mkdir msgctl msgget
msgrcv msgsnd my next no oct open opendir ord our pack
view all matches for this distribution
view release on metacpan or search on metacpan
script/_acme-cpanauthors 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
return $data;
}
sub home_directory {
return (getpwuid($>))[7];
}
sub conf_directory {
my($self) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
# -----------------------------------------------------------------------------
my $MARKUP_DIR = "$ENV{HOME}/." . get_program();
$MARKUP_DIR = $ENV{MARKUP_DIR} if ( $ENV{MARKUP_DIR} );
my $CACHE_DIR = "/tmp/" . getpwuid($>) . "/cache";
my $TEMPLATE = <<EOD;
<!DOCTYPE html>
<html>
<head>
# if there is no data in the config then lets create some
if ( !$config->has_data() ) {
$config->set( '/page/size', 'A4' );
$config->set( '/page/orientation', 'Portrait' );
my $author = getpwuid($>);
$config->set( '/author', $author );
$config->set( '/copyright', "Property of $author 2014" );
$config->store();
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
cgi-bin/comments.cgi view on Meta::CPAN
#
# In this case ~/comments/
#
my $COMMENT = $ENV{ 'DOCUMENT_ROOT' } . "../comments/";
#my $COMMENT = (getpwuid $>)[7] . "/comments";
#
# The notification addresses - leave blank to disable
#
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/ClusterSSH.pm view on Meta::CPAN
$text =~ s!$macro_hostname!$hostname!xsmg;
}
{
my $macro_username = $self->config->{macro_username};
my $username = $servers{$svr}{username};
$username ||= getpwuid($UID);
$text =~ s!$macro_username!$username!xsmg;
}
{
my $macro_newline = $self->config->{macro_newline};
$text =~ s!$macro_newline!\n!xsmg;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Context/Cmd.pm view on Meta::CPAN
=cut
sub user {
&App::sub_entry if ($App::trace);
my $self = shift;
my $user = $self->{user} || getlogin || (getpwuid($<))[0] || "guest";
&App::sub_exit($user) if ($App::trace);
$user;
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
$as_group ||= 'nogroup';
}
if($> != 0) {
# Not root? Then we're ourselves
($as_user) = getpwuid($>);
($as_group) = getgrgid(POSIX::getgid());
}
$background = 1 if(!defined $background);
$background = find_option('-X') ? 0 : $background;
###########################################
cmd_line_parse();
# Check beforehand so the user knows what's going on.
if(! -w dirname($pidfile) or -f $pidfile and ! -w $pidfile) {
my ($name,$passwd,$uid) = getpwuid($>);
LOGDIE "$pidfile not writable by user $name";
}
if($action eq "status") {
exit status();
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Net/FTPServer/RO_FTPThis/Server.pm view on Meta::CPAN
my @st = stat($dir) or die "Can't stat '$dir': $!";
my @pw;
if ($st[4] == 0) {
@pw = getpwnam("nobody") or die "Can't get user nobody";
} else {
@pw = getpwuid($st[4]) or die "Can't get user with UID $st[4]";
}
if ($> == 0) {
# chroot to directory and change to directory's owner
view all matches for this distribution
view release on metacpan or search on metacpan
script/_genpass-id 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";
#}
view all matches for this distribution
view release on metacpan or search on metacpan
script/_genpass-wordlist 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";
#}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/GitFind/FileStatLs.pm view on Meta::CPAN
sub ls_stat {
my $fn = shift;
my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
$atime,$mtime,$ctime,$blksize,$blocks) = lstat $fn;
my $dft = "%b %d %Y";
my $ud = getpwuid($uid);
my $gd = getgrgid($gid);
my $fm = format_mode($mode);
my $mt = strftime $dft,localtime $mtime;
my $link_to = (($mode & S_IFLNK) == S_IFLNK ? " -> @{[readlink $fn]}" : "");
my $fmt = "%10s %3d %7s %4s %12d %12s %-s%s\n";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/GitWorkspaceScanner.pm view on Meta::CPAN
if ( !defined( $self->{'git_repositories'} ) )
{
if ( $self->{'verbose'} )
{
$log->infof( "Running as user '%s'.", getpwuid( $< ) );
$log->infof( "Scanning workspace '%s'.", $self->{'workspace'} );
}
# Find .git directories.
# TODO: convert to not use backticks.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Gitc/Its/Eventum.pm view on Meta::CPAN
if not $issue;
# update the Eventum issue
my $time_format = '%m/%d/%Y';
$time_format .= ' %I:%M %p' if $args->{with_time};
$message = (getpwuid $>)[6] # user's name
. strftime( " $time_format: $message\n", localtime );
my ( $rc, $status_exception );
eval {
return $rc = $issue->close($message) if $to and $to eq 'CLOSE';
$issue->postpone_updates;
view all matches for this distribution
view release on metacpan or search on metacpan
t/TestBot.pm view on Meta::CPAN
use base 'Class::Accessor::Fast';
__PACKAGE__->mk_accessors(
qw( dir pid_file output_file addr port client_config_file )
);
my @info = getpwnam( $ENV{USER} = getpwuid($>) );
our $USER = $info[0];
( our $USER_NAME = $info[6] ) =~ s/,.*//;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Koyomi/Job.pm view on Meta::CPAN
}
sub _proc_user {
my $self = shift;
return
$ENV{USER} || $ENV{LOGNAME} || getlogin() || getpwuid($<)
|| croakf(q/Can't get user of process! id=%d/, $self->id);
}
sub _get_lock {
args(
view all matches for this distribution
view release on metacpan or search on metacpan
kritika.fatpack view on Meta::CPAN
$fatpacked{"ExtUtils/Helpers.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'EXTUTILS_HELPERS';
package ExtUtils::Helpers;$ExtUtils::Helpers::VERSION='0.05';use strict;use warnings FATAL=>'all';use Exporter 5.57 'import';use Config;use File::Basename qw/basename/;use File::Spec::Functions qw/splitpath canonpath abs2rel splitdir/;use Text::Par...
EXTUTILS_HELPERS
$fatpacked{"ExtUtils/Helpers/Unix.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'EXTUTILS_HELPERS_UNIX';
package ExtUtils::Helpers::Unix;$ExtUtils::Helpers::Unix::VERSION='0.05';use strict;use warnings FATAL=>'all';use Exporter 5.57 'import';our@EXPORT=qw/make_executable detildefy/;use Carp qw/croak/;use Config;my$layer=$] >= 5.008001 ? ":raw" : "";su...
EXTUTILS_HELPERS_UNIX
$fatpacked{"ExtUtils/Helpers/VMS.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'EXTUTILS_HELPERS_VMS';
package ExtUtils::Helpers::VMS;$ExtUtils::Helpers::VMS::VERSION='0.05';use strict;use warnings FATAL=>'all';use Exporter 5.57 'import';our@EXPORT=qw/make_executable detildefy/;use File::Copy qw/copy/;sub make_executable {my$filename=shift;my$batchn...
EXTUTILS_HELPERS_VMS
kritika.fatpack view on Meta::CPAN
$fatpacked{"File/HomeDir.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'FILE_HOMEDIR';
package File::HomeDir;use 5.00503;use strict;use Carp ();use Config ();use File::Spec ();use File::Which ();use vars qw{$VERSION @ISA @EXPORT @EXPORT_OK $IMPLEMENTED_BY};BEGIN {$VERSION='0.05';require Exporter;@ISA=qw{Exporter};@EXPORT=qw{home};@EX...
FILE_HOMEDIR
$fatpacked{"File/HomeDir/Darwin.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'FILE_HOMEDIR_DARWIN';
package File::HomeDir::Darwin;use 5.00503;use strict;use Cwd ();use Carp ();use File::HomeDir::Unix ();use vars qw{$VERSION @ISA};BEGIN {$VERSION='0.05';@ISA='File::HomeDir::Unix'}sub my_home {my$class=shift;if (exists$ENV{HOME}and defined$ENV{HOME...
FILE_HOMEDIR_DARWIN
$fatpacked{"File/HomeDir/Darwin/Carbon.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'FILE_HOMEDIR_DARWIN_CARBON';
package File::HomeDir::Darwin::Carbon;use 5.00503;use strict;use Cwd ();use Carp ();use File::HomeDir::Darwin ();use vars qw{$VERSION @ISA};BEGIN {$VERSION='0.05';@ISA='File::HomeDir::Darwin';local $@;eval "use prefork 'Mac::Files'"}sub my_home {my...
FILE_HOMEDIR_DARWIN_CARBON
kritika.fatpack view on Meta::CPAN
$fatpacked{"File/HomeDir/FreeDesktop.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'FILE_HOMEDIR_FREEDESKTOP';
package File::HomeDir::FreeDesktop;use 5.00503;use strict;use Carp ();use File::Spec ();use File::Which ();use File::HomeDir::Unix ();use vars qw{$VERSION @ISA};BEGIN {$VERSION='0.05';@ISA='File::HomeDir::Unix'}my$xdgprog=File::Which::which('xdg-us...
FILE_HOMEDIR_FREEDESKTOP
$fatpacked{"File/HomeDir/MacOS9.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'FILE_HOMEDIR_MACOS9';
package File::HomeDir::MacOS9;use 5.00503;use strict;use Carp ();use File::HomeDir::Driver ();use vars qw{$VERSION @ISA};BEGIN {$VERSION='0.05';@ISA='File::HomeDir::Driver'}SCOPE: {local $@;eval "use prefork 'Mac::Files'"}sub my_home {my$class=shif...
FILE_HOMEDIR_MACOS9
$fatpacked{"File/HomeDir/Test.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'FILE_HOMEDIR_TEST';
package File::HomeDir::Test;use 5.00503;use strict;use Carp ();use File::Spec ();use File::Temp ();use File::HomeDir::Driver ();use vars qw{$VERSION @ISA %DIR $ENABLED};BEGIN {$VERSION='0.05';@ISA='File::HomeDir::Driver';%DIR=();$ENABLED=0}sub impo...
FILE_HOMEDIR_TEST
$fatpacked{"File/HomeDir/Unix.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'FILE_HOMEDIR_UNIX';
package File::HomeDir::Unix;use 5.00503;use strict;use Carp ();use File::HomeDir::Driver ();use vars qw{$VERSION @ISA};BEGIN {$VERSION='0.05';@ISA='File::HomeDir::Driver'}sub my_home {my$class=shift;my$home=$class->_my_home(@_);if (defined$home and...
FILE_HOMEDIR_UNIX
$fatpacked{"File/HomeDir/Windows.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'FILE_HOMEDIR_WINDOWS';
package File::HomeDir::Windows;use 5.00503;use strict;use Carp ();use File::Spec ();use File::HomeDir::Driver ();use vars qw{$VERSION @ISA};BEGIN {$VERSION='0.05';@ISA='File::HomeDir::Driver'}sub CREATE () {1}sub my_home {my$class=shift;if (exists$...
FILE_HOMEDIR_WINDOWS
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Module/Setup.pm view on Meta::CPAN
{ "module.name" => $mod, # Foo::Bar
"module.version" => "0.01",
"module.summary" => $options->{summary} || $mod,
"module.license" => $options->{license} || "perl_5",
"current.year" => $options->{year} || 1900 + (localtime)[5],
"author.name" => $options->{author} || (getpwuid($<))[6],
"author.email" => $options->{email},
"author.cpanid" => $options->{cpanid},
"author.githubid" => $options->{githubid},
"perl.minversion" => $options->{minperl} || '5.008000',
};
lib/App/Module/Setup.pm view on Meta::CPAN
It takes a reference to a hash of params, as follows:
module # module to create in distro
version # initial version
author # author's full name (taken from C<getpwuid> if not provided)
email # author's email address
verbose # bool: print progress messages; defaults to 0
template # template set to use
postcmd # array ref of commands to execute after creating
install-templates # bool: just install the selected templates
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/MonM/Notifier/Store.pm view on Meta::CPAN
my $dda = DEFAULT_DBI_ATTR;
foreach (%$dda) {
$args{$_} //= $dda->{$_}
}
}
my $username = getlogin() || (getpwuid($>))[0] || $ENV{LOGNAME} || $ENV{USER} || "anonymous";
my $filename = sprintf(DB_FILENAME_NASK, $username);
my $file = $args{file} || File::Spec->catfile(File::Spec->tmpdir(), $filename);
my $dsn = $args{dsn} || sprintf(DEFAULT_DSN_MASK, $file);
# DB
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ChordPro/Config.pm view on Meta::CPAN
$cfg->{user}->{fullname} = ::runtimeinfo("short");
}
else {
$cfg->{user}->{name} =
lc( $ENV{USER} || $ENV{LOGNAME}
|| getlogin() || getpwuid($<) || "chordpro" );
$cfg->{user}->{fullname} = eval { (getpwuid($<))[6] } || "";
}
# Add some extra entries to prevent warnings.
for ( qw(title subtitle footer) ) {
next if exists($cfg->{pdf}->{formats}->{first}->{$_});
view all matches for this distribution