Hello community,

here is the log from the commit of package perl-UNIVERSAL-require for 
openSUSE:Factory checked in at 2012-02-14 13:09:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-UNIVERSAL-require (Old)
 and      /work/SRC/openSUSE:Factory/.perl-UNIVERSAL-require.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-UNIVERSAL-require", Maintainer is "[email protected]"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/perl-UNIVERSAL-require/perl-UNIVERSAL-require.changes
    2011-09-23 12:39:22.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-UNIVERSAL-require.new/perl-UNIVERSAL-require.changes
       2012-02-14 13:09:43.000000000 +0100
@@ -1,0 +2,12 @@
+Fri Feb 10 12:25:27 UTC 2012 - [email protected]
+
+- update to 0.13
+   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]
+   Test Fixes
+   * bleadperl introduced a new warning deprecating "use UNIVERSAL"
+     (thank goodness) which interfered with t/require.t
+
+-------------------------------------------------------------------

Old:
----
  UNIVERSAL-require-0.11.tar.gz

New:
----
  UNIVERSAL-require-0.13.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-UNIVERSAL-require.spec ++++++
--- /var/tmp/diff_new_pack.LMs2xs/_old  2012-02-14 13:09:46.000000000 +0100
+++ /var/tmp/diff_new_pack.LMs2xs/_new  2012-02-14 13:09:46.000000000 +0100
@@ -1,7 +1,7 @@
 #
-# spec file for package perl-UNIVERSAL-require (Version 0.11)
+# spec file for package perl-UNIVERSAL-require
 #
-# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,47 +16,54 @@
 #
 
 
-
 Name:           perl-UNIVERSAL-require
-Version:        0.11
-Release:        79
-%define modname UNIVERSAL-require
-License:        Artistic ; GPLv2
+Version:        0.13
+Release:        0
+%define cpan_name UNIVERSAL-require
+Summary:        require() modules from a variable
+License:        Artistic-1.0 or GPL-1.0+
 Group:          Development/Libraries/Perl
+Url:            http://search.cpan.org/dist/UNIVERSAL-require/
+Source:         
http://www.cpan.org/authors/id/M/MS/MSCHWERN/%{cpan_name}-%{version}.tar.gz
+BuildArch:      noarch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-Summary:        UNIVERSAL::require - require() modules from a variable
-Source:         
http://search.cpan.org/CPAN/authors/id/M/MS/MSCHWERN/UNIVERSAL-require-0.11.tar.gz
 BuildRequires:  perl
 BuildRequires:  perl-macros
-Url:            http://search.cpan.org/~mschwern/
+#BuildRequires: perl(UNIVERSAL::require)
 %{perl_requires}
 
 %description
-UNIVERSAL::require - require() modules from a variable
+If you've ever had to do this...
+
+    eval "require $module";
+
+to get around the bareword caveats on require(), this module is for you. It
+creates a universal require() class method that will work with every Perl
+module and its secure. So instead of doing some arcane eval() work, you can
+do this:
+
+    $module->require;
+
+It doesn't save you much typing, but it'll make alot more sense to someone
+who's not a ninth level Perl acolyte.
 
 %prep
-%setup -q -n %{modname}-%{version}
+%setup -q -n %{cpan_name}-%{version}
 
 %build
-perl Makefile.PL OPTIMIZE="$RPM_OPT_FLAGS -Wall"
-make %{?_smp_mflags}
+%{__perl} Makefile.PL INSTALLDIRS=vendor
+%{__make} %{?_smp_mflags}
 
 %check
-make test
+%{__make} test
 
 %install
 %perl_make_install
 %perl_process_packlist
+%perl_gen_filelist
 
-%clean
-rm -rf %{buildroot}
-
-%files
-%defattr(-, root, root)
-%dir %{perl_vendorlib}/UNIVERSAL/
-%{perl_vendorlib}/UNIVERSAL/require.pm
-%dir %{perl_vendorarch}/auto/UNIVERSAL/
-%{perl_vendorarch}/auto/UNIVERSAL/require/
-%{_mandir}/man3/UNIVERSAL::require.3pm*
+%files -f %{name}.files
+%defattr(-,root,root,755)
+%doc Changes
 
 %changelog

++++++ UNIVERSAL-require-0.11.tar.gz -> UNIVERSAL-require-0.13.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/UNIVERSAL-require-0.11/Changes 
new/UNIVERSAL-require-0.13/Changes
--- old/UNIVERSAL-require-0.11/Changes  2006-11-12 01:18:35.000000000 +0100
+++ new/UNIVERSAL-require-0.13/Changes  2009-03-30 18:50:22.000000000 +0200
@@ -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]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/UNIVERSAL-require-0.11/META.yml 
new/UNIVERSAL-require-0.13/META.yml
--- old/UNIVERSAL-require-0.11/META.yml 2006-11-12 01:20:07.000000000 +0100
+++ new/UNIVERSAL-require-0.13/META.yml 2009-03-30 18:51:18.000000000 +0200
@@ -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 <[email protected]>
+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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/UNIVERSAL-require-0.11/Makefile.PL 
new/UNIVERSAL-require-0.13/Makefile.PL
--- old/UNIVERSAL-require-0.11/Makefile.PL      2006-10-13 23:59:46.000000000 
+0200
+++ new/UNIVERSAL-require-0.13/Makefile.PL      2009-03-30 14:00:43.000000000 
+0200
@@ -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 <[email protected]>',
+
+    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"]
+        },
+    }))
 );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/UNIVERSAL-require-0.11/SIGNATURE 
new/UNIVERSAL-require-0.13/SIGNATURE
--- old/UNIVERSAL-require-0.11/SIGNATURE        2006-11-12 01:20:12.000000000 
+0100
+++ new/UNIVERSAL-require-0.13/SIGNATURE        2009-03-30 18:51:25.000000000 
+0200
@@ -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-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/UNIVERSAL-require-0.11/lib/UNIVERSAL/require.pm 
new/UNIVERSAL-require-0.13/lib/UNIVERSAL/require.pm
--- old/UNIVERSAL-require-0.11/lib/UNIVERSAL/require.pm 2006-11-12 
01:18:35.000000000 +0100
+++ new/UNIVERSAL-require-0.13/lib/UNIVERSAL/require.pm 2009-03-30 
18:50:51.000000000 +0200
@@ -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;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/UNIVERSAL-require-0.11/t/require.t 
new/UNIVERSAL-require-0.13/t/require.t
--- old/UNIVERSAL-require-0.11/t/require.t      2006-11-12 01:13:03.000000000 
+0100
+++ new/UNIVERSAL-require-0.13/t/require.t      2009-03-30 18:46:41.000000000 
+0200
@@ -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 ' );
+}
+
+
+

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to