r32592 - in /trunk/libuniversal-require-perl: Changes META.yml Makefile.PL SIGNATURE debian/changelog debian/compat debian/control debian/copyright debian/rules 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:27:42 UTC 2009


Author: yvesago-guest
Date: Fri Apr  3 14:27:33 2009
New Revision: 32592

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=32592
Log:
  * New upstream release
  * Bump to Standards-Version: 3.8.1
  * Refresh rules to dh7
  * Fix copyright format

Modified:
    trunk/libuniversal-require-perl/Changes
    trunk/libuniversal-require-perl/META.yml
    trunk/libuniversal-require-perl/Makefile.PL
    trunk/libuniversal-require-perl/SIGNATURE
    trunk/libuniversal-require-perl/debian/changelog
    trunk/libuniversal-require-perl/debian/compat
    trunk/libuniversal-require-perl/debian/control
    trunk/libuniversal-require-perl/debian/copyright
    trunk/libuniversal-require-perl/debian/rules
    trunk/libuniversal-require-perl/lib/UNIVERSAL/require.pm
    trunk/libuniversal-require-perl/t/require.t

Modified: trunk/libuniversal-require-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libuniversal-require-perl/Changes?rev=32592&op=diff
==============================================================================
--- trunk/libuniversal-require-perl/Changes (original)
+++ trunk/libuniversal-require-perl/Changes Fri Apr  3 14:27:33 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: trunk/libuniversal-require-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libuniversal-require-perl/META.yml?rev=32592&op=diff
==============================================================================
--- trunk/libuniversal-require-perl/META.yml (original)
+++ trunk/libuniversal-require-perl/META.yml Fri Apr  3 14:27:33 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: trunk/libuniversal-require-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libuniversal-require-perl/Makefile.PL?rev=32592&op=diff
==============================================================================
--- trunk/libuniversal-require-perl/Makefile.PL (original)
+++ trunk/libuniversal-require-perl/Makefile.PL Fri Apr  3 14:27:33 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: trunk/libuniversal-require-perl/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libuniversal-require-perl/SIGNATURE?rev=32592&op=diff
==============================================================================
--- trunk/libuniversal-require-perl/SIGNATURE (original)
+++ trunk/libuniversal-require-perl/SIGNATURE Fri Apr  3 14:27:33 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: trunk/libuniversal-require-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libuniversal-require-perl/debian/changelog?rev=32592&op=diff
==============================================================================
--- trunk/libuniversal-require-perl/debian/changelog (original)
+++ trunk/libuniversal-require-perl/debian/changelog Fri Apr  3 14:27:33 2009
@@ -1,10 +1,17 @@
-libuniversal-require-perl (0.11-2) UNRELEASED; urgency=low
+libuniversal-require-perl (0.13-1) unstable; urgency=low
 
+  [ gregor herrmann ]
   * debian/control: Changed: Switched Vcs-Browser field to ViewSVN
     (source stanza).
   * debian/control: Added: ${misc:Depends} to Depends: field.
 
- -- gregor herrmann <gregoa at debian.org>  Sun, 16 Nov 2008 20:48:47 +0100
+  [ AGOSTINI Yves ]
+  * New upstream release
+  * Bump to Standards-Version: 3.8.1
+  * Refresh rules to dh7
+  * Fix copyright format
+
+ -- AGOSTINI Yves <agostini at univ-metz.fr>  Fri, 03 Apr 2009 16:17:57 +0200
 
 libuniversal-require-perl (0.11-1) unstable; urgency=low
 

Modified: trunk/libuniversal-require-perl/debian/compat
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libuniversal-require-perl/debian/compat?rev=32592&op=diff
==============================================================================
--- trunk/libuniversal-require-perl/debian/compat (original)
+++ trunk/libuniversal-require-perl/debian/compat Fri Apr  3 14:27:33 2009
@@ -1,1 +1,1 @@
-5
+7

Modified: trunk/libuniversal-require-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libuniversal-require-perl/debian/control?rev=32592&op=diff
==============================================================================
--- trunk/libuniversal-require-perl/debian/control (original)
+++ trunk/libuniversal-require-perl/debian/control Fri Apr  3 14:27:33 2009
@@ -1,12 +1,12 @@
 Source: libuniversal-require-perl
 Section: perl
 Priority: optional
-Build-Depends: debhelper (>= 5)
+Build-Depends: debhelper (>= 7)
 Build-Depends-Indep: perl (>= 5.6.0)
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Uploaders: AGOSTINI Yves <agostini at univ-metz.fr>,
  gregor herrmann <gregoa at debian.org>
-Standards-Version: 3.7.3
+Standards-Version: 3.8.1
 Homepage: http://search.cpan.org/dist/UNIVERSAL-Require/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libuniversal-require-perl/
 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libuniversal-require-perl/

