git-svn-id: http://dev.catalyst.perl.org/repos/bast/local-lib/1.000/trunk@7789
bd8105ee-0ff8-0310-8827-fb3f25b6796d
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
+
1.004008 2009-10-13
- Clarify re-reading the shell config file after writing to it.
my ($user) = ($path =~ /^~([^\/]+)/); # can assume ^~ so undef for 'us'
my $tried_file_homedir;
my $homedir = do {
- if (eval { require File::HomeDir } && $File::HomeDir::VERSION >= 0.65) {
+ 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
+ )) {
$tried_file_homedir = 1;
if (defined $user) {
File::HomeDir->users_home($user);