Imported Upstream version 0.17
[libwww-opensearch-perl.git] / inc / Module / Install.pm
index 5871e1e..4ecf46b 100644 (file)
@@ -22,7 +22,6 @@ use strict 'vars';
 use Cwd        ();
 use File::Find ();
 use File::Path ();
-use FindBin;
 
 use vars qw{$VERSION $MAIN};
 BEGIN {
@@ -32,7 +31,7 @@ BEGIN {
        # This is not enforced yet, but will be some time in the next few
        # releases once we can make sure it won't clash with custom
        # Module::Install extensions.
-       $VERSION = '0.97';
+       $VERSION = '1.06';
 
        # Storage for the pseudo-singleton
        $MAIN    = undef;
@@ -231,7 +230,12 @@ sub preload {
 sub new {
        my ($class, %args) = @_;
 
-       FindBin->again;
+       delete $INC{'FindBin.pm'};
+       {
+               # to suppress the redefine warning
+               local $SIG{__WARN__} = sub {};
+               require FindBin;
+       }
 
        # ignore the prefix on extension modules built from top level.
        my $base_path = Cwd::abs_path($FindBin::Bin);
@@ -447,7 +451,7 @@ sub _version ($) {
 }
 
 sub _cmp ($$) {
-       _version($_[0]) <=> _version($_[1]);
+       _version($_[1]) <=> _version($_[2]);
 }
 
 # Cloned from Params::Util::_CLASS
@@ -463,4 +467,4 @@ sub _CLASS ($) {
 
 1;
 
-# Copyright 2008 - 2010 Adam Kennedy.
+# Copyright 2008 - 2012 Adam Kennedy.