Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

do not use old download install on upgrading (#3)

  • Loading branch information...
commit 564f3837009bc399cf6d400800e8a08fe060eba0 1 parent 67484a5
Graham Ollis authored
Showing with 11 additions and 2 deletions.
  1. +5 −0 inc/My/ModuleBuild.pm
  2. +6 −2 lib/Alien/MSYS.pm
5 inc/My/ModuleBuild.pm
View
@@ -18,6 +18,11 @@ sub ACTION_build
require lib;
lib->import('lib');
require Alien::MSYS;
+ # TODO: this means on a re-install we have to re-download
+ # if it has been a long time since the last version, this may
+ # not be a bad thing. If we end up having lots of revisions
+ # this could be highly annoying.
+ do { no warnings 'redefine'; *Alien::MSYS::_my_dist_dir = sub {} };
defined Alien::MSYS::msys_path();
};
8 lib/Alien/MSYS.pm
View
@@ -175,12 +175,16 @@ sub msys_path ()
return $path unless $@;
- # TODO: if they reinstall the Alien::MSYS dist to a different directory, this may break
- my $dir = eval { File::Spec->catdir(dist_dir('Alien-MSYS'), qw( msys 1.0 bin )) };
+ my $dir = _my_dist_dir();
return $dir if defined $dir && -d $dir;
return undef;
}
+sub _my_dist_dir
+{
+ eval { File::Spec->catdir(dist_dir('Alien-MSYS'), qw( msys 1.0 bin )) };
+}
+
1;
Please sign in to comment.
Something went wrong with that request. Please try again.