Update to 0.04

- New upstream release 0.04
  - This module no longer installs an _implementation() subroutine in callers;
    instead, you can call Module::Implementation::implementation_for($package)
    to get the implementation used for a given package
- Update patch for building with old Test::More versions
This commit is contained in:
Paul Howarth 2012-02-09 12:00:25 +00:00
parent d407a789f3
commit f128b86e72
4 changed files with 179 additions and 172 deletions

View File

@ -1,168 +0,0 @@
diff -up Module-Implementation-0.03/t/basic.t.orig Module-Implementation-0.03/t/basic.t
--- Module-Implementation-0.03/t/basic.t.orig 2012-02-06 23:03:58.000000000 +0000
+++ Module-Implementation-0.03/t/basic.t 2012-02-07 10:04:29.846798279 +0000
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 5;
{
package T;
@@ -29,5 +29,3 @@ use Test::More 0.88;
is( T::return_42(), 42, 'T::return_42 work as expected' );
is( T::_implementation(), 'Impl1', 'T::_implementation returns default implementation' );
}
-
-done_testing();
diff -up Module-Implementation-0.03/t/both-fail.t.orig Module-Implementation-0.03/t/both-fail.t
--- Module-Implementation-0.03/t/both-fail.t.orig 2012-02-06 23:03:58.000000000 +0000
+++ Module-Implementation-0.03/t/both-fail.t 2012-02-07 10:04:29.875798277 +0000
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 1;
use Test::Fatal;
{
@@ -24,5 +24,3 @@ use Test::Fatal;
'Got an exception when all implementations fail to load'
);
}
-
-done_testing();
diff -up Module-Implementation-0.03/t/env-value.t.orig Module-Implementation-0.03/t/env-value.t
--- Module-Implementation-0.03/t/env-value.t.orig 2012-02-06 23:03:58.000000000 +0000
+++ Module-Implementation-0.03/t/env-value.t 2012-02-07 10:04:30.005798265 +0000
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 4;
{
package T;
@@ -31,5 +31,3 @@ use Test::More 0.88;
is( T::return_42(), 42, 'T::return_42 work as expected' );
is( T::_implementation(), 'Impl2', 'T::_implementation returns implementation set in ENV' );
}
-
-done_testing();
diff -up Module-Implementation-0.03/t/more-symbols.t.orig Module-Implementation-0.03/t/more-symbols.t
--- Module-Implementation-0.03/t/more-symbols.t.orig 2012-02-06 23:03:58.000000000 +0000
+++ Module-Implementation-0.03/t/more-symbols.t 2012-02-07 10:04:30.042798260 +0000
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 7;
{
package T;
@@ -43,5 +43,3 @@ use Test::More 0.88;
'%T::HASH was copied from implementation'
);
}
-
-done_testing();
diff -up Module-Implementation-0.03/t/one-impl-fails1.t.orig Module-Implementation-0.03/t/one-impl-fails1.t
--- Module-Implementation-0.03/t/one-impl-fails1.t.orig 2012-02-06 23:03:58.000000000 +0000
+++ Module-Implementation-0.03/t/one-impl-fails1.t 2012-02-07 10:04:30.042798260 +0000
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 2;
{
package T;
@@ -24,5 +24,3 @@ use Test::More 0.88;
ok( T->can('return_42'), 'T package has a return_42 sub' );
ok( !T->can('return_package'), 'T package has a return_package sub' );
}
-
-done_testing();
diff -up Module-Implementation-0.03/t/one-impl-fails2.t.orig Module-Implementation-0.03/t/one-impl-fails2.t
--- Module-Implementation-0.03/t/one-impl-fails2.t.orig 2012-02-06 23:03:58.000000000 +0000
+++ Module-Implementation-0.03/t/one-impl-fails2.t 2012-02-07 10:04:30.043798260 +0000
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 2;
{
package T;
@@ -24,5 +24,3 @@ use Test::More 0.88;
ok( T->can('return_42'), 'T package has a return_42 sub' );
ok( !T->can('return_package'), 'T package has a return_package sub' );
}
-
-done_testing();
diff -up Module-Implementation-0.03/t/release-cpan-changes.t.orig Module-Implementation-0.03/t/release-cpan-changes.t
--- Module-Implementation-0.03/t/release-cpan-changes.t.orig 2012-02-06 23:03:58.000000000 +0000
+++ Module-Implementation-0.03/t/release-cpan-changes.t 2012-02-07 10:07:00.466837268 +0000
@@ -1,15 +1,11 @@
#!perl
+use Test::More;
+
BEGIN {
- unless ($ENV{RELEASE_TESTING}) {
- require Test::More;
- Test::More::plan(skip_all => 'these tests are for release candidate testing');
- }
+ plan skip_all => 'these tests are for release candidate testing' unless ($ENV{RELEASE_TESTING});
+ eval 'use Test::CPAN::Changes';
+ plan skip_all => 'Test::CPAN::Changes required for this test' if $@;
}
-
-use Test::More;
-eval 'use Test::CPAN::Changes';
-plan skip_all => 'Test::CPAN::Changes required for this test' if $@;
changes_ok();
-done_testing();
diff -up Module-Implementation-0.03/t/requested-fails.t.orig Module-Implementation-0.03/t/requested-fails.t
--- Module-Implementation-0.03/t/requested-fails.t.orig 2012-02-06 23:03:58.000000000 +0000
+++ Module-Implementation-0.03/t/requested-fails.t 2012-02-07 10:04:30.043798260 +0000
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 1;
use Test::Fatal;
{
@@ -26,5 +26,3 @@ use Test::Fatal;
'Got an exception when implementation requested in env value fails to load'
);
}
-
-done_testing();
diff -up Module-Implementation-0.03/t/taint.t.orig Module-Implementation-0.03/t/taint.t
--- Module-Implementation-0.03/t/taint.t.orig 2012-02-06 23:03:58.000000000 +0000
+++ Module-Implementation-0.03/t/taint.t 2012-02-07 10:04:30.043798260 +0000
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 3;
use Test::Fatal;
use Test::Taint;
@@ -35,5 +35,3 @@ taint_checking_ok();
{
is( T::_implementation(), 'Impl2', 'T::_implementation returns implementation set in ENV' );
}
-
-done_testing();

