r65540 - in /trunk/libmoosex-types-set-object-perl: ./ debian/ debian/source/ lib/MooseX/Types/Set/ t/
ansgar at users.alioth.debian.org
ansgar at users.alioth.debian.org
Sun Dec 5 11:21:38 UTC 2010
Author: ansgar
Date: Sun Dec 5 11:21:22 2010
New Revision: 65540
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=65540
Log:
* New upstream release.
* Build-dep on libtest-fatal-perl instead of libtest-exception-perl.
* Use source format 3.0 (quilt).
* debian/copyright: Update for new upstream release, formatting changes.
* Bump Standards-Version to 3.9.1.
* Add myself to Uploaders.
Added:
trunk/libmoosex-types-set-object-perl/Changes
- copied unchanged from r65539, branches/upstream/libmoosex-types-set-object-perl/current/Changes
trunk/libmoosex-types-set-object-perl/LICENSE
- copied unchanged from r65539, branches/upstream/libmoosex-types-set-object-perl/current/LICENSE
trunk/libmoosex-types-set-object-perl/META.json
- copied unchanged from r65539, branches/upstream/libmoosex-types-set-object-perl/current/META.json
trunk/libmoosex-types-set-object-perl/README
- copied unchanged from r65539, branches/upstream/libmoosex-types-set-object-perl/current/README
trunk/libmoosex-types-set-object-perl/debian/source/
trunk/libmoosex-types-set-object-perl/debian/source/format
trunk/libmoosex-types-set-object-perl/dist.ini
- copied unchanged from r65539, branches/upstream/libmoosex-types-set-object-perl/current/dist.ini
trunk/libmoosex-types-set-object-perl/t/release-eol.t
- copied unchanged from r65539, branches/upstream/libmoosex-types-set-object-perl/current/t/release-eol.t
trunk/libmoosex-types-set-object-perl/t/release-no-tabs.t
- copied unchanged from r65539, branches/upstream/libmoosex-types-set-object-perl/current/t/release-no-tabs.t
trunk/libmoosex-types-set-object-perl/t/release-pod-coverage.t
- copied unchanged from r65539, branches/upstream/libmoosex-types-set-object-perl/current/t/release-pod-coverage.t
trunk/libmoosex-types-set-object-perl/t/release-pod-syntax.t
- copied unchanged from r65539, branches/upstream/libmoosex-types-set-object-perl/current/t/release-pod-syntax.t
Removed:
trunk/libmoosex-types-set-object-perl/MANIFEST.SKIP
trunk/libmoosex-types-set-object-perl/SIGNATURE
Modified:
trunk/libmoosex-types-set-object-perl/MANIFEST
trunk/libmoosex-types-set-object-perl/META.yml
trunk/libmoosex-types-set-object-perl/Makefile.PL
trunk/libmoosex-types-set-object-perl/debian/changelog
trunk/libmoosex-types-set-object-perl/debian/control
trunk/libmoosex-types-set-object-perl/debian/copyright
trunk/libmoosex-types-set-object-perl/lib/MooseX/Types/Set/Object.pm
trunk/libmoosex-types-set-object-perl/t/basic.t
Modified: trunk/libmoosex-types-set-object-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-types-set-object-perl/MANIFEST?rev=65540&op=diff
==============================================================================
--- trunk/libmoosex-types-set-object-perl/MANIFEST (original)
+++ trunk/libmoosex-types-set-object-perl/MANIFEST Sun Dec 5 11:21:22 2010
@@ -1,7 +1,14 @@
+Changes
+LICENSE
+MANIFEST
+META.json
+META.yml
+Makefile.PL
+README
+dist.ini
lib/MooseX/Types/Set/Object.pm
-Makefile.PL
-MANIFEST This list of files
-MANIFEST.SKIP
t/basic.t
-META.yml Module meta-data (added by MakeMaker)
-SIGNATURE Public-key signature (added by MakeMaker)
+t/release-eol.t
+t/release-no-tabs.t
+t/release-pod-coverage.t
+t/release-pod-syntax.t
Modified: trunk/libmoosex-types-set-object-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-types-set-object-perl/META.yml?rev=65540&op=diff
==============================================================================
--- trunk/libmoosex-types-set-object-perl/META.yml (original)
+++ trunk/libmoosex-types-set-object-perl/META.yml Sun Dec 5 11:21:22 2010
@@ -1,17 +1,162 @@
---- #YAML:1.0
-name: MooseX-Types-Set-Object
-version: 0.02
-abstract: ~
-license: ~
-author: ~
-generated_by: ExtUtils::MakeMaker version 6.44
-distribution_type: module
-requires:
- Moose: 0.50
- MooseX::Types: 0
- Set::Object: 0
- Test::Exception: 0
- Test::use::ok: 0
+---
+abstract: 'Set::Object type with coercions and stuff.'
+author:
+ - 'Yuval Kogman <nothingmuch at woobling.org>'
+build_requires:
+ Test::Fatal: 0
+ Test::More: 0
+ Test::use::ok: 0
+configure_requires:
+ ExtUtils::MakeMaker: 6.31
+dynamic_config: 0
+generated_by: 'Dist::Zilla version 4.102345, CPAN::Meta::Converter version 2.102400'
+license: perl
meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.3.html
- version: 1.3
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
+name: MooseX-Types-Set-Object
+requires:
+ Moose: 0.50
+ MooseX::Types: 0
+ Set::Object: 0
+resources:
+ bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Types-Set-Object
+ homepage: http://search.cpan.org/dist/MooseX-Types-Set-Object
+ repository: git://github.com/rafl/moosex-types-set-object.git
+version: 0.03
+x_Dist_Zilla:
+ plugins:
+ -
+ class: Dist::Zilla::Plugin::GatherDir
+ name: '@FLORA/@Basic/GatherDir'
+ version: 4.102345
+ -
+ class: Dist::Zilla::Plugin::PruneCruft
+ name: '@FLORA/@Basic/PruneCruft'
+ version: 4.102345
+ -
+ class: Dist::Zilla::Plugin::ManifestSkip
+ name: '@FLORA/@Basic/ManifestSkip'
+ version: 4.102345
+ -
+ class: Dist::Zilla::Plugin::MetaYAML
+ name: '@FLORA/@Basic/MetaYAML'
+ version: 4.102345
+ -
+ class: Dist::Zilla::Plugin::License
+ name: '@FLORA/@Basic/License'
+ version: 4.102345
+ -
+ class: Dist::Zilla::Plugin::Readme
+ name: '@FLORA/@Basic/Readme'
+ version: 4.102345
+ -
+ class: Dist::Zilla::Plugin::ExtraTests
+ name: '@FLORA/@Basic/ExtraTests'
+ version: 4.102345
+ -
+ class: Dist::Zilla::Plugin::ExecDir
+ name: '@FLORA/@Basic/ExecDir'
+ version: 4.102345
+ -
+ class: Dist::Zilla::Plugin::ShareDir
+ name: '@FLORA/@Basic/ShareDir'
+ version: 4.102345
+ -
+ class: Dist::Zilla::Plugin::MakeMaker
+ name: '@FLORA/@Basic/MakeMaker'
+ version: 4.102345
+ -
+ class: Dist::Zilla::Plugin::Manifest
+ name: '@FLORA/@Basic/Manifest'
+ version: 4.102345
+ -
+ class: Dist::Zilla::Plugin::TestRelease
+ name: '@FLORA/@Basic/TestRelease'
+ version: 4.102345
+ -
+ class: Dist::Zilla::Plugin::ConfirmRelease
+ name: '@FLORA/@Basic/ConfirmRelease'
+ version: 4.102345
+ -
+ class: Dist::Zilla::Plugin::UploadToCPAN
+ name: '@FLORA/@Basic/UploadToCPAN'
+ version: 4.102345
+ -
+ class: Dist::Zilla::Plugin::MetaConfig
+ name: '@FLORA/MetaConfig'
+ version: 4.102345
+ -
+ class: Dist::Zilla::Plugin::MetaJSON
+ name: '@FLORA/MetaJSON'
+ version: 4.102345
+ -
+ class: Dist::Zilla::Plugin::PkgVersion
+ name: '@FLORA/PkgVersion'
+ version: 4.102345
+ -
+ class: Dist::Zilla::Plugin::PodSyntaxTests
+ name: '@FLORA/PodSyntaxTests'
+ version: 4.102345
+ -
+ class: Dist::Zilla::Plugin::NoTabsTests
+ name: '@FLORA/NoTabsTests'
+ version: 0.01
+ -
+ class: Dist::Zilla::Plugin::PodCoverageTests
+ name: '@FLORA/PodCoverageTests'
+ version: 4.102345
+ -
+ class: Dist::Zilla::Plugin::MetaResources
+ name: '@FLORA/MetaResources'
+ version: 4.102345
+ -
+ class: Dist::Zilla::Plugin::Authority
+ name: '@FLORA/Authority'
+ version: 1.000
+ -
+ class: Dist::Zilla::Plugin::EOLTests
+ name: '@FLORA/EOLTests'
+ version: 0.02
+ -
+ class: Dist::Zilla::Plugin::PodWeaver
+ name: '@FLORA/PodWeaver'
+ version: 3.101641
+ -
+ class: Dist::Zilla::Plugin::Prereqs
+ config:
+ Dist::Zilla::Plugin::Prereqs:
+ phase: runtime
+ type: requires
+ name: Prereqs
+ version: 4.102345
+ -
+ class: Dist::Zilla::Plugin::Prereqs
+ config:
+ Dist::Zilla::Plugin::Prereqs:
+ phase: test
+ type: requires
+ name: TestRequires
+ version: 4.102345
+ -
+ class: Dist::Zilla::Plugin::FinderCode
+ name: ':InstallModules'
+ version: 4.102345
+ -
+ class: Dist::Zilla::Plugin::FinderCode
+ name: ':TestFiles'
+ version: 4.102345
+ -
+ class: Dist::Zilla::Plugin::FinderCode
+ name: ':ExecFiles'
+ version: 4.102345
+ -
+ class: Dist::Zilla::Plugin::FinderCode
+ name: ':ShareFiles'
+ version: 4.102345
+ zilla:
+ class: Dist::Zilla::Dist::Builder
+ config:
+ is_trial: 0
+ version: 4.102345
+x_authority: cpan:NUFFIN
Modified: trunk/libmoosex-types-set-object-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-types-set-object-perl/Makefile.PL?rev=65540&op=diff
==============================================================================
--- trunk/libmoosex-types-set-object-perl/Makefile.PL (original)
+++ trunk/libmoosex-types-set-object-perl/Makefile.PL Sun Dec 5 11:21:22 2010
@@ -1,21 +1,57 @@
-#!/usr/bin/perl -w
use strict;
+use warnings;
-use ExtUtils::MakeMaker;
-WriteMakefile(
- NAME => 'MooseX::Types::Set::Object',
- VERSION_FROM => 'lib/MooseX/Types/Set/Object.pm',
- INSTALLDIRS => 'site',
- SIGN => 1,
- PL_FILES => { },
- PREREQ_PM => {
- 'Moose' => '0.50', # class_type
- 'Set::Object' => 0,
- 'MooseX::Types' => 0,
- 'Test::use::ok' => 0,
- 'Test::Exception' => 0,
- },
+
+use ExtUtils::MakeMaker 6.31;
+
+
+
+my %WriteMakefileArgs = (
+ 'ABSTRACT' => 'Set::Object type with coercions and stuff.',
+ 'AUTHOR' => 'Yuval Kogman <nothingmuch at woobling.org>',
+ 'BUILD_REQUIRES' => {
+ 'Test::Fatal' => '0',
+ 'Test::More' => '0',
+ 'Test::use::ok' => '0'
+ },
+ 'CONFIGURE_REQUIRES' => {
+ 'ExtUtils::MakeMaker' => '6.31'
+ },
+ 'DISTNAME' => 'MooseX-Types-Set-Object',
+ 'EXE_FILES' => [],
+ 'LICENSE' => 'perl',
+ 'NAME' => 'MooseX::Types::Set::Object',
+ 'PREREQ_PM' => {
+ 'Moose' => '0.50',
+ 'MooseX::Types' => '0',
+ 'Set::Object' => '0'
+ },
+ 'VERSION' => '0.03',
+ 'test' => {
+ 'TESTS' => 't/*.t'
+ }
);
+
+unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) {
+ my $br = delete $WriteMakefileArgs{BUILD_REQUIRES};
+ my $pp = $WriteMakefileArgs{PREREQ_PM};
+ for my $mod ( keys %$br ) {
+ if ( exists $pp->{$mod} ) {
+ $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod};
+ }
+ else {
+ $pp->{$mod} = $br->{$mod};
+ }
+ }
+}
+
+delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
+ unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
+
+WriteMakefile(%WriteMakefileArgs);
+
+
+
Modified: trunk/libmoosex-types-set-object-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-types-set-object-perl/debian/changelog?rev=65540&op=diff
==============================================================================
--- trunk/libmoosex-types-set-object-perl/debian/changelog (original)
+++ trunk/libmoosex-types-set-object-perl/debian/changelog Sun Dec 5 11:21:22 2010
@@ -1,4 +1,4 @@
-libmoosex-types-set-object-perl (0.02-2) UNRELEASED; urgency=low
+libmoosex-types-set-object-perl (0.03-1) unstable; urgency=low
[ Nathan Handler ]
* debian/watch: Update to ignore development releases.
@@ -12,7 +12,15 @@
* Update jawnsy's email address
* Update ryan52's email address
- -- Ryan Niebur <ryan at debian.org> Fri, 25 Sep 2009 00:25:40 -0700
+ [ Ansgar Burchardt ]
+ * New upstream release.
+ * Build-dep on libtest-fatal-perl instead of libtest-exception-perl.
+ * Use source format 3.0 (quilt).
+ * debian/copyright: Update for new upstream release, formatting changes.
+ * Bump Standards-Version to 3.9.1.
+ * Add myself to Uploaders.
+
+ -- Ansgar Burchardt <ansgar at debian.org> Sun, 05 Dec 2010 12:21:10 +0100
libmoosex-types-set-object-perl (0.02-1) unstable; urgency=low
Modified: trunk/libmoosex-types-set-object-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-types-set-object-perl/debian/control?rev=65540&op=diff
==============================================================================
--- trunk/libmoosex-types-set-object-perl/debian/control (original)
+++ trunk/libmoosex-types-set-object-perl/debian/control Sun Dec 5 11:21:22 2010
@@ -2,12 +2,13 @@
Section: perl
Priority: optional
Build-Depends: debhelper (>= 7)
-Build-Depends-Indep: perl, libtest-exception-perl,
+Build-Depends-Indep: perl, libtest-fatal-perl,
libmoosex-types-perl, libset-object-perl, libtest-use-ok-perl,
libmoose-perl (>= 0.50)
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
-Uploaders: Jonathan Yu <jawnsy at cpan.org>, Ryan Niebur <ryan at debian.org>
-Standards-Version: 3.8.1
+Uploaders: Jonathan Yu <jawnsy at cpan.org>, Ryan Niebur <ryan at debian.org>,
+ Ansgar Burchardt <ansgar at debian.org>
+Standards-Version: 3.9.1
Homepage: http://search.cpan.org/dist/MooseX-Types-Set-Object/
Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libmoosex-types-set-object-perl/
Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libmoosex-types-set-object-perl/
Modified: trunk/libmoosex-types-set-object-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-types-set-object-perl/debian/copyright?rev=65540&op=diff
==============================================================================
--- trunk/libmoosex-types-set-object-perl/debian/copyright (original)
+++ trunk/libmoosex-types-set-object-perl/debian/copyright Sun Dec 5 11:21:22 2010
@@ -1,29 +1,30 @@
-Format-Specification:
- http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196
-Upstream-Maintainer: Yuval Kogman <nothingmuch at woobling.org>
-Upstream-Source: http://search.cpan.org/dist/MooseX-Types-Set-Object/
-Upstream-Name: MooseX-Types-Set-Object
+Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135
+Maintainer: Yuval Kogman <nothingmuch at woobling.org>
+Source: http://search.cpan.org/dist/MooseX-Types-Set-Object/
+Name: MooseX-Types-Set-Object
Files: *
-Copyright: 2008, Yuval Kogman <nothingmuch at woobling.org>
-License-Alias: Perl
-License: Artistic | GPL-1+
+Copyright: 2010, Yuval Kogman <nothingmuch at woobling.org>
+License: Artistic or GPL-1+
Files: debian/*
-Copyright: 2009, Jonathan Yu <jawnsy at cpan.org>
+Copyright:
+ 2009, Jonathan Yu <jawnsy at cpan.org>
2009, Ryan Niebur <ryan at debian.org>
-License: Artistic | GPL-1+
+License: Artistic or GPL-1+
License: Artistic
- This program is free software; you can redistribute it and/or modify
- it under the terms of the Artistic License, which comes with Perl.
- On Debian GNU/Linux systems, the complete text of the Artistic License
- can be found in `/usr/share/common-licenses/Artistic'
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the Artistic License, which comes with Perl.
+ .
+ On Debian systems, the complete text of the Artistic License can be
+ found in `/usr/share/common-licenses/Artistic'.
License: GPL-1+
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 1, or (at your option)
- any later version.
- On Debian GNU/Linux systems, the complete text of the GNU General
- Public License can be found in `/usr/share/common-licenses/GPL'
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 1, or (at your option)
+ any later version.
+ .
+ On Debian systems, the complete text of version 1 of the GNU General
+ Public License can be found in `/usr/share/common-licenses/GPL-1'.
Added: trunk/libmoosex-types-set-object-perl/debian/source/format
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-types-set-object-perl/debian/source/format?rev=65540&op=file
==============================================================================
--- trunk/libmoosex-types-set-object-perl/debian/source/format (added)
+++ trunk/libmoosex-types-set-object-perl/debian/source/format Sun Dec 5 11:21:22 2010
@@ -1,0 +1,1 @@
+3.0 (quilt)
Modified: trunk/libmoosex-types-set-object-perl/lib/MooseX/Types/Set/Object.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-types-set-object-perl/lib/MooseX/Types/Set/Object.pm?rev=65540&op=diff
==============================================================================
--- trunk/libmoosex-types-set-object-perl/lib/MooseX/Types/Set/Object.pm (original)
+++ trunk/libmoosex-types-set-object-perl/lib/MooseX/Types/Set/Object.pm Sun Dec 5 11:21:22 2010
@@ -1,34 +1,36 @@
-#!/usr/bin/perl
+package MooseX::Types::Set::Object;
+BEGIN {
+ $MooseX::Types::Set::Object::AUTHORITY = 'cpan:NUFFIN';
+}
+BEGIN {
+ $MooseX::Types::Set::Object::VERSION = '0.03';
+}
+# ABSTRACT: Set::Object type with coercions and stuff.
-package MooseX::Types::Set::Object;
-use base qw(MooseX::Types::Base);
-use strict;
-use warnings;
-
-our $VERSION = "0.02";
+use MooseX::Types;
+use MooseX::Types::Moose qw(Object ArrayRef);
use Set::Object ();
use Scalar::Util ();
-use MooseX::Types;
-use MooseX::Types::Moose qw(Object ArrayRef);
-
-class_type "Set::Object"; # FIXME parametrizable
+class_type "Set::Object"; # FIXME parameterizable
coerce "Set::Object",
- from ArrayRef,
- via { Set::Object->new(@$_) };
+ from ArrayRef,
+ via { Set::Object->new(@$_) };
coerce ArrayRef,
- from "Set::Object",
- via { $_->members };
+ from "Set::Object",
+ via { [$_->members] };
-__PACKAGE__
+1;
+
__END__
+=pod
-=pod
+=encoding utf-8
=head1 NAME
@@ -36,28 +38,28 @@
=head1 SYNOPSIS
- package Foo;
- use Moose;
+ package Foo;
+ use Moose;
- use MooseX::Types::Set::Object;
+ use MooseX::Types::Set::Object;
- has children => (
- isa => "Set::Object",
- accessor => "transition_set",
- coerce => 1, # also accept array refs
- handles => {
- children => "members",
- add_child => "insert",
- remove_child => "remove",
- # See Set::Object for all the methods you could delegate
- },
- );
+ has children => (
+ isa => "Set::Object",
+ accessor => "transition_set",
+ coerce => 1, # also accept array refs
+ handles => {
+ children => "members",
+ add_child => "insert",
+ remove_child => "remove",
+ # See Set::Object for all the methods you could delegate
+ },
+ );
- # ...
+ # ...
- my $foo = Foo->new( children => [ @objects ] );
+ my $foo = Foo->new( children => [ @objects ] );
- $foo->add_child( $obj );
+ $foo->add_child( $obj );
=head1 DESCRIPTION
@@ -80,20 +82,16 @@
L<Set::Object>, L<MooseX::AttributeHandlers>, L<MooseX::Types>,
L<Moose::Util::TypeConstraints>
-=head1 VERSION CONTROL
-
-This module is maintained using Darcs. You can get the latest version from
-L<http://nothingmuch.woobling.org/code>, and use C<darcs send> to commit
-changes.
-
=head1 AUTHOR
-Yuval Kogman E<lt>nothingmuch at woobling.orgE<gt>
+Yuval Kogman <nothingmuch at woobling.org>
-=head1 COPYRIGHT
+=head1 COPYRIGHT AND LICENSE
- Copyright (c) 2008 Yuval Kogman. All rights reserved
- This program is free software; you can redistribute
- it and/or modify it under the same terms as Perl itself.
+This software is copyright (c) 2010 by Yuval Kogman.
+
+This is free software; you can redistribute it and/or modify it under
+the same terms as the Perl 5 programming language system itself.
=cut
+
Modified: trunk/libmoosex-types-set-object-perl/t/basic.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-types-set-object-perl/t/basic.t?rev=65540&op=diff
==============================================================================
--- trunk/libmoosex-types-set-object-perl/t/basic.t (original)
+++ trunk/libmoosex-types-set-object-perl/t/basic.t Sun Dec 5 11:21:22 2010
@@ -4,47 +4,53 @@
use warnings;
use Test::More 'no_plan';
-use Test::Exception;
+use Test::Fatal;
use ok 'MooseX::Types::Set::Object';
{
- package Blah;
- use Moose;
+ package Blah;
+ use Moose;
- has stuff => (
- isa => "Set::Object",
- is => "rw",
- coerce => 1,
- );
+ has stuff => (
+ isa => "Set::Object",
+ is => "rw",
+ coerce => 1,
+ );
- has junk => (
- isa => "Set::Object",
- is => "rw",
- );
+ has junk => (
+ isa => "Set::Object",
+ is => "rw",
+ );
- has misc => (
- isa => "Set::Object[Foo]",
- is => "rw",
- coerce => 1,
- );
+ has misc => (
+ isa => "Set::Object[Foo]",
+ is => "rw",
+ coerce => 1,
+ );
- package Foo;
- use Moose;
+ has moo => (
+ isa => 'ArrayRef',
+ is => 'rw',
+ coerce => 1,
+ );
- package Bar;
- use Moose;
-
- extends qw(Foo);
+ package Foo;
+ use Moose;
- package Gorch;
- use Moose;
+ package Bar;
+ use Moose;
+
+ extends qw(Foo);
+
+ package Gorch;
+ use Moose;
}
my @objs = (
- "foo",
- Foo->new,
- [ ],
+ "foo",
+ Foo->new,
+ [ ],
);
my $obj = Blah->new( stuff => \@objs );
@@ -53,29 +59,29 @@
is( $obj->stuff->size, 3, "three items" );
foreach my $item ( @objs ) {
- ok( $obj->stuff->includes($item), "'$item' is in the set");
+ ok( $obj->stuff->includes($item), "'$item' is in the set");
}
-throws_ok { Blah->new( junk => [ ] ) } qr/type.*Set::Object/i, "fails without coercion";
+like( exception { Blah->new( junk => [ ] ) }, qr/type.*Set::Object/i, "fails without coercion");
-throws_ok { Blah->new( junk => \@objs ) } qr/type.*Set::Object/i, "fails without coercion";
+like( exception { Blah->new( junk => \@objs ) }, qr/type.*Set::Object/i, "fails without coercion");
{
- local $TODO = "coercion for parametrized types seems borked";
- lives_ok { Blah->new( misc => [ ] ) } "doesn't fail with empty array for parametrized set type";
+ local $TODO = "coercion for parameterized types seems borked";
+ is( exception { Blah->new( misc => [ ] ) }, undef, "doesn't fail with empty array for parameterized set type");
}
-lives_ok { Blah->new( misc => Set::Object->new ) } "doesn't fail with empty set for parametrized set type";
+is( exception { Blah->new( misc => Set::Object->new ) }, undef, "doesn't fail with empty set for parameterized set type");
-throws_ok { Blah->new( misc => \@objs ) } qr/Foo/, "fails on parametrized set type";
+like( exception { Blah->new( misc => \@objs ) }, qr/Foo/, "fails on parameterized set type");
-throws_ok { Blah->new( misc => Set::Object->new(\@objs) ) } qr/Foo/, "fails on parametrized set type";
+like( exception { Blah->new( misc => Set::Object->new(@objs) ) }, qr/Foo/, "fails on parameterized set type");
{
- local $TODO = "coercion for parametrized types seems borked";
- lives_ok { Blah->new( misc => [ Foo->new, Bar->new ] ) } "no error on coercion from array filled with the right type";
+ local $TODO = "coercion for parameterized types seems borked";
+ is( exception { Blah->new( misc => [ Foo->new, Bar->new ] ) }, undef, "no error on coercion from array filled with the right type");
}
-lives_ok { Blah->new( misc => Set::Object->new([ Foo->new, Bar->new ]) ) } "no error with set filled with the right type";
-throws_ok { Blah->new( misc => Set::Object->new([ Foo->new, Gorch->new, Bar->new ]) ) } qr/Foo/, "error with set that has a naughty object";
+is( exception { Blah->new( misc => Set::Object->new(Foo->new, Bar->new) ) }, undef, "no error with set filled with the right type");
+like( exception { Blah->new( misc => Set::Object->new(Foo->new, Gorch->new, Bar->new) ) }, qr/Foo/, "error with set that has a naughty object");
More information about the Pkg-perl-cvs-commits
mailing list