view release on metacpan or search on metacpan
lib/Log/Log4perl/Appender/SMTP.pm view on Meta::CPAN
sub new {
my($class, @options) = @_;
my $hname = hostfqdn() || '<unknown>';
my $user = getlogin || getpwuid($<) || 'log4perl';
return bless {
from => $user.'@'.$hname,
to => 'postmaster',
subject => "Subject: Log4perl from $hname\n",
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Log/ProgramInfo.pm view on Meta::CPAN
BEGIN {
$progbase = $FindBin::Script;
$starttime = DateTime->from_epoch(epoch => time);
$valid_dates{$_} = 1 for qw( date time datetime none );
$uid = getpwuid $<;
my $euid = getpwuid $>;
$gid = groupmap $(;
my $egid = groupmap $);
$uid = "$euid($uid)" if $uid ne $euid;
$gid = "$egid // $gid" if $egid ne $gid;
view all matches for this distribution
view release on metacpan or search on metacpan
devel/bin/smoke.pl view on Meta::CPAN
my $config = {
src => canonpath( catdir( $FindBin::Bin, '../../' ) ),
verbose => 0,
email_to => undef,
email_from => getpwuid($<) . '@' . hostname(),
email_subject => 'Lucy Smoke Test Report ' . localtime(),
mailhost => 'localhost',
test_target => 'test', # could also be 'test_valgrind' if on Linux
};
view all matches for this distribution
view release on metacpan or search on metacpan
SoundFont.pm view on Meta::CPAN
return %sf;
}
sub new_sf { my $inam = $_[$[] || 'Name of this SoundFont';
my ($name,$passwd,$uid,$gid, $quota,$comment,$gcos,$dir,$shell,$expire)
= getpwuid($>);
$gcos =~ s/,+$//;
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;
my $y = sprintf ("%4.4d", $year+1900);
my @abbr = qw( January February March April May June
July August September October November December );
view all matches for this distribution
view release on metacpan or search on metacpan
bin/scripts/moby-s-caching.pl view on Meta::CPAN
sub check_root {
# assume that windows has no security preventing the copying of files
return if (MSWIN);
unless ( getpwuid($<) eq 'root' ) {
print STDOUT <<EOT;
Hmmm - you are not running this as root. If you indicate any
system directories for the installation, such as '/usr/local/apache/', then
you may not have permission to install files there. If so, you should
view all matches for this distribution
view release on metacpan or search on metacpan
bin/fetch_pods.PLS view on Meta::CPAN
1;
}
sub find_config_file {
my $self = shift;
my $home = (getpwuid($<))[7] || $ENV{HOME};
my @paths = ("$home/.fetchpods",
"/usr/local/etc/fetchpods.conf",
"/usr/etc/fetchpods.conf",
"/etc/fetchpods.conf",
"$Bin/../etc/fetchpods.conf",
bin/fetch_pods.PLS view on Meta::CPAN
}
sub interpolate {
my $ref = shift;
return unless defined $ref;
$ref =~ s/^~([^\/]*)/($1 ? getpwnam($1):getpwuid($<))[7] || "~$1"/eg;
$ref =~ s/\$(\w+)/$ENV{$1}/g;
$ref;
}
__END__
view all matches for this distribution
view release on metacpan or search on metacpan
examples/request-reply/request_permdyn.pl view on Meta::CPAN
#
# The dynamic queue name contains the userid. For real applications,
# you'd use an application instance specific name, whether that's the
# host, the product, the tarde engine, or whatever.
#
my $userid = ($^O =~ /^MSWin/ ? $ENV{USERNAME} : getpwuid($<));
my $reply_qname = $dynamic_qname;
$reply_qname =~ s/\.\*$/.\U$userid/;
print "Have dynamic reply queue name [$reply_qname]\n";
my $reply_queue = MQSeries::Queue::->
view all matches for this distribution
view release on metacpan or search on metacpan
lib/MYDan/Agent/Query.pm view on Meta::CPAN
my ( $code, $sudo, $env ) = @$query{ qw( code sudo env ) };
idie( "already running $code\n" ) if ( $code =~ /\.mx$/ ) && !
MYDan::Util::ProcLock->new( File::Spec->join( $path{run}, $code ) )->lock();
if ( $code ne 'proxy' && ! $< && $sudo && $sudo ne ( getpwuid $< )[0] )
{
idie( "invalid sudo $sudo\n" ) unless my @pw = getpwnam $sudo;
@pw = map { 0 + sprintf '%d', $_ } @pw[2,3];
POSIX::setgid( $pw[1] ); ## setgid must preceed setuid
POSIX::setuid( $pw[0] );
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
my $dpath = $Dst . $k;
unless ($opt_n){
copyattrib($spath, $dpath, $mode, $uid, $gid, $atime, $mtime);
$opt_v and do_log(sprintf "0%04o,%s,%s $dpath", ($mode & 07777),
(getpwuid($uid))[0],(getgrgid($gid))[0] );
}
}
if ($opt_r >= 2){
# these are to make DB operation fast enough
view all matches for this distribution
view release on metacpan or search on metacpan
0.04 2015-09-01T07:17:52+0200
- Fix "Calling a synchronous function on an asynchronous handle"
Cannot change $db into async mode if already in sync mode
0.03 2015-07-12T11:36:05+0200
- Fix "The getpwuid function is unimplemented"
0.02 2015-04-22T08:27:17+0200
- More robust live database tests
0.01 2015-04-20T20:44:10+0200
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/Mail/Audit.pm view on Meta::CPAN
'Maildir'
);
$default_mbox =
(-d File::Spec->catdir($default_maildir, 'new') ? $default_maildir : ())
|| ((grep { -d $_ } qw(/var/spool/mail/ /var/mail/))[0] . getpwuid($>));
return $self->{_default_mbox} = $default_mbox;
}
# XXX: This is a test case until I have a better interface. This will make
view all matches for this distribution
view release on metacpan or search on metacpan
%options,
};
# Guess the 'from' address
if(! exists $self->{from}) {
my $user = scalar getpwuid($<);
my $domain = domain();
$self->{from} = "$user\@$domain";
}
# Guess the 'date'
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Mail/Decency/ContentFilter/CRM114.pm view on Meta::CPAN
my ( $user, $domain ) = split( /@/, $self->to, 2 );
return unless $user;
my $uid = getpwnam( $user );
return unless $uid;
$user = ( getpwuid( $uid ) )[-2];
$user .= "/.crm114";
return $user;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Mail/LocalDelivery.pm view on Meta::CPAN
} else {
croak
"Data was neither a mail object or a reference to something I understand";
}
my $default_maildir = ((getpwuid($>))[7]) . "/Maildir/";
my $default_mbox = $ENV{MAIL}
|| (-d File::Spec->catdir($default_maildir, 'new') ? $default_maildir : ())
|| ((grep { -d $_ } qw(/var/spool/mail/ /var/mail/))[0] . getpwuid($>));
$self->{default_mbox} = $default_mbox;
$self->{emergency} ||= $default_mbox;
return bless $self => $class;
lib/Mail/LocalDelivery.pm view on Meta::CPAN
POSIX->import(qw(strftime));
@out = map { strftime($_, @localtime) } @out;
}
@out = map {
s{^~/} {((getpwuid($>))[7])."/"}e;
s{^~(\w+)/}{((getpwnam($1))[7])."/"}e;
$_
} @out;
return @out;
view all matches for this distribution
view release on metacpan or search on metacpan
examples/filter.pl view on Meta::CPAN
use 5.005;
my $TMPDIR = $ENV{TMPDIR} || $ENV{TEMP} || '/usr/tmp';
# The default mailbox for delivery.
my $default = "/var/spool/mail/".getpwuid($>);
# A pattern to break out words in email names.
my $wordpat = qr/[-a-zA-Z0-9_.]+/;
my $wordpat_nodot = qr/[-a-zA-Z0-9_]+/;
view all matches for this distribution
view release on metacpan or search on metacpan
? delete $mail_ref->{'_html_info'} : {};
delete $mail_ref->{'_html_info'} if exists $mail_ref->{'_html_info'};
delete $html_info->{$_} for qw(ctype disposition msg);
my $time = time;
my $user = $^O eq 'MSWin32' ? "(Windows: $<)" : getpwuid($<);
my $eusr = $^O eq 'MSWin32' ? "(Windows: $>)" : getpwuid($>);
my $file = File::Spec->rel2abs($0);
my $host = $hostname_code->();
my @siteheaders = (
qq{X-Mailer: use SimpleMood; - Sent via the email() function or easy() method of Mail/Sender/Easy.pm and/or SimpleMood.pm both by Daniel Muey.},
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Mail/Sender.pm view on Meta::CPAN
{
my $username;
sub getusername () {
return $username if defined($username);
return $username = eval { getlogin || getpwuid($<) } || $ENV{USERNAME};
}
}
#IO
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Mail/SpamAssassin.pm view on Meta::CPAN
# Make sure that we clean $PATH if we're tainted
Mail::SpamAssassin::Util::clean_path_in_taint_mode();
if (!defined $self->{username}) {
$self->{username} = (Mail::SpamAssassin::Util::portable_getpwuid ($>))[0];
}
$self->create_locker();
$self;
lib/Mail/SpamAssassin.pm view on Meta::CPAN
my $home;
if (am_running_on_windows()) {
# Windows has a special folder for common appdata (Bug 8050)
$home = Mail::SpamAssassin::Util::common_application_data_directory();
} else {
$home = (Mail::SpamAssassin::Util::portable_getpwuid ($>))[7];
}
if ($home && $home ne $helper_dir) {
my $dir = File::Spec->catdir($home, ".spamassassin");
return if $self->test_global_state_dir($dir);
}
lib/Mail/SpamAssassin.pm view on Meta::CPAN
return '';
} else {
return $home if ($home && index($home, '/') != -1);
return (getpwnam($name))[7] if ($name ne '');
return (getpwuid($>))[7];
}
}
sub sed_path {
my ($self, $path) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Mail/SpamCannibal/SMTPsend.pm view on Meta::CPAN
sub sendmessage {
my ($message,$to,$from,$fh) = @_;
$to .= '@' . fqdn()
unless $to =~ /\@/;
unless ($from) {
$from = (getpwuid($<))[0] .'@'. fqdn();
} elsif( $from !~ /\@/) {
$from .= '@' . fqdn();
}
my $head = 'To: '. $to ."\nFrom: ". $from ."\n";
my @mxhosts = getMXhosts($to);
view all matches for this distribution
view release on metacpan or search on metacpan
bin/dspam-train view on Meta::CPAN
my $Usage = "Usage: $myname [spam|ok] [file]\n";
# Check one or more arguments:
die $Usage if ($#ARGV < 0);
my $HOME = $ENV{'HOME'} || $ENV{'LOGDIR'} ||
(getpwuid($<))[7] || die "You're homeless!\n";
my $USER = $ENV{'USER'} || getlogin ||
(getpwuid($<))[0] || die "You're nameless!\n";
my $opts = "--user $USER --mode=teft --stdout";
my $V = 0;
if (@ARGV && $ARGV[0] eq "-v") {
view all matches for this distribution
view release on metacpan or search on metacpan
bin/toaster_migrate.pl view on Meta::CPAN
}
sub _check_my_cnf
{
my ($homedir) = (getpwuid ($<))[7];
unless ( $util->is_readable( "$homedir/.my.cnf" ) )
{
print "\nHey bubba, I need to connect to your MySQL server as the root or vpopmail user. To facilitate this, I expect a configured ~/.my.cnf file. This file format is the same as the mysql client uses and properly configured might look like this:
view all matches for this distribution
view release on metacpan or search on metacpan
examples/xmailfolder.pl view on Meta::CPAN
sub get_tmpdir { return $ENV{TMPDIR} || '/tmp'; }
sub get_username {
my $username;
$username = $ENV{USER} || $ENV{LOGNAME} || (getpwuid($>))[6];
unless (defined($username)) {
croak("can't determine user name!");
exit 1;
}
return $username;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Mail/Internet.pm view on Meta::CPAN
$head->delete('Received');
$head->replace('X-Mailer', "Perl5 Mail::Internet v".$Mail::Internet::VERSION)
unless $head->count('X-Mailer');
my $name = eval {local $SIG{__DIE__}; (getpwuid($>))[6]} || $ENV{NAME} ||"";
while($name =~ s/\([^\(\)]*\)//) { 1; }
if($name =~ /[^\w\s]/)
{ $name =~ s/"/\"/g;
view all matches for this distribution
view release on metacpan or search on metacpan
t/dbdpg_test_setup.pl view on Meta::CPAN
## Likely candidates for running this
my @userlist = (qw/postgres postgresql pgsql _postgres/);
## Start with whoever owns this file, unless it's us
my $username = getpwuid ((stat($0))[4]);
unshift @userlist, $username if defined $username and $username ne getpwent;
my %doneuser;
for (@userlist) {
$testuser = $_;
view all matches for this distribution
view release on metacpan or search on metacpan
pperl/Marpa/R2/Perl.pm view on Meta::CPAN
'getprotobyname' => 'UNIOP',
'getprotobynumber' => 'UNIOP',
'getprotoent' => 'FUNC0',
'getpwent' => 'FUNC0',
'getpwnam' => 'UNIOP',
'getpwuid' => 'UNIOP',
'getservbyname' => 'LSTOP',
'getservbyport' => 'LSTOP',
'getservent' => 'FUNC0',
'getsockname' => 'UNIOP',
'getsockopt' => 'LSTOP',
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