View File

@ -0,0 +1,168 @@
diff -up Module-Implementation-0.04/t/basic.t.orig Module-Implementation-0.04/t/basic.t
--- Module-Implementation-0.04/t/basic.t.orig 2012-02-08 19:43:09.000000000 +0000
+++ Module-Implementation-0.04/t/basic.t 2012-02-09 10:22:08.974938764 +0000
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 5;
{
package T;
@@ -33,5 +33,3 @@ use Test::More 0.88;
'T::_implementation returns default implementation'
);
}
-
-done_testing();
diff -up Module-Implementation-0.04/t/both-fail.t.orig Module-Implementation-0.04/t/both-fail.t
--- Module-Implementation-0.04/t/both-fail.t.orig 2012-02-08 19:43:09.000000000 +0000
+++ Module-Implementation-0.04/t/both-fail.t 2012-02-09 10:20:58.979107010 +0000
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 1;
use Test::Fatal;
{
@@ -24,5 +24,3 @@ use Test::Fatal;
'Got an exception when all implementations fail to load'
);
}
-
-done_testing();
diff -up Module-Implementation-0.04/t/env-value.t.orig Module-Implementation-0.04/t/env-value.t
--- Module-Implementation-0.04/t/env-value.t.orig 2012-02-08 19:43:09.000000000 +0000
+++ Module-Implementation-0.04/t/env-value.t 2012-02-09 10:22:22.078917410 +0000
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 4;
{
package T;
@@ -35,5 +35,3 @@ use Test::More 0.88;
'T::_implementation returns implementation set in ENV'
);
}
-
-done_testing();
diff -up Module-Implementation-0.04/t/more-symbols.t.orig Module-Implementation-0.04/t/more-symbols.t
--- Module-Implementation-0.04/t/more-symbols.t.orig 2012-02-08 19:43:09.000000000 +0000
+++ Module-Implementation-0.04/t/more-symbols.t 2012-02-09 10:20:58.980107009 +0000
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 7;
{
package T;
@@ -43,5 +43,3 @@ use Test::More 0.88;
'%T::HASH was copied from implementation'
);
}
-
-done_testing();
diff -up Module-Implementation-0.04/t/one-impl-fails1.t.orig Module-Implementation-0.04/t/one-impl-fails1.t
--- Module-Implementation-0.04/t/one-impl-fails1.t.orig 2012-02-08 19:43:09.000000000 +0000
+++ Module-Implementation-0.04/t/one-impl-fails1.t 2012-02-09 10:20:58.980107009 +0000
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 2;
{
package T;
@@ -24,5 +24,3 @@ use Test::More 0.88;
ok( T->can('return_42'), 'T package has a return_42 sub' );
ok( !T->can('return_package'), 'T package has a return_package sub' );
}
-
-done_testing();
diff -up Module-Implementation-0.04/t/one-impl-fails2.t.orig Module-Implementation-0.04/t/one-impl-fails2.t
--- Module-Implementation-0.04/t/one-impl-fails2.t.orig 2012-02-08 19:43:09.000000000 +0000
+++ Module-Implementation-0.04/t/one-impl-fails2.t 2012-02-09 10:20:58.980107009 +0000
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 2;
{
package T;
@@ -24,5 +24,3 @@ use Test::More 0.88;
ok( T->can('return_42'), 'T package has a return_42 sub' );
ok( !T->can('return_package'), 'T package has a return_package sub' );
}
-
-done_testing();
diff -up Module-Implementation-0.04/t/release-cpan-changes.t.orig Module-Implementation-0.04/t/release-cpan-changes.t
--- Module-Implementation-0.04/t/release-cpan-changes.t.orig 2012-02-08 19:43:09.000000000 +0000
+++ Module-Implementation-0.04/t/release-cpan-changes.t 2012-02-09 10:20:58.980107009 +0000
@@ -1,15 +1,11 @@
#!perl
+use Test::More;
+
BEGIN {
- unless ($ENV{RELEASE_TESTING}) {
- require Test::More;
- Test::More::plan(skip_all => 'these tests are for release candidate testing');
- }
+ plan skip_all => 'these tests are for release candidate testing' unless ($ENV{RELEASE_TESTING});
+ eval 'use Test::CPAN::Changes';
+ plan skip_all => 'Test::CPAN::Changes required for this test' if $@;
}
-
-use Test::More;
-eval 'use Test::CPAN::Changes';
-plan skip_all => 'Test::CPAN::Changes required for this test' if $@;
changes_ok();
-done_testing();
diff -up Module-Implementation-0.04/t/requested-fails.t.orig Module-Implementation-0.04/t/requested-fails.t
--- Module-Implementation-0.04/t/requested-fails.t.orig 2012-02-08 19:43:09.000000000 +0000
+++ Module-Implementation-0.04/t/requested-fails.t 2012-02-09 10:20:58.980107009 +0000
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 1;
use Test::Fatal;
{
@@ -26,5 +26,3 @@ use Test::Fatal;
'Got an exception when implementation requested in env value fails to load'
);
}
-
-done_testing();
diff -up Module-Implementation-0.04/t/taint.t.orig Module-Implementation-0.04/t/taint.t
--- Module-Implementation-0.04/t/taint.t.orig 2012-02-08 19:43:09.000000000 +0000
+++ Module-Implementation-0.04/t/taint.t 2012-02-09 10:22:36.326894194 +0000
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 3;
use Test::Fatal;
use Test::Taint;
@@ -39,5 +39,3 @@ taint_checking_ok();
'T::_implementation returns implementation set in ENV'
);
}
-
-done_testing();