Modified: trunk/libuniversal-require-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libuniversal-require-perl/debian/copyright?rev=32592&op=diff
==============================================================================
--- trunk/libuniversal-require-perl/debian/copyright (original)
+++ trunk/libuniversal-require-perl/debian/copyright Fri Apr  3 14:27:33 2009
@@ -1,32 +1,28 @@
-X-Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat
-X-Debianized-By: Stephen Quinney <sjq at debian.org>
-X-Debianized-Date: Mon, 07 Nov 2005 19:53:02 +0000
-X-Source-Downloaded-From: http://search.cpan.org/dist/UNIVERSAL-Require/
-X-Upstream-Author: Michael G Schwern <schwern at pobox.com>
+Format-Specification:
+    http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196
+Upstream-Maintainer: Michael G Schwern <schwern at pobox.com>
+Upstream-Source: http://search.cpan.org/dist/UNIVERSAL-require/
+Upstream-Name: UNIVERSAL-require
 
 Files: *
-Copyright: Copyright 2001, 2005 by Michael G Schwern <schwern at pobox.com>
-License: GPL-1+ | Artistic
- Copyright 2001, 2005 by Michael G Schwern <schwern at pobox.com>.
- .
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
- .
- a) the GNU General Public License as published by the Free Software
-    Foundation; either version 1, or (at your option) any later
-    version, or
- .
- b) the "Artistic License" which comes with Perl.
-
+Copyright: 2001, 2005 Michael G Schwern <schwern at pobox.com>
+License-Alias: Perl
+License: Artistic | GPL-1+
 
 Files: debian/*
-Copyright: Copyright 2005 Stephen Quinney <sjq at debian.org>
- Copyright 2008 Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
-License: GPL-1+ | Artistic
- The Debian packaging is put under the same terms as the module itself.
+Copyright: 2009, AGOSTINI Yves <agostini at univ-metz.fr>
+License: Artistic | GPL-1+
 
-Perl is distributed under your choice of the GNU General Public License or
-the Artistic License.  On Debian GNU/Linux systems, the complete text of the
-GNU General Public License can be found in `/usr/share/common-licenses/GPL'
-and the Artistic Licence in `/usr/share/common-licenses/Artistic'.
+License: Artistic
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Artistic License, which comes with Perl.
+    On Debian GNU/Linux systems, the complete text of the Artistic License
+    can be found in `/usr/share/common-licenses/Artistic'
 
+License: GPL-1+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 1, or (at your option)
+    any later version.
+    On Debian GNU/Linux systems, the complete text of the GNU General
+    Public License can be found in `/usr/share/common-licenses/GPL'

Modified: trunk/libuniversal-require-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libuniversal-require-perl/debian/rules?rev=32592&op=diff
==============================================================================
--- trunk/libuniversal-require-perl/debian/rules (original)
+++ trunk/libuniversal-require-perl/debian/rules Fri Apr  3 14:27:33 2009
@@ -1,60 +1,23 @@
 #!/usr/bin/make -f
-# This debian/rules file is provided as a template for normal perl
-# packages. It was created by Marc Brockschmidt <marc at dch-faq.de> for
-# the Debian Perl Group (http://pkg-perl.alioth.debian.org/) but may
-# be used freely wherever it is useful.
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-# If set to a true value then MakeMaker's prompt function will
-# always return the default without waiting for user input.
-export PERL_MM_USE_DEFAULT=1
-
-PERL   ?= /usr/bin/perl
-PACKAGE = $(shell dh_listpackages)
-TMP     = $(CURDIR)/debian/$(PACKAGE)
 
 build: build-stamp
 build-stamp:
-	dh_testdir
-	$(PERL) Makefile.PL INSTALLDIRS=vendor
-	$(MAKE)
-	$(MAKE) test
+	dh build
 	touch $@
 
 clean:
-	dh_testdir
-	dh_testroot
-	dh_clean build-stamp install-stamp
-	[ ! -f Makefile ] || $(MAKE) realclean
+	dh $@
 
 install: install-stamp
 install-stamp: build-stamp
-	dh_testdir
-	dh_testroot
-	dh_clean -k
-	$(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
-	[ ! -d $(TMP)/usr/lib/perl5 ] || \
-		rmdir --ignore-fail-on-non-empty --parents --verbose \
-		$(TMP)/usr/lib/perl5
+	dh install
 	touch $@
 
 binary-arch:
-# We have nothing to do here for an architecture-independent package
 
-binary-indep: build install
-	dh_testdir
-	dh_testroot
-	dh_installdocs
-	dh_installchangelogs Changes
-	dh_perl
-	dh_compress
-	dh_fixperms
-	dh_installdeb
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
+binary-indep: install
+	dh $@
 
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
+binary: binary-arch binary-indep
+
+.PHONY: binary binary-arch binary-indep install clean build

Modified: trunk/libuniversal-require-perl/lib/UNIVERSAL/require.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libuniversal-require-perl/lib/UNIVERSAL/require.pm?rev=32592&op=diff
==============================================================================
--- trunk/libuniversal-require-perl/lib/UNIVERSAL/require.pm (original)
+++ trunk/libuniversal-require-perl/lib/UNIVERSAL/require.pm Fri Apr  3 14:27:33 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: trunk/libuniversal-require-perl/t/require.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libuniversal-require-perl/t/require.t?rev=32592&op=diff
==============================================================================
--- trunk/libuniversal-require-perl/t/require.t (original)
+++ trunk/libuniversal-require-perl/t/require.t Fri Apr  3 14:27:33 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