r62547 - in /trunk/libtest-most-perl: Changes MANIFEST META.yml Makefile.PL debian/changelog lib/Test/Most.pm lib/Test/Most/Exception.pm t/exclude_test_symbols.t
carnil-guest at users.alioth.debian.org
carnil-guest at users.alioth.debian.org
Mon Sep 13 20:12:11 UTC 2010
Author: carnil-guest
Date: Mon Sep 13 20:10:45 2010
New Revision: 62547
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=62547
Log:
New upstream release
Added:
trunk/libtest-most-perl/t/exclude_test_symbols.t
- copied unchanged from r62546, branches/upstream/libtest-most-perl/current/t/exclude_test_symbols.t
Modified:
trunk/libtest-most-perl/Changes
trunk/libtest-most-perl/MANIFEST
trunk/libtest-most-perl/META.yml
trunk/libtest-most-perl/Makefile.PL
trunk/libtest-most-perl/debian/changelog
trunk/libtest-most-perl/lib/Test/Most.pm
trunk/libtest-most-perl/lib/Test/Most/Exception.pm
Modified: trunk/libtest-most-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-most-perl/Changes?rev=62547&op=diff
==============================================================================
--- trunk/libtest-most-perl/Changes (original)
+++ trunk/libtest-most-perl/Changes Mon Sep 13 20:10:45 2010
@@ -1,4 +1,7 @@
Revision history for Test::Most
+
+0.23 2010-09-08
+ - added "Excluding Test Symbols" feature (RT#61146, Karen Etheridge).
0.22 2010-08-07
- Added always_explain() and always_show().
Modified: trunk/libtest-most-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-most-perl/MANIFEST?rev=62547&op=diff
==============================================================================
--- trunk/libtest-most-perl/MANIFEST (original)
+++ trunk/libtest-most-perl/MANIFEST Mon Sep 13 20:10:45 2010
@@ -13,6 +13,7 @@
t/env_die.t
t/exception.t
t/exclude_test_modules.t
+t/exclude_test_symbols.t
t/explain.t
t/function_bail.t
t/function_die.t
Modified: trunk/libtest-most-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-most-perl/META.yml?rev=62547&op=diff
==============================================================================
--- trunk/libtest-most-perl/META.yml (original)
+++ trunk/libtest-most-perl/META.yml Mon Sep 13 20:10:45 2010
@@ -13,10 +13,10 @@
provides:
Test::Most:
file: lib/Test/Most.pm
- version: 0.22
+ version: 0.23
Test::Most::Exception:
file: lib/Test/Most/Exception.pm
- version: 0.22
+ version: 0.23
recommends:
Data::Dumper::Names: 0.03
requires:
@@ -31,4 +31,4 @@
resources:
license: http://dev.perl.org/licenses/
repository: http://github.com/Ovid/test--most
-version: 0.22
+version: 0.23
Modified: trunk/libtest-most-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-most-perl/Makefile.PL?rev=62547&op=diff
==============================================================================
--- trunk/libtest-most-perl/Makefile.PL (original)
+++ trunk/libtest-most-perl/Makefile.PL Mon Sep 13 20:10:45 2010
@@ -3,19 +3,19 @@
use ExtUtils::MakeMaker;
WriteMakefile
(
- 'PL_FILES' => {},
- 'INSTALLDIRS' => 'site',
- 'NAME' => 'Test::Most',
- 'EXE_FILES' => [],
- 'VERSION_FROM' => 'lib/Test/Most.pm',
- 'PREREQ_PM' => {
- 'Test::Harness' => '3.07',
- 'Test::Exception' => '0.29',
- 'Exception::Class' => '1.14',
- 'Test::More' => '0.88',
- 'Test::Differences' => '0.500',
- 'Test::Warn' => '0.11',
- 'Test::Deep' => '0.106'
- }
-)
+ 'NAME' => 'Test::Most',
+ 'VERSION_FROM' => 'lib/Test/Most.pm',
+ 'PREREQ_PM' => {
+ 'Exception::Class' => '1.14',
+ 'Test::Deep' => '0.106',
+ 'Test::Differences' => '0.500',
+ 'Test::Exception' => '0.29',
+ 'Test::Harness' => '3.07',
+ 'Test::More' => '0.88',
+ 'Test::Warn' => '0.11'
+ },
+ 'INSTALLDIRS' => 'site',
+ 'EXE_FILES' => [],
+ 'PL_FILES' => {}
+ )
;
Modified: trunk/libtest-most-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-most-perl/debian/changelog?rev=62547&op=diff
==============================================================================
--- trunk/libtest-most-perl/debian/changelog (original)
+++ trunk/libtest-most-perl/debian/changelog Mon Sep 13 20:10:45 2010
@@ -1,3 +1,9 @@
+libtest-most-perl (0.23-1) UNRELEASED; urgency=low
+
+ * New upstream release
+
+ -- Salvatore Bonaccorso <salvatore.bonaccorso at gmail.com> Mon, 13 Sep 2010 22:10:14 +0200
+
libtest-most-perl (0.22-1) unstable; urgency=low
[ Salvatore Bonaccorso ]
Modified: trunk/libtest-most-perl/lib/Test/Most.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-most-perl/lib/Test/Most.pm?rev=62547&op=diff
==============================================================================
--- trunk/libtest-most-perl/lib/Test/Most.pm (original)
+++ trunk/libtest-most-perl/lib/Test/Most.pm Mon Sep 13 20:10:45 2010
@@ -34,7 +34,7 @@
=cut
-our $VERSION = '0.22';
+our $VERSION = '0.23';
$VERSION = eval $VERSION;
=head1 SYNOPSIS
@@ -288,7 +288,7 @@
=head1 MISCELLANEOUS
-=head1 Excluding Test Modules
+=head2 Excluding Test Modules
Sometimes you want a exclude a particular test module. For example,
L<Test::Deep>, when used with L<Moose>, produces the following warning:
@@ -303,6 +303,15 @@
See
L<https://rt.cpan.org/Ticket/Display.html?id=54362&results=e73ff63c5bf9ba0f796efdba5773cf3f>
for more information.
+
+=head2 Excluding Test Symbols
+
+Sometimes you don't want to exclude an entire test module, but just a
+particular symbol that is causing issues (e.g. see the 'blessed' example
+above). You can exclude the symbol(s) in the standard way, by specifying the
+symbol in the import list with a '!' in front:
+
+ use Test::Most tests => 42, '!blessed';
=head2 Deferred plans
@@ -433,6 +442,8 @@
last;
}
}
+
+ my @exclude_symbols;
my $i = 0;
while ($i < @_) {
if ( !$bail_set and ( 'die' eq $_[$i] ) ) {
@@ -452,6 +463,12 @@
$i = 0;
next;
}
+ if ( $_[$i] =~ /^!(.*)/ ) {
+ splice @_, $i, 1;
+ push @exclude_symbols => $1;
+ $i = 0;
+ next;
+ }
if ( 'defer_plan' eq $_[$i] ) {
splice @_, $i, 1;
@@ -466,13 +483,24 @@
$i++;
}
foreach my $module (keys %modules_to_load) {
- eval "use $module";
- no strict 'refs';
- push @EXPORT => @{"${module}::EXPORT"};
+ # some Test modules we use are naughty and don't use Exporter.
+ # See RT#61145.
+ if ($module->isa('Exporter')) {
+ my $exclude_symbols = 'qw(' . join(' ', map { '!' . $_ } @exclude_symbols) . ')';
+ eval "require $module; import $module $exclude_symbols;";
+ } else {
+ eval "use $module";
+ }
+
if ( my $error = $@) {
require Carp;
Carp::croak($error);
}
+ no strict 'refs';
+ my %count;
+ $count{$_}++ foreach @{"${module}::EXPORT"}, @exclude_symbols;
+ # Note: export_to_level would be better here.
+ push @EXPORT => grep { $count{$_} == 1 } @{"${module}::EXPORT"};
}
# 'magic' goto to avoid updating the callstack
Modified: trunk/libtest-most-perl/lib/Test/Most/Exception.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-most-perl/lib/Test/Most/Exception.pm?rev=62547&op=diff
==============================================================================
--- trunk/libtest-most-perl/lib/Test/Most/Exception.pm (original)
+++ trunk/libtest-most-perl/lib/Test/Most/Exception.pm Mon Sep 13 20:10:45 2010
@@ -16,7 +16,7 @@
=cut
-our $VERSION = '0.22';
+our $VERSION = '0.23';
$VERSION = eval $VERSION;
=head1 SYNOPSIS
More information about the Pkg-perl-cvs-commits
mailing list