r73685 - in /branches/upstream/libtest-fatal-perl/current: Changes META.json META.yml Makefile.PL README lib/Test/Fatal.pm t/basic.t
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Wed Apr 27 20:51:56 UTC 2011
Author: gregoa
Date: Wed Apr 27 20:51:35 2011
New Revision: 73685
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=73685
Log:
[svn-upgrade] new version libtest-fatal-perl (0.005)
Modified:
branches/upstream/libtest-fatal-perl/current/Changes
branches/upstream/libtest-fatal-perl/current/META.json
branches/upstream/libtest-fatal-perl/current/META.yml
branches/upstream/libtest-fatal-perl/current/Makefile.PL
branches/upstream/libtest-fatal-perl/current/README
branches/upstream/libtest-fatal-perl/current/lib/Test/Fatal.pm
branches/upstream/libtest-fatal-perl/current/t/basic.t
Modified: branches/upstream/libtest-fatal-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-fatal-perl/current/Changes?rev=73685&op=diff
==============================================================================
--- branches/upstream/libtest-fatal-perl/current/Changes (original)
+++ branches/upstream/libtest-fatal-perl/current/Changes Wed Apr 27 20:51:35 2011
@@ -1,4 +1,11 @@
Revision history for Test-Fatal
+
+0.005 2011-04-26 07:50:48 America/New_York
+ fix the logic that picks tests for 5.13.1+ (thanks, Zefram)
+
+0.004 2011-04-25 11:57:59 America/New_York
+ success blocks now allow trailing blocks like finally, catch, etc.
+ (thanks, Joel Bernstein)
0.003 2010-10-28 22:10:59 America/New_York
more tests for false exceptions, especially on 5.13
Modified: branches/upstream/libtest-fatal-perl/current/META.json
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-fatal-perl/current/META.json?rev=73685&op=diff
==============================================================================
--- branches/upstream/libtest-fatal-perl/current/META.json (original)
+++ branches/upstream/libtest-fatal-perl/current/META.json Wed Apr 27 20:51:35 2011
@@ -4,7 +4,7 @@
"Ricardo Signes <rjbs at cpan.org>"
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 4.102342, CPAN::Meta::Converter version 2.102400",
+ "generated_by" : "Dist::Zilla version 4.200005, CPAN::Meta::Converter version 2.110930",
"license" : [
"perl_5"
],
@@ -40,118 +40,123 @@
"url" : "git://git.codesimply.com/Test-Fatal.git"
}
},
- "version" : "0.003",
+ "version" : "0.005",
"x_Dist_Zilla" : {
"plugins" : [
{
+ "class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed",
+ "name" : "@RJBS/CheckPrereqsIndexed",
+ "version" : "0.002"
+ },
+ {
"class" : "Dist::Zilla::Plugin::GatherDir",
"name" : "@RJBS/@Basic/GatherDir",
- "version" : "4.102342"
+ "version" : "4.200005"
},
{
"class" : "Dist::Zilla::Plugin::PruneCruft",
"name" : "@RJBS/@Basic/PruneCruft",
- "version" : "4.102342"
+ "version" : "4.200005"
},
{
"class" : "Dist::Zilla::Plugin::ManifestSkip",
"name" : "@RJBS/@Basic/ManifestSkip",
- "version" : "4.102342"
+ "version" : "4.200005"
},
{
"class" : "Dist::Zilla::Plugin::MetaYAML",
"name" : "@RJBS/@Basic/MetaYAML",
- "version" : "4.102342"
+ "version" : "4.200005"
},
{
"class" : "Dist::Zilla::Plugin::License",
"name" : "@RJBS/@Basic/License",
- "version" : "4.102342"
+ "version" : "4.200005"
},
{
"class" : "Dist::Zilla::Plugin::Readme",
"name" : "@RJBS/@Basic/Readme",
- "version" : "4.102342"
+ "version" : "4.200005"
},
{
"class" : "Dist::Zilla::Plugin::ExtraTests",
"name" : "@RJBS/@Basic/ExtraTests",
- "version" : "4.102342"
+ "version" : "4.200005"
},
{
"class" : "Dist::Zilla::Plugin::ExecDir",
"name" : "@RJBS/@Basic/ExecDir",
- "version" : "4.102342"
+ "version" : "4.200005"
},
{
"class" : "Dist::Zilla::Plugin::ShareDir",
"name" : "@RJBS/@Basic/ShareDir",
- "version" : "4.102342"
+ "version" : "4.200005"
},
{
"class" : "Dist::Zilla::Plugin::MakeMaker",
"name" : "@RJBS/@Basic/MakeMaker",
- "version" : "4.102342"
+ "version" : "4.200005"
},
{
"class" : "Dist::Zilla::Plugin::Manifest",
"name" : "@RJBS/@Basic/Manifest",
- "version" : "4.102342"
+ "version" : "4.200005"
},
{
"class" : "Dist::Zilla::Plugin::TestRelease",
"name" : "@RJBS/@Basic/TestRelease",
- "version" : "4.102342"
+ "version" : "4.200005"
},
{
"class" : "Dist::Zilla::Plugin::ConfirmRelease",
"name" : "@RJBS/@Basic/ConfirmRelease",
- "version" : "4.102342"
+ "version" : "4.200005"
},
{
"class" : "Dist::Zilla::Plugin::UploadToCPAN",
"name" : "@RJBS/@Basic/UploadToCPAN",
- "version" : "4.102342"
+ "version" : "4.200005"
},
{
"class" : "Dist::Zilla::Plugin::AutoPrereqs",
"name" : "@RJBS/AutoPrereqs",
- "version" : "4.102342"
+ "version" : "4.200005"
},
{
"class" : "Dist::Zilla::Plugin::Git::NextVersion",
"name" : "@RJBS/Git::NextVersion",
- "version" : "1.102810"
+ "version" : "1.110500"
},
{
"class" : "Dist::Zilla::Plugin::PkgVersion",
"name" : "@RJBS/PkgVersion",
- "version" : "4.102342"
+ "version" : "4.200005"
},
{
"class" : "Dist::Zilla::Plugin::MetaConfig",
"name" : "@RJBS/MetaConfig",
- "version" : "4.102342"
+ "version" : "4.200005"
},
{
"class" : "Dist::Zilla::Plugin::MetaJSON",
"name" : "@RJBS/MetaJSON",
- "version" : "4.102342"
+ "version" : "4.200005"
},
{
"class" : "Dist::Zilla::Plugin::NextRelease",
"name" : "@RJBS/NextRelease",
- "version" : "4.102342"
+ "version" : "4.200005"
},
{
"class" : "Dist::Zilla::Plugin::PodSyntaxTests",
"name" : "@RJBS/PodSyntaxTests",
- "version" : "4.102342"
+ "version" : "4.200005"
},
{
"class" : "Dist::Zilla::Plugin::Repository",
"name" : "@RJBS/Repository",
- "version" : "0.14"
+ "version" : "0.18"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
@@ -162,7 +167,7 @@
}
},
"name" : "@RJBS/TestMoreWithSubtests",
- "version" : "4.102342"
+ "version" : "4.200005"
},
{
"class" : "Dist::Zilla::Plugin::PodWeaver",
@@ -172,42 +177,42 @@
{
"class" : "Dist::Zilla::Plugin::Git::Check",
"name" : "@RJBS/@Git/Check",
- "version" : "1.102810"
+ "version" : "1.110500"
},
{
"class" : "Dist::Zilla::Plugin::Git::Commit",
"name" : "@RJBS/@Git/Commit",
- "version" : "1.102810"
+ "version" : "1.110500"
},
{
"class" : "Dist::Zilla::Plugin::Git::Tag",
"name" : "@RJBS/@Git/Tag",
- "version" : "1.102810"
+ "version" : "1.110500"
},
{
"class" : "Dist::Zilla::Plugin::Git::Push",
"name" : "@RJBS/@Git/Push",
- "version" : "1.102810"
+ "version" : "1.110500"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":InstallModules",
- "version" : "4.102342"
+ "version" : "4.200005"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":TestFiles",
- "version" : "4.102342"
+ "version" : "4.200005"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExecFiles",
- "version" : "4.102342"
+ "version" : "4.200005"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ShareFiles",
- "version" : "4.102342"
+ "version" : "4.200005"
}
],
"zilla" : {
@@ -215,7 +220,7 @@
"config" : {
"is_trial" : 0
},
- "version" : "4.102342"
+ "version" : "4.200005"
}
}
}
Modified: branches/upstream/libtest-fatal-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-fatal-perl/current/META.yml?rev=73685&op=diff
==============================================================================
--- branches/upstream/libtest-fatal-perl/current/META.yml (original)
+++ branches/upstream/libtest-fatal-perl/current/META.yml Wed Apr 27 20:51:35 2011
@@ -8,7 +8,7 @@
configure_requires:
ExtUtils::MakeMaker: 6.31
dynamic_config: 0
-generated_by: 'Dist::Zilla version 4.102342, CPAN::Meta::Converter version 2.102400'
+generated_by: 'Dist::Zilla version 4.200005, CPAN::Meta::Converter version 2.110930'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -20,97 +20,101 @@
Try::Tiny: 0.07
resources:
repository: git://git.codesimply.com/Test-Fatal.git
-version: 0.003
+version: 0.005
x_Dist_Zilla:
plugins:
-
+ class: Dist::Zilla::Plugin::CheckPrereqsIndexed
+ name: '@RJBS/CheckPrereqsIndexed'
+ version: 0.002
+ -
class: Dist::Zilla::Plugin::GatherDir
name: '@RJBS/@Basic/GatherDir'
- version: 4.102342
+ version: 4.200005
-
class: Dist::Zilla::Plugin::PruneCruft
name: '@RJBS/@Basic/PruneCruft'
- version: 4.102342
+ version: 4.200005
-
class: Dist::Zilla::Plugin::ManifestSkip
name: '@RJBS/@Basic/ManifestSkip'
- version: 4.102342
+ version: 4.200005
-
class: Dist::Zilla::Plugin::MetaYAML
name: '@RJBS/@Basic/MetaYAML'
- version: 4.102342
+ version: 4.200005
-
class: Dist::Zilla::Plugin::License
name: '@RJBS/@Basic/License'
- version: 4.102342
+ version: 4.200005
-
class: Dist::Zilla::Plugin::Readme
name: '@RJBS/@Basic/Readme'
- version: 4.102342
+ version: 4.200005
-
class: Dist::Zilla::Plugin::ExtraTests
name: '@RJBS/@Basic/ExtraTests'
- version: 4.102342
+ version: 4.200005
-
class: Dist::Zilla::Plugin::ExecDir
name: '@RJBS/@Basic/ExecDir'
- version: 4.102342
+ version: 4.200005
-
class: Dist::Zilla::Plugin::ShareDir
name: '@RJBS/@Basic/ShareDir'
- version: 4.102342
+ version: 4.200005
-
class: Dist::Zilla::Plugin::MakeMaker
name: '@RJBS/@Basic/MakeMaker'
- version: 4.102342
+ version: 4.200005
-
class: Dist::Zilla::Plugin::Manifest
name: '@RJBS/@Basic/Manifest'
- version: 4.102342
+ version: 4.200005
-
class: Dist::Zilla::Plugin::TestRelease
name: '@RJBS/@Basic/TestRelease'
- version: 4.102342
+ version: 4.200005
-
class: Dist::Zilla::Plugin::ConfirmRelease
name: '@RJBS/@Basic/ConfirmRelease'
- version: 4.102342
+ version: 4.200005
-
class: Dist::Zilla::Plugin::UploadToCPAN
name: '@RJBS/@Basic/UploadToCPAN'
- version: 4.102342
+ version: 4.200005
-
class: Dist::Zilla::Plugin::AutoPrereqs
name: '@RJBS/AutoPrereqs'
- version: 4.102342
+ version: 4.200005
-
class: Dist::Zilla::Plugin::Git::NextVersion
name: '@RJBS/Git::NextVersion'
- version: 1.102810
+ version: 1.110500
-
class: Dist::Zilla::Plugin::PkgVersion
name: '@RJBS/PkgVersion'
- version: 4.102342
+ version: 4.200005
-
class: Dist::Zilla::Plugin::MetaConfig
name: '@RJBS/MetaConfig'
- version: 4.102342
+ version: 4.200005
-
class: Dist::Zilla::Plugin::MetaJSON
name: '@RJBS/MetaJSON'
- version: 4.102342
+ version: 4.200005
-
class: Dist::Zilla::Plugin::NextRelease
name: '@RJBS/NextRelease'
- version: 4.102342
+ version: 4.200005
-
class: Dist::Zilla::Plugin::PodSyntaxTests
name: '@RJBS/PodSyntaxTests'
- version: 4.102342
+ version: 4.200005
-
class: Dist::Zilla::Plugin::Repository
name: '@RJBS/Repository'
- version: 0.14
+ version: 0.18
-
class: Dist::Zilla::Plugin::Prereqs
config:
@@ -118,7 +122,7 @@
phase: test
type: requires
name: '@RJBS/TestMoreWithSubtests'
- version: 4.102342
+ version: 4.200005
-
class: Dist::Zilla::Plugin::PodWeaver
name: '@RJBS/PodWeaver'
@@ -126,37 +130,37 @@
-
class: Dist::Zilla::Plugin::Git::Check
name: '@RJBS/@Git/Check'
- version: 1.102810
+ version: 1.110500
-
class: Dist::Zilla::Plugin::Git::Commit
name: '@RJBS/@Git/Commit'
- version: 1.102810
+ version: 1.110500
-
class: Dist::Zilla::Plugin::Git::Tag
name: '@RJBS/@Git/Tag'
- version: 1.102810
+ version: 1.110500
-
class: Dist::Zilla::Plugin::Git::Push
name: '@RJBS/@Git/Push'
- version: 1.102810
+ version: 1.110500
-
class: Dist::Zilla::Plugin::FinderCode
name: ':InstallModules'
- version: 4.102342
+ version: 4.200005
-
class: Dist::Zilla::Plugin::FinderCode
name: ':TestFiles'
- version: 4.102342
+ version: 4.200005
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExecFiles'
- version: 4.102342
+ version: 4.200005
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ShareFiles'
- version: 4.102342
+ version: 4.200005
zilla:
class: Dist::Zilla::Dist::Builder
config:
is_trial: 0
- version: 4.102342
+ version: 4.200005
Modified: branches/upstream/libtest-fatal-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-fatal-perl/current/Makefile.PL?rev=73685&op=diff
==============================================================================
--- branches/upstream/libtest-fatal-perl/current/Makefile.PL (original)
+++ branches/upstream/libtest-fatal-perl/current/Makefile.PL Wed Apr 27 20:51:35 2011
@@ -27,7 +27,7 @@
'Exporter' => '5.59',
'Try::Tiny' => '0.07'
},
- 'VERSION' => '0.003',
+ 'VERSION' => '0.005',
'test' => {
'TESTS' => 't/*.t'
}
Modified: branches/upstream/libtest-fatal-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-fatal-perl/current/README?rev=73685&op=diff
==============================================================================
--- branches/upstream/libtest-fatal-perl/current/README (original)
+++ branches/upstream/libtest-fatal-perl/current/README Wed Apr 27 20:51:35 2011
@@ -1,7 +1,7 @@
This archive contains the distribution Test-Fatal,
-version 0.003:
+version 0.005:
incredibly simple helpers for testing code with exceptions
Modified: branches/upstream/libtest-fatal-perl/current/lib/Test/Fatal.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-fatal-perl/current/lib/Test/Fatal.pm?rev=73685&op=diff
==============================================================================
--- branches/upstream/libtest-fatal-perl/current/lib/Test/Fatal.pm (original)
+++ branches/upstream/libtest-fatal-perl/current/lib/Test/Fatal.pm Wed Apr 27 20:51:35 2011
@@ -2,7 +2,7 @@
use warnings;
package Test::Fatal;
BEGIN {
- $Test::Fatal::VERSION = '0.003';
+ $Test::Fatal::VERSION = '0.005';
}
# ABSTRACT: incredibly simple helpers for testing code with exceptions
@@ -16,27 +16,27 @@
our @EXPORT_OK = qw(exception success);
-sub exception (&) {
- my ($code) = @_;
+sub exception (&;@) {
+ my $code = shift;
return try {
$code->();
return undef;
- } catch {
+ } catch( sub {
return $_ if $_;
my $problem = defined $_ ? 'false' : 'undef';
Carp::confess("$problem exception caught by Test::Fatal::exception");
- };
+ }, @_);
}
-sub success (&) {
- my ($code) = @_;
- return finally {
+sub success (&;@) {
+ my $code = shift;
+ return finally( sub {
return if @_; # <-- only run on success
$code->();
- }
+ }, @_ );
}
1;
@@ -50,7 +50,7 @@
=head1 VERSION
-version 0.003
+version 0.005
=head1 SYNOPSIS
Modified: branches/upstream/libtest-fatal-perl/current/t/basic.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-fatal-perl/current/t/basic.t?rev=73685&op=diff
==============================================================================
--- branches/upstream/libtest-fatal-perl/current/t/basic.t (original)
+++ branches/upstream/libtest-fatal-perl/current/t/basic.t Wed Apr 27 20:51:35 2011
@@ -1,6 +1,6 @@
use strict;
use warnings;
-use Test::More tests => 5 + ($] >= 5.013001 ? 0 : 1);
+use Test::More tests => 7 + ($] < 5.013001 ? 1 : 0);
use Test::Fatal qw(exception success);
use Try::Tiny 0.07;
@@ -31,6 +31,22 @@
pass("a success block runs, passing");
};
+{
+ my $i = 0;
+ try {
+ die { foo => 42 };
+ } catch {
+ 1;
+ } success {
+ fail("never get here");
+ } finally {
+ $i++;
+ pass("finally block after success block");
+ };
+
+ is($i, 1, "finally block after success block still runs");
+};
+
# TODO: test for fatality of undef exception?
{
@@ -38,7 +54,7 @@
sub DESTROY { eval { my $x = 'o no'; } }
}
-if ($] <= 5.013001) {
+if ($] < 5.013001) {
like(
exception { exception {
my $blackguard = bless {}, 'BreakException';
More information about the Pkg-perl-cvs-commits
mailing list