X-Git-Url: http://git.home-dn.net/?p=manu%2FRT-Extension-WatchedQueues.git;a=blobdiff_plain;f=inc%2FModule%2FInstall.pm;fp=inc%2FModule%2FInstall.pm;h=eb449caa8d1fba86e01140c92b2bee98d5889183;hp=052cf1e712d3b0c217856315d67ce3b61df9105f;hb=48e8f74ef6190566955be7a09524b449e936680d;hpb=e1833069d86f0e670e7a4be1cd04a5daa97b2d92 diff --git a/inc/Module/Install.pm b/inc/Module/Install.pm index 052cf1e..eb449ca 100644 --- a/inc/Module/Install.pm +++ b/inc/Module/Install.pm @@ -30,7 +30,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.72'; + $VERSION = '0.77'; *inc::Module::Install::VERSION = *VERSION; @inc::Module::Install::ISA = __PACKAGE__; @@ -85,7 +85,7 @@ END_DIE # Build.PL was formerly supported, but no longer is due to excessive # difficulty in implementing every single feature twice. -if ( $0 =~ /Build.PL$/i or -f 'Build.PL' ) { die <<"END_DIE" } +if ( $0 =~ /Build.PL$/i ) { die <<"END_DIE" } Module::Install no longer supports Build.PL. @@ -125,8 +125,10 @@ sub autoload { goto &$code unless $cwd eq $pwd; } $$sym =~ /([^:]+)$/ or die "Cannot autoload $who - $sym"; - unshift @_, ( $self, $1 ); - goto &{$self->can('call')} unless uc($1) eq $1; + unless ( uc($1) eq $1 ) { + unshift @_, ( $self, $1 ); + goto &{$self->can('call')}; + } }; } @@ -339,7 +341,10 @@ sub _write { close FH or die "close($_[0]): $!"; } -sub _version { +# _version is for processing module versions (eg, 1.03_05) not +# Perl versions (eg, 5.8.1). + +sub _version ($) { my $s = shift || 0; $s =~ s/^(\d+)\.?//; my $l = $1 || 0; @@ -348,6 +353,17 @@ sub _version { return $l + 0; } +# Cloned from Params::Util::_CLASS +sub _CLASS ($) { + ( + defined $_[0] + and + ! ref $_[0] + and + $_[0] =~ m/^[^\W\d]\w*(?:::\w+)*$/s + ) ? $_[0] : undef; +} + 1; # Copyright 2008 Adam Kennedy.