View File

@ -8,14 +8,14 @@
#TODO: BR: Test::Pod::LinkCheck when available
Name: perl-Module-Implementation
Version: 0.03
Release: 3%{?dist}
Version: 0.04
Release: 1%{?dist}
Summary: Loads one of several alternate underlying implementations for a module
Group: Development/Libraries
License: Artistic 2.0
URL: http://search.cpan.org/dist/perl-Module-Implementation/
Source0: http://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/Module-Implementation-%{version}.tar.gz
Patch1: Module-Implementation-0.03-old-Test::More.patch
Patch1: Module-Implementation-0.04-old-Test::More.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
BuildArch: noarch
# ===================================================================
@ -96,6 +96,13 @@ rm -rf %{buildroot}
%{_mandir}/man3/Module::Implementation.3pm*
%changelog
* Thu Feb 9 2012 Paul Howarth <paul@city-fan.org> - 0.04-1
- Update to 0.04
- This module no longer installs an _implementation() subroutine in callers;
instead, you can call Module::Implementation::implementation_for($package)
to get the implementation used for a given package
- Update patch for building with old Test::More versions
* Wed Feb 8 2012 Paul Howarth <paul@city-fan.org> - 0.03-3
- Incorporate feedback from package review (#788258)
- Correct License tag, which should be Artistic 2.0

View File

@ -1 +1 @@
0698d0874f518260265be2d49fe869b1 Module-Implementation-0.03.tar.gz
b9d92c4f2a4507a6a4002926259f2ed8 Module-Implementation-0.04.tar.gz