Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shorten the homedir logic, removing the need for File::HomeDir #589

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion App-cpanminus/META.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"Archive::Tar" : "0",
"Archive::Zip" : "0",
"Compress::Zlib" : "0",
"File::HomeDir" : "0",
"LWP::UserAgent" : "5.802",
"Module::Signature" : "0"
},
Expand Down
1 change: 0 additions & 1 deletion App-cpanminus/cpanfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ on develop => sub {
recommends 'Archive::Tar';
recommends 'Archive::Zip';
recommends 'Compress::Zlib';
recommends 'File::HomeDir';
recommends 'LWP::UserAgent', '5.802';
recommends 'Module::Signature';
};
1 change: 0 additions & 1 deletion App-cpanminus/fatpack-build/cpanfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ requires 'version';
suggests 'LWP::UserAgent', '5.802';
suggests 'Archive::Tar';
suggests 'Archive::Zip';
suggests 'File::HomeDir';
suggests 'Module::Signature';
suggests 'Digest::SHA';

Expand Down
8 changes: 4 additions & 4 deletions Menlo-Legacy/lib/Menlo/CLI/Compat.pm
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ sub qs($) {
sub determine_home {
my $class = shift;

my $homedir = $ENV{HOME}
|| eval { require File::HomeDir; File::HomeDir->my_home }
|| join('', @ENV{qw(HOMEDRIVE HOMEPATH)}); # Win32
my $homedir = $^O eq 'MSWin32' && "$]" < 5.016
? $ENV{HOME} || $ENV{USERPROFILE}
: (<~>)[0];

if (WIN32) {
if (WIN32 and not $homedir) {
require Win32; # no fatpack
$homedir = Win32::GetShortPathName($homedir);
}
Expand Down
1 change: 0 additions & 1 deletion Menlo/META.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
"Archive::Tar" : "0",
"Archive::Zip" : "0",
"Digest::SHA" : "0",
"File::HomeDir" : "0",
"LWP::UserAgent" : "5.802",
"Module::Signature" : "0"
}
Expand Down
1 change: 0 additions & 1 deletion Menlo/cpanfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ requires 'version';
suggests 'LWP::UserAgent', '5.802';
suggests 'Archive::Tar';
suggests 'Archive::Zip';
suggests 'File::HomeDir';
suggests 'Module::Signature';
suggests 'Digest::SHA';

Expand Down