From: Peter Rabbitson Date: Tue, 1 Dec 2015 22:43:39 +0000 (+0100) Subject: (travis) Fix version check on non-module-named dists (lapse from a223f7584) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6a0bca69f7397d8267d26b341d3192fd0a38dbda;p=dbsrgits%2FDBIx-Class.git (travis) Fix version check on non-module-named dists (lapse from a223f7584) --- diff --git a/maint/travis-ci_scripts/common.bash b/maint/travis-ci_scripts/common.bash index f9d8b4a..a630a86 100755 --- a/maint/travis-ci_scripts/common.bash +++ b/maint/travis-ci_scripts/common.bash @@ -216,6 +216,7 @@ my $eval_map = { # this is temporary, will need something more robust down the road # (perhaps by then Module::CoreList will be dep-free) "Module::Build" => { ver => "0.4214" }, + "podlators" => { mod => "Pod::Man", ver => "2.17" }, "File::Spec" => { ver => "3.47" }, "Cwd" => { ver => "3.47" }, @@ -225,17 +226,15 @@ my $eval_map = { "Scalar::List::Utils" => { mod => "List::Util", ver => "1.42" }, }; -eval( - "require " - - . +my $m = $eval_map->{$mod}{mod} || $mod; - ( $eval_map->{$mod}{mod} || $mod ) +eval( + "require $m" . ($eval_map->{$mod}{ver} - ? "; $mod->VERSION(\$eval_map->{\$mod}{ver}) " + ? "; $m->VERSION(\$eval_map->{\$mod}{ver}) " : "" )