diff options
author | Chris 'BinGOs' Williams <chris@bingosnet.co.uk> | 2013-09-01 11:45:24 +0100 |
---|---|---|
committer | Chris 'BinGOs' Williams <chris@bingosnet.co.uk> | 2013-09-01 11:46:44 +0100 |
commit | 6c52f6c9a260e34e5fe12222a09c91d217628a9f (patch) | |
tree | 25eeb5d1fe180fe2f04102aaa35f9f3b4ea470c4 /cpan | |
parent | 2ef12107cecdf4077410a083797114ab9bbc043c (diff) | |
download | perl-6c52f6c9a260e34e5fe12222a09c91d217628a9f.tar.gz |
Update Module-Load-Conditional to CPAN version 0.58
[DELTA]
Changes for 0.58 Sun Sep 1 11:21:59 BST 2013
=================================================
* RT#83728 make quoting work portably and remove
prototypes from one-liner in requires()
Diffstat (limited to 'cpan')
-rw-r--r-- | cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm b/cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm index a94906c9b7..c890df04cd 100644 --- a/cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm +++ b/cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm @@ -13,14 +13,16 @@ use version; use Module::Metadata (); -use constant ON_VMS => $^O eq 'VMS'; +use constant ON_VMS => $^O eq 'VMS'; +use constant ON_WIN32 => $^O eq 'MSWin32' ? 1 : 0; +use constant QUOTE => do { ON_WIN32 ? q["] : q['] }; BEGIN { use vars qw[ $VERSION @ISA $VERBOSE $CACHE @EXPORT_OK $DEPRECATED $FIND_VERSION $ERROR $CHECK_INC_HASH]; use Exporter; @ISA = qw[Exporter]; - $VERSION = '0.56'; + $VERSION = '0.58'; $VERBOSE = 0; $DEPRECATED = 0; $FIND_VERSION = 1; @@ -495,8 +497,8 @@ sub requires { } my $lib = join " ", map { qq["-I$_"] } @INC; - my $oneliner = 'sub foo(_){q[BONG=].shift} print(join(qq[\n],map foo,keys(%INC)),qq[\n])'; - my $cmd = qq["$^X" $lib -M$who -e"$oneliner"]; + my $oneliner = 'print(join(qq[\n],map{qq[BONG=$_]}keys(%INC)),qq[\n])'; + my $cmd = join '', qq["$^X" $lib -M$who -e], QUOTE, $oneliner, QUOTE; return sort grep { !/^$who$/ } |