Update to 0.11

- New upstream release 0.11:
  - Don't accept package names that start with a digit
  - Rewrite some of the guts to use Module::Runtime rather than reimplementing
    its functionality
- BR: perl(Module::Runtime) ≥ 0.009
- Drop all support for older distributions as required module
  Module::Runtime ≥ 0.009 will not be available prior to F-16
epel9
Paul Howarth 13 years ago
parent 2cc49aa748
commit bf9aac4dbf

@ -1,25 +0,0 @@
--- Class-Load-0.08/t/release-pod-coverage.t.orig 2011-08-16 11:31:42.095025148 +0100
+++ Class-Load-0.08/t/release-pod-coverage.t 2011-08-16 12:34:11.961313546 +0100
@@ -5,6 +5,11 @@
require Test::More;
Test::More::plan(skip_all => 'these tests are for release candidate testing');
}
+ eval "use Test::Pod::Coverage 1.04;";
+ if ($@) {
+ require Test::More;
+ Test::More::plan(skip_all => 'Test::Pod::Coverage 1.04 is required for this test');
+ }
}
@@ -13,10 +18,6 @@
use Test::More tests => 1;
-use Test::Requires {
- 'Test::Pod::Coverage' => '1.04',
-};
-
my @modules = 'Class::Load';
my %trustme;

@ -1,13 +0,0 @@
--- Class-Load/t/release-pod-spell.t
+++ Class-Load/t/release-pod-spell.t
@@ -40,7 +40,10 @@
UTC
ascii
attribute's
+behaviour
+blog
distro
+fallback
filename
inline
multipart

