smokeinabox
view release on metacpan or search on metacpan
cpansmokebox/bin/cpanp-boxed view on Meta::CPAN
$LIB_DIR = File::Spec->catdir( $FindBin::Bin, qw[.. lib] );
$BUNDLE_DIR = File::Spec->catdir( $FindBin::Bin, qw[.. inc bundle] );
### must set the PERL5LIB env var here as well, as some
### code in CPANPLUS resets it between iterations. So we
### have to set our 'final' perl5lib before loading any
### CPANPLUS code. The constants code is 'safe' but better
### safe than sorry. So duplicating the 'constants' behaviour
### of DOT_CPANPLUS
# use CPANPLUS::Internals::Constants;
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);
unshift @INC, $LIB_DIR, $BUNDLE_DIR;
### set it in the environment too, for when we shell out
### (like at 'perl makefile.pl' time.
$ENV{'PERL5LIB'} = join $Config{'path_sep'}, grep { defined }
cpansmokebox/bin/cpconf-boxed view on Meta::CPAN
$LIB_DIR = File::Spec->catdir( $FindBin::Bin, qw[.. lib] );
$BUNDLE_DIR = File::Spec->catdir( $FindBin::Bin, qw[.. inc bundle] );
### must set the PERL5LIB env var here as well, as some
### code in CPANPLUS resets it between iterations. So we
### have to set our 'final' perl5lib before loading any
### CPANPLUS code. The constants code is 'safe' but better
### safe than sorry. So duplicating the 'constants' behaviour
### of DOT_CPANPLUS
# use CPANPLUS::Internals::Constants;
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);
unshift @INC, $LIB_DIR, $BUNDLE_DIR;
### set it in the environment too, for when we shell out
### (like at 'perl makefile.pl' time.
$ENV{'PERL5LIB'} = join $Config{'path_sep'}, grep { defined }
cpansmokebox/bin/yactest-boxed view on Meta::CPAN
$LIB_DIR = File::Spec->catdir( $FindBin::Bin, qw[.. lib] );
$BUNDLE_DIR = File::Spec->catdir( $FindBin::Bin, qw[.. inc bundle] );
### must set the PERL5LIB env var here as well, as some
### code in CPANPLUS resets it between iterations. So we
### have to set our 'final' perl5lib before loading any
### CPANPLUS code. The constants code is 'safe' but better
### safe than sorry. So duplicating the 'constants' behaviour
### of DOT_CPANPLUS
# use CPANPLUS::Internals::Constants;
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);
unshift @INC, $LIB_DIR, $BUNDLE_DIR;
### set it in the environment too, for when we shell out
### (like at 'perl makefile.pl' time.
$ENV{'PERL5LIB'} = join $Config{'path_sep'}, grep { defined }
cpansmokebox/inc/bundle/Archive/Tar/Constant.pm view on Meta::CPAN
use constant BLOCK_SIZE => sub { my $n = int($_[0]/BLOCK); $n++ if $_[0] % BLOCK; $n * BLOCK };
use constant TAR_PAD => sub { my $x = shift || return; return "\0" x (BLOCK - ($x % BLOCK) ) };
use constant TAR_END => "\0" x BLOCK;
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) };
use constant STRIP_MODE => sub { shift() & 0777 };
use constant CHECK_SUM => " ";
use constant UNPACK => 'A100 A8 A8 A8 A12 A12 A8 A1 A100 A6 A2 A32 A32 A8 A8 A155 x12';
use constant PACK => 'a100 a8 a8 a8 a12 a12 A8 a1 a100 a6 a2 a32 a32 a8 a8 a155 x12';
cpansmokebox/inc/bundle/Test/Reporter.pm view on Meta::CPAN
}
# From Mail::Util 1.74 (c) 1995-2001 Graham Barr (c) 2002-2005 Mark Overmeer
sub _mailaddress {
my $self = shift;
warn __PACKAGE__, ": _mailaddress\n" if $self->debug();
my $mailaddress = $ENV{MAILADDRESS};
$mailaddress ||= $ENV{USER} ||
$ENV{LOGNAME} ||
eval {getpwuid($>)} ||
"postmaster";
$mailaddress .= '@' . $self->_maildomain() unless $mailaddress =~ /\@/;
$mailaddress =~ s/(^.*<|>.*$)//g;
my $realname = $self->_realname();
if ($realname) {
$mailaddress = "$mailaddress ($realname)";
}
return $mailaddress;
}
sub _realname {
my $self = shift;
warn __PACKAGE__, ": _realname\n" if $self->debug();
my $realname = '';
$realname =
eval {(split /,/, (getpwuid($>))[6])[0]} ||
$ENV{QMAILNAME} ||
$ENV{REALNAME} ||
$ENV{USER};
return $realname;
}
sub _is_a_perl_release {
my $self = shift;
warn __PACKAGE__, ": _is_a_perl_release\n" if $self->debug();
( run in 0.375 second using v1.01-cache-2.11-cpan-454fe037f31 )