From 83b32788f4e2799bb5cea7654fbc616d32f09598 Mon Sep 17 00:00:00 2001 From: Chris 'BinGOs' Williams Date: Mon, 1 Aug 2011 20:17:54 +0100 Subject: [PATCH] Update Module-Load to version 0.20 [DELTA] Changes for 0.20 Mon Aug 1 19:13:44 2011 ============================================ * Resolve [rt #69886] reported by Laurent Dami, trailing '::' silently ignored --- Porting/Maintainers.pl | 2 +- cpan/Module-Load/lib/Module/Load.pm | 21 +++++++++++---------- pod/perldelta.pod | 4 ++++ 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 5ef5521..d5a77b5 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -1262,7 +1262,7 @@ use File::Glob qw(:case); 'Module::Load' => { 'MAINTAINER' => 'kane', - 'DISTRIBUTION' => 'BINGOS/Module-Load-0.18.tar.gz', + 'DISTRIBUTION' => 'BINGOS/Module-Load-0.20.tar.gz', 'FILES' => q[cpan/Module-Load], 'UPSTREAM' => 'cpan', }, diff --git a/cpan/Module-Load/lib/Module/Load.pm b/cpan/Module-Load/lib/Module/Load.pm index d1269da..7087b5e 100644 --- a/cpan/Module-Load/lib/Module/Load.pm +++ b/cpan/Module-Load/lib/Module/Load.pm @@ -1,6 +1,6 @@ package Module::Load; -$VERSION = '0.18'; +$VERSION = '0.20'; use strict; use File::Spec (); @@ -30,8 +30,8 @@ sub load (*;@) { die $err if $err; } } - - ### This addresses #41883: Module::Load cannot import + + ### This addresses #41883: Module::Load cannot import ### non-Exporter module. ->import() routines weren't ### properly called when load() was used. { no strict 'refs'; @@ -47,7 +47,8 @@ sub _to_file{ local $_ = shift; my $pm = shift || ''; - my @parts = split /::/; + ## trailing blanks ignored by default. [rt #69886] + my @parts = split /::/, $_, -1; ### because of [perl #19213], see caveats ### my $file = $^O eq 'MSWin32' @@ -55,7 +56,7 @@ sub _to_file{ : File::Spec->catfile( @parts ); $file .= '.pm' if $pm; - + ### on perl's before 5.10 (5.9.5@31746) if you require ### a file in VMS format, it's stored in %INC in VMS ### format. Therefor, better unixify it first @@ -95,15 +96,15 @@ Module::Load - runtime require of both modules and files load Data::Dumper; # loads that module load 'Data::Dumper'; # ditto load $module # tritto - + my $script = 'some/script.pl' load $script; load 'some/script.pl'; # use quotes because of punctuations - + load thing; # try 'thing' first, then 'thing.pm' load CGI, ':standard' # like 'use CGI qw[:standard]' - + =head1 DESCRIPTION @@ -174,8 +175,8 @@ This module by Jos Boumans Ekane@cpan.orgE. =head1 COPYRIGHT -This library is free software; you may redistribute and/or modify it +This library is free software; you may redistribute and/or modify it under the same terms as Perl itself. -=cut +=cut diff --git a/pod/perldelta.pod b/pod/perldelta.pod index a2a491e..88119dc 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -134,6 +134,10 @@ Also fixes some minor bugs. [rt.cpan.org #68585] [rt.cpan.org #67893] =item * +L has been upgraded from version 0.18 to version 0.20 + +=item * + L has been upgraded from version 0.28 to version 0.30 =item * -- 2.7.4