X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2Flocal-lib.git;a=blobdiff_plain;f=lib%2Flocal%2Flib.pm;h=a436a71f1805753d38710ab24523603c9678539f;hp=6b1f5f9c00080343fbd9f1e7877c98ecb489b021;hb=8c6c886f4a496c6dac84f8ada7de7e72dc9d2cef;hpb=fe03358f442f762eb8872cbb9ede5b4380493c72 diff --git a/lib/local/lib.pm b/lib/local/lib.pm index 6b1f5f9..a436a71 100644 --- a/lib/local/lib.pm +++ b/lib/local/lib.pm @@ -157,11 +157,8 @@ sub resolve_home_path { my ($user) = ($path =~ /^~([^\/]+)/); # can assume ^~ so undef for 'us' my $tried_file_homedir; my $homedir = do { - if ( - eval { require File::HomeDir } - # Use CPAN::Version if available as it deals correctly with dev releases - && (eval { require CPAN::Version; } ? CPAN::Version->vgt($File::HomeDir::VERSION, 0.65) : $File::HomeDir::VERSION >= 0.65 - )) { + no warnings 'numeric'; # Disable warning caused by version comparison with dev releases.. + if (eval { require File::HomeDir } && $File::HomeDir::VERSION >= 0.65) { $tried_file_homedir = 1; if (defined $user) { File::HomeDir->users_home($user);