@ -1,224 +0,0 @@
diff -up Class-Load-0.09/t/000-load.t.orig Class-Load-0.09/t/000-load.t
--- Class-Load-0.09/t/000-load.t.orig 2011-09-06 05:24:45.000000000 +0100
+++ Class-Load-0.09/t/000-load.t 2011-09-06 09:10:45.486039066 +0100
@@ -1,12 +1,10 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 1;
use lib 't/lib';
use_ok 'Test::Class::Load';
diag('Using ' . Class::Load->_implementation() . ' implementation' );
-
-done_testing;
diff -up Class-Load-0.09/t/001-is-class-loaded.t.orig Class-Load-0.09/t/001-is-class-loaded.t
--- Class-Load-0.09/t/001-is-class-loaded.t.orig 2011-09-06 05:24:45.000000000 +0100
+++ Class-Load-0.09/t/001-is-class-loaded.t 2011-09-06 09:10:45.492039052 +0100
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 18;
use version;
@@ -105,5 +105,3 @@ ok(!is_class_loaded('Class::Load::Versio
'Class::Load::VersionCheck has been loaded but the version check failed');
ok(is_class_loaded('Class::Load::VersionCheck', {-version => 41}),
'Class::Load::VersionCheck has been loaded and the version check passed');
-
-done_testing;
diff -up Class-Load-0.09/t/002-try-load-class.t.orig Class-Load-0.09/t/002-try-load-class.t
--- Class-Load-0.09/t/002-try-load-class.t.orig 2011-09-06 05:24:45.000000000 +0100
+++ Class-Load-0.09/t/002-try-load-class.t 2011-09-06 09:10:45.492039052 +0100
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 18;
use lib 't/lib';
use Test::Class::Load ':all';
@@ -35,5 +35,3 @@ ok(try_load_class('Class::Load::VersionC
ok(try_load_class('Class::Load::VersionCheck2', { -version => 41 }));
ok(!try_load_class('Class::Load::VersionCheck2', { -version => 43 }));
-
-done_testing;
diff -up Class-Load-0.09/t/003-load-class.t.orig Class-Load-0.09/t/003-load-class.t
--- Class-Load-0.09/t/003-load-class.t.orig 2011-09-06 05:24:45.000000000 +0100
+++ Class-Load-0.09/t/003-load-class.t 2011-09-06 09:10:45.493039049 +0100
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 19;
use lib 't/lib';
use Test::Class::Load ':all';
use Test::Fatal;
@@ -52,5 +52,3 @@ like( exception {
like( exception {
load_class('__PACKAGE__')
}, qr/__PACKAGE__\.pm.*\@INC/, 'errors sanely on __PACKAGE__.pm' );
-
-done_testing;
diff -up Class-Load-0.09/t/004-load-double.t.orig Class-Load-0.09/t/004-load-double.t
--- Class-Load-0.09/t/004-load-double.t.orig 2011-09-06 05:24:45.000000000 +0100
+++ Class-Load-0.09/t/004-load-double.t 2011-09-06 09:10:45.493039049 +0100
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 2;
use lib 't/lib';
use Test::Class::Load ':all';
use Test::Fatal;
@@ -24,5 +24,3 @@ like( exception {
like( exception {
load_class('Class::Load::SyntaxError');
}, qr/syntax error/ );
-
-done_testing;
diff -up Class-Load-0.09/t/005-load-optional.t.orig Class-Load-0.09/t/005-load-optional.t
--- Class-Load-0.09/t/005-load-optional.t.orig 2011-09-06 05:24:45.000000000 +0100
+++ Class-Load-0.09/t/005-load-optional.t 2011-09-06 09:10:45.494039046 +0100
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 8;
use Test::Fatal;
use lib 't/lib';
use Test::Class::Load qw( :all );
@@ -39,5 +39,3 @@ is( load_optional_class('Class::Load::Ve
'VersionCheck (with too-high version) => 0');
is( load_optional_class('Class::Load::VersionCheck', {-version => 41}), 1,
'VersionCheck (with ok version) => 1');
-
-done_testing;
diff -up Class-Load-0.09/t/006-returned-error.t.orig Class-Load-0.09/t/006-returned-error.t
--- Class-Load-0.09/t/006-returned-error.t.orig 2011-09-06 05:24:45.000000000 +0100
+++ Class-Load-0.09/t/006-returned-error.t 2011-09-06 09:10:45.494039046 +0100
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More 0.88;
+use Test::More tests => 15;
use lib 't/lib';
use Test::Class::Load ':all';
@@ -45,5 +45,3 @@ ok(!is_class_loaded('Class::Load::Syntax
ok(!try_load_class('Class::Load::Nonexistent'), "didn't load class Nonexistent");
is($@, "foo");
}
-
-done_testing;
diff -up Class-Load-0.09/t/007-first-existing.t.orig Class-Load-0.09/t/007-first-existing.t
--- Class-Load-0.09/t/007-first-existing.t.orig 2011-09-06 05:24:45.000000000 +0100
+++ Class-Load-0.09/t/007-first-existing.t 2011-09-06 09:10:45.495039044 +0100
@@ -2,7 +2,7 @@
use strict;
use warnings;
use Test::Fatal;
-use Test::More 0.88;
+use Test::More tests => 12;
use lib 't/lib';
use Test::Class::Load 'load_first_existing_class';
@@ -120,5 +120,3 @@ is(
'Class::Load::VersionCheck2',
'load_first_existing_class returns loadable class when a class passes the version check'
);
-
-done_testing;
diff -up Class-Load-0.09/t/008-gvstash-bug.t.orig Class-Load-0.09/t/008-gvstash-bug.t
--- Class-Load-0.09/t/008-gvstash-bug.t.orig 2011-09-06 05:24:45.000000000 +0100
+++ Class-Load-0.09/t/008-gvstash-bug.t 2011-09-06 09:10:45.495039044 +0100
@@ -2,7 +2,7 @@
use strict;
use warnings;
use Test::Fatal;
-use Test::More 0.88;
+use Test::More tests => 3;
use lib 't/lib';
use Test::Class::Load 'load_class';
@@ -20,5 +20,3 @@ is( exception {
Class::Load::Stash->a_method;
}, undef,
'Actually loaded Class::Load::Stash - we were not fooled by mention of this stash in Class::Load::Stash::Sub' );
-
-done_testing;
diff -up Class-Load-0.09/t/009-invalid-module-name.t.orig Class-Load-0.09/t/009-invalid-module-name.t
--- Class-Load-0.09/t/009-invalid-module-name.t.orig 2011-09-06 05:24:45.000000000 +0100
+++ Class-Load-0.09/t/009-invalid-module-name.t 2011-09-06 13:22:19.205162393 +0100
@@ -2,14 +2,14 @@
use strict;
use warnings;
use Test::Fatal;
-use Test::More 0.88;
+use Test::More;
use lib 't/lib';
use Test::Class::Load 'load_class';
+plan tests => 1;
+
like(
exception { load_class('Foo:Bar') },
qr/^Foo:Bar is not a module name/,
"invalid module name"
);
-
-done_testing;
diff -up Class-Load-0.09/t/release-cpan-changes.t.orig Class-Load-0.09/t/release-cpan-changes.t
--- Class-Load-0.09/t/release-cpan-changes.t.orig 2011-09-06 05:24:45.000000000 +0100
+++ Class-Load-0.09/t/release-cpan-changes.t 2011-09-06 09:10:45.496039042 +0100
@@ -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 Class-Load-0.09/t/release-pod-coverage.t.orig Class-Load-0.09/t/release-pod-coverage.t
--- Class-Load-0.09/t/release-pod-coverage.t.orig 2011-09-06 05:24:45.000000000 +0100
+++ Class-Load-0.09/t/release-pod-coverage.t 2011-09-06 09:10:45.496039042 +0100
@@ -11,7 +11,7 @@ BEGIN {
use strict;
use warnings;
-use Test::More;
+use Test::More tests => 1;
use Test::Requires {
'Test::Pod::Coverage' => '1.04',
@@ -44,5 +44,3 @@ for my $module ( sort @modules ) {
"Pod coverage for $module"
);
}
-
-done_testing();

@ -1,11 +0,0 @@
--- Class-Load/Makefile.PL
+++ Class-Load/Makefile.PL
@@ -4,7 +4,7 @@
-use ExtUtils::MakeMaker 6.30;
+use ExtUtils::MakeMaker;

@ -1,17 +1,12 @@
Name: perl-Class-Load
Version: 0.10
Version: 0.11
Release: 1%{?dist}
Summary: A working (require "Class::Name") and more
Group: Development/Libraries
License: GPL+ or Artistic
URL: http://search.cpan.org/dist/Class-Load/
Source0: http://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/Class-Load-%{version}.tar.gz
Patch0: Class-Load-0.09-old-Test::More.patch
Patch2: Class-Load-0.09-old-eu::mm.patch
Patch3: Class-Load-0.08-no-Test::Requires.patch
Patch5: Class-Load-0.08-stopwords.patch
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
# ===================================================================
# Module build requirements
# ===================================================================
@ -20,6 +15,7 @@ BuildRequires: perl(ExtUtils::MakeMaker)
# Module requirements
# ===================================================================
BuildRequires: perl(Data::OptList)
BuildRequires: perl(Module::Runtime) >= 0.009
BuildRequires: perl(Package::Stash) >= 0.32
BuildRequires: perl(Try::Tiny)
# ===================================================================
@ -36,15 +32,9 @@ BuildRequires: perl(Test::NoTabs)
BuildRequires: perl(Test::Pod)
BuildRequires: perl(Test::Pod::Coverage)
BuildRequires: perl(Test::Spelling), aspell-en
# Modules not in EPEL-4
%if 0%{?fedora} || 0%{?rhel} > 4
BuildRequires: perl(Test::Requires)
%endif
# Modules not in EPEL-4/5/6
%if 0%{?fedora} || 0%{?rhel} > 6
BuildRequires: perl(Pod::Coverage::Moose)
BuildRequires: perl(Test::CPAN::Changes)
%endif
# ===================================================================
# Runtime requirements
# ===================================================================
@ -67,50 +57,34 @@ provide is_class_loaded 'Class::Name'.
%prep
%setup -q -n Class-Load-%{version}
# We need to patch the test suite if we have Test::More < 0.88
%if "%{?rhel}" == "4" || "%{?rhel}" == "5"
%patch0 -p1
%endif
# Work around absence of Test::Requires and ancient ExtUtils::MakeMaker if necessary
%if "%{?rhel}" == "4"
%patch2 -p1
%patch3 -p1
%endif
# Add extra stopwords to spell check test to account for dictionary
# coverage differences between distros
%patch5 -p1
%build
perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
make pure_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
find %{buildroot} -depth -type d -exec rmdir {} ';' 2>/dev/null
%{_fixperms} %{buildroot}
%check
# Pod Coverage test breaks the build if we don't have Pod::Coverage::Moose
%if ! 0%{?fedora} && 0%{?rhel} <= 6
mv t/release-pod-coverage.t .
%endif
make test RELEASE_TESTING=1
[ -f release-pod-coverage.t ] && mv release-pod-coverage.t t/
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc Changes LICENSE README
%{perl_vendorlib}/Class/
%{_mandir}/man3/Class::Load.3pm*
%changelog
* Wed Oct 5 2011 Paul Howarth <paul@city-fan.org> - 0.11-1
- Update to 0.11:
- Don't accept package names that start with a digit
- Rewrite some of the guts to use Module::Runtime rather than reimplementing
its functionality
- BR: perl(Module::Runtime) ≥ 0.009
- Drop all support for older distributions as required module
Module::Runtime ≥ 0.009 will not be available prior to F-16
* Tue Sep 6 2011 Paul Howarth <paul@city-fan.org> - 0.10-1
- Update to 0.10:
- Fix is_class_loaded to ignore $ISA (but still look for @ISA) when trying to

@ -1 +1 @@
737bc23977e0240180954c2872faa50d Class-Load-0.10.tar.gz
02180e505179e1ea718a5a22f93d2c0c Class-Load-0.11.tar.gz

Loading…
Cancel
Save