r64661 - in /branches/upstream/libpackage-stash-perl/current: Changes MANIFEST META.json META.yml Makefile.PL README dist.ini inc/ inc/MMPackageStash.pm lib/Package/Stash.pm t/01-basic.t t/02-extension.t t/03-io.t t/06-addsub.t
ansgar at users.alioth.debian.org
ansgar at users.alioth.debian.org
Sun Nov 7 12:14:30 UTC 2010
Author: ansgar
Date: Sun Nov 7 12:14:02 2010
New Revision: 64661
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=64661
Log:
[svn-upgrade] new version libpackage-stash-perl (0.13)
Added:
branches/upstream/libpackage-stash-perl/current/inc/
branches/upstream/libpackage-stash-perl/current/inc/MMPackageStash.pm
Modified:
branches/upstream/libpackage-stash-perl/current/Changes
branches/upstream/libpackage-stash-perl/current/MANIFEST
branches/upstream/libpackage-stash-perl/current/META.json
branches/upstream/libpackage-stash-perl/current/META.yml
branches/upstream/libpackage-stash-perl/current/Makefile.PL
branches/upstream/libpackage-stash-perl/current/README
branches/upstream/libpackage-stash-perl/current/dist.ini
branches/upstream/libpackage-stash-perl/current/lib/Package/Stash.pm
branches/upstream/libpackage-stash-perl/current/t/01-basic.t
branches/upstream/libpackage-stash-perl/current/t/02-extension.t
branches/upstream/libpackage-stash-perl/current/t/03-io.t
branches/upstream/libpackage-stash-perl/current/t/06-addsub.t
Modified: branches/upstream/libpackage-stash-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpackage-stash-perl/current/Changes?rev=64661&op=diff
==============================================================================
--- branches/upstream/libpackage-stash-perl/current/Changes (original)
+++ branches/upstream/libpackage-stash-perl/current/Changes Sun Nov 7 12:14:02 2010
@@ -1,4 +1,21 @@
Revision history for Package-Stash
+
+0.13 2010-10-31
+ - revert the vivification changes for now, to get an actual release out
+ with Test::Fatal
+
+0.12-TRIAL 2010-10-27
+ - actually include the conflict stuff in the release (bah)
+
+0.11-TRIAL 2010-10-27
+ - conflict on mx-role-withoverloading too
+
+0.10-TRIAL 2010-10-27
+ - only do the weird ISA special-casing on perl versions where it's broken
+
+0.09-TRIAL 2010-10-27
+ - clean up the vivication code a lot, make it behave more sanely
+ - use Test::Fatal instead of Test::Exception (Justin Hunter)
0.08 2010-09-18
- oops, accidentally included some experimental changes in that last
Modified: branches/upstream/libpackage-stash-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpackage-stash-perl/current/MANIFEST?rev=64661&op=diff
==============================================================================
--- branches/upstream/libpackage-stash-perl/current/MANIFEST (original)
+++ branches/upstream/libpackage-stash-perl/current/MANIFEST Sun Nov 7 12:14:02 2010
@@ -6,6 +6,7 @@
Makefile.PL
README
dist.ini
+inc/MMPackageStash.pm
lib/Package/Stash.pm
t/00-compile.t
t/01-basic.t
Modified: branches/upstream/libpackage-stash-perl/current/META.json
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpackage-stash-perl/current/META.json?rev=64661&op=diff
==============================================================================
--- branches/upstream/libpackage-stash-perl/current/META.json (original)
+++ branches/upstream/libpackage-stash-perl/current/META.json Sun Nov 7 12:14:02 2010
@@ -4,7 +4,7 @@
"Jesse Luehrs <doy at tozt dot net>"
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 4.102340, CPAN::Meta::Converter version 2.101670",
+ "generated_by" : "Dist::Zilla version 4.102342, CPAN::Meta::Converter version 2.101670",
"license" : [
"perl_5"
],
@@ -26,7 +26,7 @@
},
"test" : {
"requires" : {
- "Test::Exception" : 0,
+ "Test::Fatal" : 0,
"Test::More" : "0.88"
}
}
@@ -38,88 +38,88 @@
"url" : "git://github.com/doy/package-stash.git"
}
},
- "version" : "0.08",
+ "version" : "0.13",
"x_Dist_Zilla" : {
"plugins" : [
{
"class" : "Dist::Zilla::Plugin::GatherDir",
"name" : "@DOY/GatherDir",
- "version" : "4.102340"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::PruneCruft",
"name" : "@DOY/PruneCruft",
- "version" : "4.102340"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::ManifestSkip",
"name" : "@DOY/ManifestSkip",
- "version" : "4.102340"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::MetaYAML",
"name" : "@DOY/MetaYAML",
- "version" : "4.102340"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::License",
"name" : "@DOY/License",
- "version" : "4.102340"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::Readme",
"name" : "@DOY/Readme",
- "version" : "4.102340"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::ExtraTests",
"name" : "@DOY/ExtraTests",
- "version" : "4.102340"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::ExecDir",
"name" : "@DOY/ExecDir",
- "version" : "4.102340"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::ShareDir",
"name" : "@DOY/ShareDir",
- "version" : "4.102340"
- },
- {
- "class" : "Dist::Zilla::Plugin::MakeMaker",
- "name" : "@DOY/MakeMaker",
- "version" : "4.102340"
+ "version" : "4.102342"
+ },
+ {
+ "class" : "inc::MMPackageStash",
+ "name" : "@DOY/=inc::MMPackageStash",
+ "version" : null
},
{
"class" : "Dist::Zilla::Plugin::Manifest",
"name" : "@DOY/Manifest",
- "version" : "4.102340"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::TestRelease",
"name" : "@DOY/TestRelease",
- "version" : "4.102340"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::ConfirmRelease",
"name" : "@DOY/ConfirmRelease",
- "version" : "4.102340"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::MetaConfig",
"name" : "@DOY/MetaConfig",
- "version" : "4.102340"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::MetaJSON",
"name" : "@DOY/MetaJSON",
- "version" : "4.102340"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::NextRelease",
"name" : "@DOY/NextRelease",
- "version" : "4.102340"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::CheckChangesHasContent",
@@ -129,17 +129,17 @@
{
"class" : "Dist::Zilla::Plugin::PkgVersion",
"name" : "@DOY/PkgVersion",
- "version" : "4.102340"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::PodCoverageTests",
"name" : "@DOY/PodCoverageTests",
- "version" : "4.102340"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::PodSyntaxTests",
"name" : "@DOY/PodSyntaxTests",
- "version" : "4.102340"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::NoTabsTests",
@@ -184,21 +184,21 @@
{
"class" : "Dist::Zilla::Plugin::UploadToCPAN",
"name" : "@DOY/UploadToCPAN",
- "version" : "4.102340"
- },
- {
- "class" : "Dist::Zilla::Plugin::Prereq",
+ "version" : "4.102342"
+ },
+ {
+ "class" : "Dist::Zilla::Plugin::Prereqs",
"config" : {
"Dist::Zilla::Plugin::Prereqs" : {
"phase" : "runtime",
"type" : "requires"
}
},
- "name" : "Prereq",
- "version" : "4.102340"
- },
- {
- "class" : "Dist::Zilla::Plugin::Prereq",
+ "name" : "Prereqs",
+ "version" : "4.102342"
+ },
+ {
+ "class" : "Dist::Zilla::Plugin::Prereqs",
"config" : {
"Dist::Zilla::Plugin::Prereqs" : {
"phase" : "test",
@@ -206,27 +206,27 @@
}
},
"name" : "TestRequires",
- "version" : "4.102340"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":InstallModules",
- "version" : "4.102340"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":TestFiles",
- "version" : "4.102340"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExecFiles",
- "version" : "4.102340"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ShareFiles",
- "version" : "4.102340"
+ "version" : "4.102342"
}
],
"zilla" : {
@@ -234,7 +234,7 @@
"config" : {
"is_trial" : 0
},
- "version" : "4.102340"
+ "version" : "4.102342"
}
}
}
Modified: branches/upstream/libpackage-stash-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpackage-stash-perl/current/META.yml?rev=64661&op=diff
==============================================================================
--- branches/upstream/libpackage-stash-perl/current/META.yml (original)
+++ branches/upstream/libpackage-stash-perl/current/META.yml Sun Nov 7 12:14:02 2010
@@ -3,12 +3,12 @@
author:
- 'Jesse Luehrs <doy at tozt dot net>'
build_requires:
- Test::Exception: 0
+ Test::Fatal: 0
Test::More: 0.88
configure_requires:
ExtUtils::MakeMaker: 6.31
dynamic_config: 0
-generated_by: 'Dist::Zilla version 4.102340, CPAN::Meta::Converter version 2.101670'
+generated_by: 'Dist::Zilla version 4.102342, CPAN::Meta::Converter version 2.101670'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -18,73 +18,73 @@
Scalar::Util: 0
resources:
repository: git://github.com/doy/package-stash.git
-version: 0.08
+version: 0.13
x_Dist_Zilla:
plugins:
-
class: Dist::Zilla::Plugin::GatherDir
name: '@DOY/GatherDir'
- version: 4.102340
+ version: 4.102342
-
class: Dist::Zilla::Plugin::PruneCruft
name: '@DOY/PruneCruft'
- version: 4.102340
+ version: 4.102342
-
class: Dist::Zilla::Plugin::ManifestSkip
name: '@DOY/ManifestSkip'
- version: 4.102340
+ version: 4.102342
-
class: Dist::Zilla::Plugin::MetaYAML
name: '@DOY/MetaYAML'
- version: 4.102340
+ version: 4.102342
-
class: Dist::Zilla::Plugin::License
name: '@DOY/License'
- version: 4.102340
+ version: 4.102342
-
class: Dist::Zilla::Plugin::Readme
name: '@DOY/Readme'
- version: 4.102340
+ version: 4.102342
-
class: Dist::Zilla::Plugin::ExtraTests
name: '@DOY/ExtraTests'
- version: 4.102340
+ version: 4.102342
-
class: Dist::Zilla::Plugin::ExecDir
name: '@DOY/ExecDir'
- version: 4.102340
+ version: 4.102342
-
class: Dist::Zilla::Plugin::ShareDir
name: '@DOY/ShareDir'
- version: 4.102340
+ version: 4.102342
-
- class: Dist::Zilla::Plugin::MakeMaker
- name: '@DOY/MakeMaker'
- version: 4.102340
+ class: inc::MMPackageStash
+ name: '@DOY/=inc::MMPackageStash'
+ version: ~
-
class: Dist::Zilla::Plugin::Manifest
name: '@DOY/Manifest'
- version: 4.102340
+ version: 4.102342
-
class: Dist::Zilla::Plugin::TestRelease
name: '@DOY/TestRelease'
- version: 4.102340
+ version: 4.102342
-
class: Dist::Zilla::Plugin::ConfirmRelease
name: '@DOY/ConfirmRelease'
- version: 4.102340
+ version: 4.102342
-
class: Dist::Zilla::Plugin::MetaConfig
name: '@DOY/MetaConfig'
- version: 4.102340
+ version: 4.102342
-
class: Dist::Zilla::Plugin::MetaJSON
name: '@DOY/MetaJSON'
- version: 4.102340
+ version: 4.102342
-
class: Dist::Zilla::Plugin::NextRelease
name: '@DOY/NextRelease'
- version: 4.102340
+ version: 4.102342
-
class: Dist::Zilla::Plugin::CheckChangesHasContent
name: '@DOY/CheckChangesHasContent'
@@ -92,15 +92,15 @@
-
class: Dist::Zilla::Plugin::PkgVersion
name: '@DOY/PkgVersion'
- version: 4.102340
+ version: 4.102342
-
class: Dist::Zilla::Plugin::PodCoverageTests
name: '@DOY/PodCoverageTests'
- version: 4.102340
+ version: 4.102342
-
class: Dist::Zilla::Plugin::PodSyntaxTests
name: '@DOY/PodSyntaxTests'
- version: 4.102340
+ version: 4.102342
-
class: Dist::Zilla::Plugin::NoTabsTests
name: '@DOY/NoTabsTests'
@@ -136,41 +136,41 @@
-
class: Dist::Zilla::Plugin::UploadToCPAN
name: '@DOY/UploadToCPAN'
- version: 4.102340
+ version: 4.102342
-
- class: Dist::Zilla::Plugin::Prereq
+ class: Dist::Zilla::Plugin::Prereqs
config:
Dist::Zilla::Plugin::Prereqs:
phase: runtime
type: requires
- name: Prereq
- version: 4.102340
+ name: Prereqs
+ version: 4.102342
-
- class: Dist::Zilla::Plugin::Prereq
+ class: Dist::Zilla::Plugin::Prereqs
config:
Dist::Zilla::Plugin::Prereqs:
phase: test
type: requires
name: TestRequires
- version: 4.102340
+ version: 4.102342
-
class: Dist::Zilla::Plugin::FinderCode
name: ':InstallModules'
- version: 4.102340
+ version: 4.102342
-
class: Dist::Zilla::Plugin::FinderCode
name: ':TestFiles'
- version: 4.102340
+ version: 4.102342
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExecFiles'
- version: 4.102340
+ version: 4.102342
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ShareFiles'
- version: 4.102340
+ version: 4.102342
zilla:
class: Dist::Zilla::Dist::Builder
config:
is_trial: 0
- version: 4.102340
+ version: 4.102342
Modified: branches/upstream/libpackage-stash-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpackage-stash-perl/current/Makefile.PL?rev=64661&op=diff
==============================================================================
--- branches/upstream/libpackage-stash-perl/current/Makefile.PL (original)
+++ branches/upstream/libpackage-stash-perl/current/Makefile.PL Sun Nov 7 12:14:02 2010
@@ -1,18 +1,17 @@
+# This Makefile.PL for was generated by Dist::Zilla.
+# Don't edit it but the dist.ini used to construct it.
use strict;
use warnings;
-
-
-
use ExtUtils::MakeMaker 6.31;
-
+check_conflicts();
my %WriteMakefileArgs = (
'ABSTRACT' => 'routines for manipulating stashes',
'AUTHOR' => 'Jesse Luehrs <doy at tozt dot net>',
'BUILD_REQUIRES' => {
- 'Test::Exception' => '0',
+ 'Test::Fatal' => '0',
'Test::More' => '0.88'
},
'CONFIGURE_REQUIRES' => {
@@ -25,7 +24,7 @@
'PREREQ_PM' => {
'Scalar::Util' => '0'
},
- 'VERSION' => '0.08',
+ 'VERSION' => '0.13',
'test' => {
'TESTS' => 't/*.t'
}
@@ -50,5 +49,40 @@
WriteMakefile(%WriteMakefileArgs);
+sub check_conflicts {
+ my %conflicts = (
+ # 'Class::MOP' => '1.08',
+ # 'MooseX::Role::WithOverloading' => '0.08',
+ );
+ my $found = 0;
+ for my $mod ( sort keys %conflicts ) {
+ eval "require $mod";
+ next if $@;
+ my $installed = $mod->VERSION();
+ if ( $installed le $conflicts{$mod} ) {
+ print <<"EOF";
+
+***
+ This version of Package::Stash conflicts with the version of
+ $mod ($installed) you have installed.
+
+ You will need to upgrade $mod after installing
+ this version of Package::Stash.
+***
+
+EOF
+
+ $found = 1;
+ }
+ }
+
+ return unless $found;
+
+ # More or less copied from Module::Build
+ return if $ENV{PERL_MM_USE_DEFAULT};
+ return unless -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT));
+
+ sleep 4;
+}
Modified: branches/upstream/libpackage-stash-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpackage-stash-perl/current/README?rev=64661&op=diff
==============================================================================
--- branches/upstream/libpackage-stash-perl/current/README (original)
+++ branches/upstream/libpackage-stash-perl/current/README Sun Nov 7 12:14:02 2010
@@ -1,7 +1,7 @@
This archive contains the distribution Package-Stash,
-version 0.08:
+version 0.13:
routines for manipulating stashes
Modified: branches/upstream/libpackage-stash-perl/current/dist.ini
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpackage-stash-perl/current/dist.ini?rev=64661&op=diff
==============================================================================
--- branches/upstream/libpackage-stash-perl/current/dist.ini (original)
+++ branches/upstream/libpackage-stash-perl/current/dist.ini Sun Nov 7 12:14:02 2010
@@ -4,11 +4,13 @@
copyright_holder = Jesse Luehrs
[@DOY]
+:version = 0.05
dist = Package-Stash
+awesome = =inc::MMPackageStash
-[Prereq]
+[Prereqs]
Scalar::Util = 0
-[Prereq / TestRequires]
-Test::Exception = 0
+[Prereqs / TestRequires]
+Test::Fatal = 0
Test::More = 0.88
Added: branches/upstream/libpackage-stash-perl/current/inc/MMPackageStash.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpackage-stash-perl/current/inc/MMPackageStash.pm?rev=64661&op=file
==============================================================================
--- branches/upstream/libpackage-stash-perl/current/inc/MMPackageStash.pm (added)
+++ branches/upstream/libpackage-stash-perl/current/inc/MMPackageStash.pm Sun Nov 7 12:14:02 2010
@@ -1,0 +1,60 @@
+package inc::MMPackageStash;
+use Moose;
+
+extends 'Dist::Zilla::Plugin::MakeMaker::Awesome';
+
+# XXX: this is pretty gross, it should be possible to clean this up later
+around _build_MakeFile_PL_template => sub {
+ my $orig = shift;
+ my $self = shift;
+ my $template = $self->$orig(@_);
+
+ $template =~ s/(use ExtUtils::MakeMaker.*)/$1\n\ncheck_conflicts();/;
+
+ $template .= <<'CHECK_CONFLICTS';
+sub check_conflicts {
+ my %conflicts = (
+ # 'Class::MOP' => '1.08',
+ # 'MooseX::Role::WithOverloading' => '0.08',
+ );
+ my $found = 0;
+ for my $mod ( sort keys %conflicts ) {
+ eval "require $mod";
+ next if $@;
+
+ my $installed = $mod->VERSION();
+ if ( $installed le $conflicts{$mod} ) {
+
+ print <<"EOF";
+
+***
+ This version of Package::Stash conflicts with the version of
+ $mod ($installed) you have installed.
+
+ You will need to upgrade $mod after installing
+ this version of Package::Stash.
+***
+
+EOF
+
+ $found = 1;
+ }
+ }
+
+ return unless $found;
+
+ # More or less copied from Module::Build
+ return if $ENV{PERL_MM_USE_DEFAULT};
+ return unless -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT));
+
+ sleep 4;
+}
+CHECK_CONFLICTS
+
+ return $template;
+};
+
+__PACKAGE__->meta->make_immutable;
+no Moose;
+
+1;
Modified: branches/upstream/libpackage-stash-perl/current/lib/Package/Stash.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpackage-stash-perl/current/lib/Package/Stash.pm?rev=64661&op=diff
==============================================================================
--- branches/upstream/libpackage-stash-perl/current/lib/Package/Stash.pm (original)
+++ branches/upstream/libpackage-stash-perl/current/lib/Package/Stash.pm Sun Nov 7 12:14:02 2010
@@ -1,6 +1,6 @@
package Package::Stash;
BEGIN {
- $Package::Stash::VERSION = '0.08';
+ $Package::Stash::VERSION = '0.13';
}
use strict;
use warnings;
@@ -295,7 +295,7 @@
=head1 VERSION
-version 0.08
+version 0.13
=head1 SYNOPSIS
Modified: branches/upstream/libpackage-stash-perl/current/t/01-basic.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpackage-stash-perl/current/t/01-basic.t?rev=64661&op=diff
==============================================================================
--- branches/upstream/libpackage-stash-perl/current/t/01-basic.t (original)
+++ branches/upstream/libpackage-stash-perl/current/t/01-basic.t Sun Nov 7 12:14:02 2010
@@ -2,11 +2,11 @@
use warnings;
use Test::More;
-use Test::Exception;
+use Test::Fatal;
use Package::Stash;
-dies_ok { Package::Stash->name } q{... can't call name() as a class method};
+ok(exception { Package::Stash->name }, q{... can't call name() as a class method});
{
package Foo;
@@ -22,9 +22,9 @@
ok(!$foo_stash->has_package_symbol('%foo'), '... the object agrees');
ok(!defined($Foo::{foo}), '... checking doesn\' vivify');
-lives_ok {
+ok(!exception {
$foo_stash->add_package_symbol('%foo' => { one => 1 });
-} '... created %Foo::foo successfully';
+}, '... created %Foo::foo successfully');
# ... scalar should NOT be created here
@@ -63,9 +63,9 @@
ok(!defined($Foo::{bar}), '... the @bar slot has not been created yet');
-lives_ok {
+ok(!exception {
$foo_stash->add_package_symbol('@bar' => [ 1, 2, 3 ]);
-} '... created @Foo::bar successfully';
+}, '... created @Foo::bar successfully');
ok(defined($Foo::{bar}), '... the @bar slot was created successfully');
ok($foo_stash->has_package_symbol('@bar'), '... the meta agrees');
@@ -89,9 +89,9 @@
ok(!defined($Foo::{baz}), '... the $baz slot has not been created yet');
-lives_ok {
+ok(!exception {
$foo_stash->add_package_symbol('$baz' => 10);
-} '... created $Foo::baz successfully';
+}, '... created $Foo::baz successfully');
ok(defined($Foo::{baz}), '... the $baz slot was created successfully');
ok($foo_stash->has_package_symbol('$baz'), '... the meta agrees');
@@ -115,9 +115,9 @@
ok(!defined($Foo::{funk}), '... the &funk slot has not been created yet');
-lives_ok {
+ok(!exception {
$foo_stash->add_package_symbol('&funk' => sub { "Foo::funk" });
-} '... created &Foo::funk successfully';
+}, '... created &Foo::funk successfully');
ok(defined($Foo::{funk}), '... the &funk slot was created successfully');
ok($foo_stash->has_package_symbol('&funk'), '... the meta agrees');
@@ -139,23 +139,23 @@
my $ARRAY = [ 1, 2, 3 ];
my $CODE = sub { "Foo::foo" };
-lives_ok {
+ok(!exception {
$foo_stash->add_package_symbol('@foo' => $ARRAY);
-} '... created @Foo::foo successfully';
+}, '... created @Foo::foo successfully');
ok($foo_stash->has_package_symbol('@foo'), '... the @foo slot was added successfully');
is($foo_stash->get_package_symbol('@foo'), $ARRAY, '... got the right values for @Foo::foo');
-lives_ok {
+ok(!exception {
$foo_stash->add_package_symbol('&foo' => $CODE);
-} '... created &Foo::foo successfully';
+}, '... created &Foo::foo successfully');
ok($foo_stash->has_package_symbol('&foo'), '... the meta agrees');
is($foo_stash->get_package_symbol('&foo'), $CODE, '... got the right value for &Foo::foo');
-lives_ok {
+ok(!exception {
$foo_stash->add_package_symbol('$foo' => 'Foo::foo');
-} '... created $Foo::foo successfully';
+}, '... created $Foo::foo successfully');
ok($foo_stash->has_package_symbol('$foo'), '... the meta agrees');
my $SCALAR = $foo_stash->get_package_symbol('$foo');
@@ -166,9 +166,9 @@
is(${'Foo::foo'}, 'Foo::foo', '... got the right value from the scalar');
}
-lives_ok {
+ok(!exception {
$foo_stash->remove_package_symbol('%foo');
-} '... removed %Foo::foo successfully';
+}, '... removed %Foo::foo successfully');
ok(!$foo_stash->has_package_symbol('%foo'), '... the %foo slot was removed successfully');
ok($foo_stash->has_package_symbol('@foo'), '... the @foo slot still exists');
@@ -187,9 +187,9 @@
ok(defined(${"Foo::foo"}), '... the $foo slot has NOT been removed');
}
-lives_ok {
+ok(!exception {
$foo_stash->remove_package_symbol('&foo');
-} '... removed &Foo::foo successfully';
+}, '... removed &Foo::foo successfully');
ok(!$foo_stash->has_package_symbol('&foo'), '... the &foo slot no longer exists');
@@ -207,9 +207,9 @@
ok(defined(${"Foo::foo"}), '... the $foo slot has NOT been removed');
}
-lives_ok {
+ok(!exception {
$foo_stash->remove_package_symbol('$foo');
-} '... removed $Foo::foo successfully';
+}, '... removed $Foo::foo successfully');
ok(!$foo_stash->has_package_symbol('$foo'), '... the $foo slot no longer exists');
@@ -227,26 +227,26 @@
# check some errors
-dies_ok {
+ok(exception {
$foo_stash->add_package_symbol('@bar', {})
-} "can't initialize a slot with the wrong type of value";
-
-dies_ok {
+}, "can't initialize a slot with the wrong type of value");
+
+ok(exception {
$foo_stash->add_package_symbol('bar', [])
-} "can't initialize a slot with the wrong type of value";
-
-dies_ok {
+}, "can't initialize a slot with the wrong type of value");
+
+ok(exception {
$foo_stash->add_package_symbol('$bar', sub { })
-} "can't initialize a slot with the wrong type of value";
+}, "can't initialize a slot with the wrong type of value");
{
package Bar;
open *foo, '<', $0;
}
-dies_ok {
+ok(exception {
$foo_stash->add_package_symbol('$bar', *Bar::foo{IO})
-} "can't initialize a slot with the wrong type of value";
+}, "can't initialize a slot with the wrong type of value");
# check compile time manipulation
Modified: branches/upstream/libpackage-stash-perl/current/t/02-extension.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpackage-stash-perl/current/t/02-extension.t?rev=64661&op=diff
==============================================================================
--- branches/upstream/libpackage-stash-perl/current/t/02-extension.t (original)
+++ branches/upstream/libpackage-stash-perl/current/t/02-extension.t Sun Nov 7 12:14:02 2010
@@ -2,7 +2,7 @@
use warnings;
use Test::More;
-use Test::Exception;
+use Test::Fatal;
{
package My::Package::Stash;
@@ -40,9 +40,9 @@
ok(!defined($Foo::{foo}), '... the %foo slot has not been created yet');
ok(!$foo_stash->has_package_symbol('%foo'), '... the foo_stash agrees');
-lives_ok {
+ok(!exception {
$foo_stash->add_package_symbol('%foo' => { one => 1 });
-} '... the %foo symbol is created succcessfully';
+}, '... the %foo symbol is created succcessfully');
ok(!defined($Foo::{foo}), '... the %foo slot has not been created in the actual Foo package');
ok($foo_stash->has_package_symbol('%foo'), '... the foo_stash agrees');
@@ -56,17 +56,17 @@
ok(!defined($Foo::{bar}), '... the @bar slot has not been created yet');
-lives_ok {
+ok(!exception {
$foo_stash->add_package_symbol('@bar' => [ 1, 2, 3 ]);
-} '... created @Foo::bar successfully';
+}, '... created @Foo::bar successfully');
ok(!defined($Foo::{bar}), '... the @bar slot has still not been created');
ok(!defined($Foo::{baz}), '... the %baz slot has not been created yet');
-lives_ok {
+ok(!exception {
$foo_stash->add_package_symbol('%baz');
-} '... created %Foo::baz successfully';
+}, '... created %Foo::baz successfully');
ok(!defined($Foo::{baz}), '... the %baz slot has still not been created');
Modified: branches/upstream/libpackage-stash-perl/current/t/03-io.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpackage-stash-perl/current/t/03-io.t?rev=64661&op=diff
==============================================================================
--- branches/upstream/libpackage-stash-perl/current/t/03-io.t (original)
+++ branches/upstream/libpackage-stash-perl/current/t/03-io.t Sun Nov 7 12:14:02 2010
@@ -2,7 +2,7 @@
use strict;
use warnings;
use Test::More;
-use Test::Exception;
+use Test::Fatal;
{
package Foo;
@@ -40,9 +40,9 @@
{
my $stash = Package::Stash->new('Baz');
- lives_ok {
+ ok(!exception {
$stash->add_package_symbol('baz', *Foo::foo{IO});
- } "can add an IO symbol";
+ }, "can add an IO symbol");
ok($stash->has_package_symbol('baz'), "has baz");
is($stash->get_package_symbol('baz'), *Foo::foo{IO}, "got the right baz");
}
Modified: branches/upstream/libpackage-stash-perl/current/t/06-addsub.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpackage-stash-perl/current/t/06-addsub.t?rev=64661&op=diff
==============================================================================
--- branches/upstream/libpackage-stash-perl/current/t/06-addsub.t (original)
+++ branches/upstream/libpackage-stash-perl/current/t/06-addsub.t Sun Nov 7 12:14:02 2010
@@ -2,7 +2,7 @@
use warnings;
use Test::More;
-use Test::Exception;
+use Test::Fatal;
BEGIN { $^P |= 0x210 } # PERLDBf_SUBLINE
@@ -15,9 +15,9 @@
ok(!defined($Foo::{funk}), '... the &funk slot has not been created yet');
-lives_ok {
+ok(!exception {
$foo_stash->add_package_symbol('&funk' => sub { "Foo::funk", __LINE__ });
-} '... created &Foo::funk successfully';
+}, '... created &Foo::funk successfully');
ok(defined($Foo::{funk}), '... the &funk slot was created successfully');
More information about the Pkg-perl-cvs-commits
mailing list