From: Graham Knop Date: Thu, 15 May 2014 12:37:58 +0000 (-0400) Subject: account for EUMM versions that require either an array or a scalar for the AUTHOR X-Git-Tag: v0.002000~23 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e076eedb6c05bcca5cd73056c5ed4b4def84c833;p=p5sagit%2FDistar.git account for EUMM versions that require either an array or a scalar for the AUTHOR --- diff --git a/lib/Distar.pm b/lib/Distar.pm index 42ae6fe..5d44b68 100644 --- a/lib/Distar.pm +++ b/lib/Distar.pm @@ -12,6 +12,8 @@ use File::Spec; our $VERSION = '0.001000'; $VERSION = eval $VERSION; +my $MM_VER = eval $ExtUtils::MakeMaker::VERSION; + our @EXPORT = qw( author manifest_include run_preflight ); @@ -22,7 +24,11 @@ sub import { shift->export_to_level(1,@_); } -sub author { our $Author = shift } +sub author { + our $Author = shift; + $Author = [ $Author ] + if !ref $Author; +} our $Ran_Preflight; @@ -118,7 +124,7 @@ sub run_preflight { return $class->SUPER::new({ LICENSE => 'perl', %$args, - AUTHOR => $Distar::Author, + AUTHOR => ($MM_VER >= 6.5702 ? $Distar::Author : $Distar::Author->[0]), ABSTRACT_FROM => $args->{VERSION_FROM}, test => { TESTS => ($args->{test}{TESTS}||'t/*.t').' xt/*.t xt/*/*.t' }, });