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
return sprintf("%s %s %d %d %s"
, $dow[(localtime)[6]]
, $mon[(localtime)[4]]
, (localtime)[3]
, 1900 + (localtime)[5]
, sprintf("%s\@%s", (getpwuid($<))[0], hostname())
);
}
sub trim {
map { $_ ||= ""; s/^\s+//; s/\s+$//; } @_;
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/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
view release on metacpan or search on metacpan
lib/CallBackery/GuiPlugin/Abstract.pm view on Meta::CPAN
return $mt;
};
has homeDir => sub {
[getpwuid $>]->[7];
};
sub renderTemplate{
my $self = shift;
my $template = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Captive/Portal/Role/Utils.pm view on Meta::CPAN
########
# resolve user to username and/or uid
my ( $uname, $uid );
if ( $user =~ m/^\d+$/ ) {
$uname = getpwuid($user);
$uid = $user;
}
else {
$uid = getpwnam($user);
$uname = $user;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Carrot/Productivity/Text/Placeholder/Miniplate/OS/Unix/File/Properties.pm view on Meta::CPAN
# /effect ""
# //parameters
# //returns
# ?
{
return((getpwuid($_[THIS][ATR_STAT][RDX_STAT_UID]))[RDX_GETPW_NAME]);
}
sub syp_file_group_id
# /type method
# /effect ""
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Helper.pm view on Meta::CPAN
? '#!/usr/bin/env perl'
: "#!$Config{perlpath}";
$self->{scriptgen } = $Catalyst::Devel::CATALYST_SCRIPT_GEN;
$self->{catalyst_version} = $Catalyst::VERSION;
$self->{author } ||= $ENV{'AUTHOR'}
|| eval { @{ [ getpwuid($<) ] }[6] }
|| 'Catalyst developer';
my $gen_scripts = ( $self->{makefile} ) ? 0 : 1;
my $gen_makefile = ( $self->{scripts} ) ? 0 : 1;
my $gen_app = ( $self->{scripts} || $self->{makefile} ) ? 0 : 1;
lib/Catalyst/Helper.pm view on Meta::CPAN
sub mk_component {
my $self = shift;
my $app = shift;
$self->{app} = $app;
$self->{author} = $self->{author} = $ENV{'AUTHOR'}
|| eval { @{ [ getpwuid($<) ] }[6] }
|| 'A clever guy';
$self->{base} ||= dir( $FindBin::Bin, '..' );
unless ( $_[0] =~ /^(?:model|view|controller)$/i ) {
my $helper = shift;
my @args = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Helper/InitScript/FreeBSD.pm view on Meta::CPAN
# vars
my $vars = {
app => lc($helper->{app}) || die,
base => $helper->{base},
user => getpwuid($UID) || "",
group => getgrgid($GID) || "",
nproc => 4,
use_socket => 1,
};
$vars->{pidfile} = "/var/run/$vars->{app}.pid";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CfgTie/TieShadow.pm view on Meta::CPAN
{
my ($self,$id) = @_;
if (exists $CfgTie::TieShadow_rec'by_id{$id}) {return 1;}
# Get the information from the system and store it for later
my @x = getpwuid $id;
if (! scalar @x) {return 0;}
tie %{$CfgTie::TieShadow_rec'by_name{$x[0]}}, 'CfgTie::TieShadow_rec',@x;
$CfgTie::TieShadow_rec'by_id{$id} = $CfgTie::TieShadow_rec'by_name{$x[0]};
return 1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Chandra/Pack.pm view on Meta::CPAN
}
sub _config_file {
my $home = $ENV{HOME};
if (!$home && $^O ne 'MSWin32') {
$home = (getpwuid($<))[7];
}
$home ||= $ENV{USERPROFILE} || '.';
return file_join($home, '.chandra', 'pack.conf');
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Earabic.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/Ebig5hkscs.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 ! Ebig5hkscs::d($home)) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Ebig5plus.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 ! Ebig5plus::d($home)) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Ecyrillic.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/Eeucjp.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/Eeuctw.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/Egb18030.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 ! Egb18030::d($home)) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Egbk.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 ! Egbk::d($home)) {
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/Ehp15.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 ! Ehp15::d($home)) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Ehebrew.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/Einformixv6als.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 ! Einformixv6als::d($home)) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Ejis8.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