diff options
author | Jos I. Boumans <jos@dwim.org> | 2009-02-07 14:32:56 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-02-07 14:32:56 +0100 |
commit | 26f467e271edd98e360d6fde88d670d7a659f513 (patch) | |
tree | 471bf2b1b805bbb626124ac4298608b8ec3b41db /lib/Module | |
parent | c05a5c573cc9b234dbef1f036d8f00afa0f3144a (diff) | |
download | perl-26f467e271edd98e360d6fde88d670d7a659f513.tar.gz |
Update Module::Load to 0.16
This is a mere test-suite tweak to work around a bug in perl 5.8.[45],
but submitted to keep CPAN & core in sync.
Diffstat (limited to 'lib/Module')
-rw-r--r-- | lib/Module/Load.pm | 2 | ||||
-rw-r--r-- | lib/Module/Load/t/to_load/TestModule.pm | 14 |
2 files changed, 14 insertions, 2 deletions
diff --git a/lib/Module/Load.pm b/lib/Module/Load.pm index 20119559d7..08f64b2b2c 100644 --- a/lib/Module/Load.pm +++ b/lib/Module/Load.pm @@ -1,6 +1,6 @@ package Module::Load; -$VERSION = '0.14'; +$VERSION = '0.16'; use strict; use File::Spec (); diff --git a/lib/Module/Load/t/to_load/TestModule.pm b/lib/Module/Load/t/to_load/TestModule.pm index bc18a030de..ffc5ec98f5 100644 --- a/lib/Module/Load/t/to_load/TestModule.pm +++ b/lib/Module/Load/t/to_load/TestModule.pm @@ -9,7 +9,19 @@ use vars qw(@EXPORT @EXPORT_OK @ISA $IMPORTED); @EXPORT_OK = qw(func1); ### test if import gets called properly -sub import { $IMPORTED = 1; goto &Exporter::import; } +sub import { $IMPORTED = 1; + ### this breaks on 5.8.[45] which have a bug with goto's losing + ### arguments in @_. This is the cause of the 0.14 tester failures + ### under 5.8.[45]. The bug is NOT in exporter, but core perl: + ### http://testers.cpan.org/show/Module-Load.html + #goto &Exporter::import; + + ### instead, use the undocumented, but widely used $ExportLevel + ### which will make sure we pass all arguments, and even works + ### on buggy 5.8.[45] + do { local $Exporter::ExportLevel += 1; Exporter::import(@_) } + } + sub imported { $IMPORTED; } sub func1 { return "func1"; } |