App-short
view release on metacpan or search on metacpan
lib/App/short.pm view on Meta::CPAN
sub _get_my_home_dir {
if ($^O eq 'Win32') {
# File::HomeDir always uses exists($ENV{x}) first, does it want to avoid
# accidentally creating env vars?
return $ENV{HOME} if $ENV{HOME};
return $ENV{USERPROFILE} if $ENV{USERPROFILE};
return join($ENV{HOMEDRIVE}, "\\", $ENV{HOMEPATH})
if $ENV{HOMEDRIVE} && $ENV{HOMEPATH};
} else {
return $ENV{HOME} if $ENV{HOME};
my @pw = getpwuid($>);
return $pw[7] if @pw;
}
undef;
}
sub _common_args {
my $args = shift;
my %res;
for (keys %common_args) {
$res{$_} = $args->{$_} if exists $args->{$_};
( run in 0.279 second using v1.01-cache-2.11-cpan-8d75d55dd25 )