X-Git-Url: http://erislabs.net/gitweb/?p=libwww-opensearch-perl.git;a=blobdiff_plain;f=inc%2FModule%2FInstall.pm;h=4ecf46b9e867fa98f05ac33da794de5d45df4c95;hp=5871e1e1b2842b34cdf57f264ca74fb9fcb1cc10;hb=e021488790d05654b6a8f5e13896b29aad7da610;hpb=70fa825da53bce7cee2d56a3a9d3cbeb2b4c7076 diff --git a/inc/Module/Install.pm b/inc/Module/Install.pm index 5871e1e..4ecf46b 100644 --- a/inc/Module/Install.pm +++ b/inc/Module/Install.pm @@ -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.