r32590 - in /branches/upstream/libuniversal-require-perl/current: Changes META.yml Makefile.PL SIGNATURE lib/UNIVERSAL/require.pm t/require.t
yvesago-guest at users.alioth.debian.org
yvesago-guest at users.alioth.debian.org
Fri Apr 3 14:15:24 UTC 2009
Author: yvesago-guest
Date: Fri Apr 3 14:15:13 2009
New Revision: 32590
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=32590
Log:
[svn-upgrade] Integrating new upstream version, libuniversal-require-perl (0.13)
Modified:
branches/upstream/libuniversal-require-perl/current/Changes
branches/upstream/libuniversal-require-perl/current/META.yml
branches/upstream/libuniversal-require-perl/current/Makefile.PL
branches/upstream/libuniversal-require-perl/current/SIGNATURE
branches/upstream/libuniversal-require-perl/current/lib/UNIVERSAL/require.pm
branches/upstream/libuniversal-require-perl/current/t/require.t
Modified: branches/upstream/libuniversal-require-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libuniversal-require-perl/current/Changes?rev=32590&op=diff
==============================================================================
--- branches/upstream/libuniversal-require-perl/current/Changes (original)
+++ branches/upstream/libuniversal-require-perl/current/Changes Fri Apr 3 14:15:13 2009
@@ -1,3 +1,14 @@
+0.13 Mon Mar 30 17:50:10 BST 2009
+ Bug Fixes
+ * $module->require now always resets $@ which removes a trap of using $@
+ to indicate an error, rather than checking $module->require directly.
+ [rt.cpan.org 44444]
+
+0.12 Mon Mar 30 10:53:51 BST 2009
+ Test Fixes
+ * bleadperl introduced a new warning deprecating "use UNIVERSAL"
+ (thank goodness) which interfered with t/require.t
+
0.11 Sat Nov 11 18:13:20 CST 2006
* Sped up require() by about 400% for already loaded modules.
[rt.cpan.org 21141]
Modified: branches/upstream/libuniversal-require-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libuniversal-require-perl/current/META.yml?rev=32590&op=diff
==============================================================================
--- branches/upstream/libuniversal-require-perl/current/META.yml (original)
+++ branches/upstream/libuniversal-require-perl/current/META.yml Fri Apr 3 14:15:13 2009
@@ -1,12 +1,28 @@
--- #YAML:1.0
-name: UNIVERSAL-require
-version: 0.11
-abstract: ~
-license: perl
-generated_by: ExtUtils::MakeMaker version 6.31
-distribution_type: module
-requires:
- Test::More: 0.47
+name: UNIVERSAL-require
+version: 0.13
+abstract: require() modules from a variable
+author:
+ - Michael G Schwern <schwern at pobox.com>
+license: perl
+distribution_type: module
+configure_requires:
+ ExtUtils::MakeMaker: 0
+build_requires:
+ ExtUtils::MakeMaker: 0
+requires:
+ Test::More: 0.47
+resources:
+ bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=UNIVERSAL-require
+ license: http://dev.perl.org/licenses/
+ repository: http://svn.schwern.org/repos/CPAN/UNIVERSAL-require/trunk/
+no_index:
+ directory:
+ - t
+ - inc
+ package:
+ - UNIVERSAL
+generated_by: ExtUtils::MakeMaker version 6.50
meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.2.html
- version: 1.2
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
Modified: branches/upstream/libuniversal-require-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libuniversal-require-perl/current/Makefile.PL?rev=32590&op=diff
==============================================================================
--- branches/upstream/libuniversal-require-perl/current/Makefile.PL (original)
+++ branches/upstream/libuniversal-require-perl/current/Makefile.PL Fri Apr 3 14:15:13 2009
@@ -6,9 +6,34 @@
my $version_from = "lib/$name.pm";
$version_from =~ s{::}{/}g;
+my $mm_ver = $ExtUtils::MakeMaker::VERSION;
+if ($mm_ver =~ /_/) { # dev version
+ $mm_ver = eval $mm_ver;
+ die $@ if $@;
+}
+
WriteMakefile(
- NAME => 'UNIVERSAL::require',
- VERSION_FROM => $version_from,
- LICENSE => 'perl',
- PREREQ_PM => { Test::More => 0.47 },
+ NAME => 'UNIVERSAL::require',
+
+ VERSION_FROM => $version_from,
+ ABSTRACT_FROM => $version_from,
+ AUTHOR => 'Michael G Schwern <schwern at pobox.com>',
+
+ PREREQ_PM => {
+ Test::More => 0.47
+ },
+
+ ($mm_ver >= 6.31 ? (LICENSE => 'perl') : ()),
+
+ ($mm_ver <= 6.45 ? () : (META_MERGE => {
+ resources => {
+ license => 'http://dev.perl.org/licenses/',
+ bugtracker => 'http://rt.cpan.org/Public/Dist/Display.html?Name=UNIVERSAL-require',
+ repository => 'http://svn.schwern.org/repos/CPAN/UNIVERSAL-require/trunk/',
+ },
+
+ no_index => {
+ package => ["UNIVERSAL"]
+ },
+ }))
);
Modified: branches/upstream/libuniversal-require-perl/current/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libuniversal-require-perl/current/SIGNATURE?rev=32590&op=diff
==============================================================================
--- branches/upstream/libuniversal-require-perl/current/SIGNATURE (original)
+++ branches/upstream/libuniversal-require-perl/current/SIGNATURE Fri Apr 3 14:15:13 2009
@@ -14,19 +14,19 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-SHA1 f69d537b2403ebf7ec06290a66d0a57075136bdd Changes
+SHA1 e97479924f58486141140a275443ee7247d9a1dc Changes
SHA1 9715d81055567a1011e6f6b12feb609bb0578e9c MANIFEST
-SHA1 17697baead576a0fff6a6fb93be7db4c3e6659ca META.yml
-SHA1 61f2d71422f14821a3fa7dd8a27816dec69be7ac Makefile.PL
-SHA1 099f3ed5bd88692e986dc6342853fab9e28c1f5c lib/UNIVERSAL/require.pm
+SHA1 60041a48fab8015a6cbf12282cdac8ede6c1a319 META.yml
+SHA1 7147bcde8579ac7ae7254a7024002aed03d4709e Makefile.PL
+SHA1 85616118c1daddaa67fc6e711e20a565ec729cf1 lib/UNIVERSAL/require.pm
SHA1 d61d5af638badb57470992348c30648786868987 t/Dummy.pm
-SHA1 8f645199e54c04363fe2fa1be22df1c32d741ab7 t/require.t
+SHA1 50c8013e1005b5589263fe913cfccfcfcdf89959 t/require.t
SHA1 55c5a15b4033df55d7393a3056d6da7efe1c1538 t/taint.t
SHA1 4a169deefc6417d1ab2e5465f7d8d63205bf895b t/use.t
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.5 (Darwin)
+Version: GnuPG v1.4.9 (Darwin)
-iD8DBQFFVmi8WMohlhD1QycRAp8DAKDJTpAmdKWSiHda1nH9MI6Uh+5O6wCfYKoL
-IJlfBIXR07ek1Et9e/051io=
-=qq2M
+iEYEARECAAYFAknQ+IYACgkQWMohlhD1QyejIACePwsMwvSy+Dxb1hGc/iEWzfYc
+CB8An18g51qb1kyJ8SrPxvuktvMuAYrf
+=R5dK
-----END PGP SIGNATURE-----
Modified: branches/upstream/libuniversal-require-perl/current/lib/UNIVERSAL/require.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libuniversal-require-perl/current/lib/UNIVERSAL/require.pm?rev=32590&op=diff
==============================================================================
--- branches/upstream/libuniversal-require-perl/current/lib/UNIVERSAL/require.pm (original)
+++ branches/upstream/libuniversal-require-perl/current/lib/UNIVERSAL/require.pm Fri Apr 3 14:15:13 2009
@@ -1,5 +1,5 @@
package UNIVERSAL::require;
-$UNIVERSAL::require::VERSION = '0.11';
+$UNIVERSAL::require::VERSION = '0.13';
# We do this because UNIVERSAL.pm uses CORE::require(). We're going
# to put our own require() into UNIVERSAL and that makes an ambiguity.
@@ -17,7 +17,7 @@
=head1 NAME
- UNIVERSAL::require - require() modules from a variable
+UNIVERSAL::require - require() modules from a variable
=head1 SYNOPSIS
@@ -86,7 +86,8 @@
# For performance reasons, check if its already been loaded. This makes
# things about 4 times faster.
- return 1 if $INC{$file};
+ # We use the eval { } to make sure $@ is not set. See RT #44444 for details
+ return eval { 1 } if $INC{$file};
my $return = eval qq{
#line $call_line "$call_file"
@@ -94,7 +95,7 @@
};
# Check for module load failure.
- if( $@ ) {
+ if( !$return ) {
$UNIVERSAL::require::ERROR = $@;
return $return;
}
@@ -104,14 +105,12 @@
eval qq{
#line $call_line "$call_file"
\$module->VERSION($want_version);
-};
-
- if( $@ ) {
+1;
+} or do {
$UNIVERSAL::require::ERROR = $@;
return 0;
- }
+ };
}
-
return $return;
}
@@ -147,12 +146,11 @@
package $call_package;
#line $call_line "$call_file"
\$module->import(\@imports);
-};
-
- if( $@ ) {
+1;
+} or do {
$UNIVERSAL::require::ERROR = $@;
return 0;
- }
+ };
return $return;
}
Modified: branches/upstream/libuniversal-require-perl/current/t/require.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libuniversal-require-perl/current/t/require.t?rev=32590&op=diff
==============================================================================
--- branches/upstream/libuniversal-require-perl/current/t/require.t (original)
+++ branches/upstream/libuniversal-require-perl/current/t/require.t Fri Apr 3 14:15:13 2009
@@ -1,6 +1,6 @@
#!/usr/bin/perl -Tw
-use Test::More tests => 11;
+use Test::More tests => 16;
use_ok "UNIVERSAL::require";
use lib qw(t);
@@ -26,11 +26,29 @@
{
my $warning = '';
local $SIG{__WARN__} = sub { $warning = join '', @_ };
- eval 'use UNIVERSAL';
- is( $warning, '', 'use UNIVERSAL doesnt interfere' );
+ eval 'require UNIVERSAL';
+ is( $warning, '', 'loading UNIVERSAL doesnt interfere' );
}
my $evil = "Dummy; Test::More::fail('this should never be called');";
ok !$evil->require;
isnt $@, '';
+
+# make sure $@ and ERROR are set appropriately
+{
+ local $@;
+ ok( !$@, '$@ unset' );
+
+ # do a failed eval a before we try to load Dummy again
+ eval { die $$ };
+ like( $@, qr/$$/, ' $@ set to ' . $$ );
+
+ ok( Dummy->require, " ->require()" );
+ ok( !$@, ' $@ unset ' . $@ );
+ ok( !$UNIVERSAL::require::ERROR,
+ ' $ERROR unset ' );
+}
+
+
+
More information about the Pkg-perl-cvs-commits
mailing list