From: t0m Date: Fri, 16 Oct 2009 02:06:29 +0000 (+0000) Subject: Simpler. Technically less correct, but who cares. X-Git-Tag: 1.006009~56 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8c6c886f4a496c6dac84f8ada7de7e72dc9d2cef;p=p5sagit%2Flocal-lib.git Simpler. Technically less correct, but who cares. git-svn-id: http://dev.catalyst.perl.org/repos/bast/local-lib/1.000/trunk@7790 bd8105ee-0ff8-0310-8827-fb3f25b6796d --- diff --git a/Changes b/Changes index 83d846e..84bde13 100644 --- a/Changes +++ b/Changes @@ -1,7 +1,6 @@ Revision history for local::lib - - Use CPAN::Version (if available) to do version comparison for loading - File::HomeDir is it works more correctly with development releases + - Suppress warning if a File::HomeDir dev release is installed. 1.004008 2009-10-13 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);