r62644 - in /branches/upstream/libmoosex-getopt-perl/current: ./ lib/MooseX/ lib/MooseX/Getopt/ lib/MooseX/Getopt/Meta/ lib/MooseX/Getopt/Meta/Attribute/ lib/MooseX/Getopt/Meta/Attribute/Trait/ t/
eloy at users.alioth.debian.org
eloy at users.alioth.debian.org
Fri Sep 17 10:32:16 UTC 2010
Author: eloy
Date: Fri Sep 17 10:31:46 2010
New Revision: 62644
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=62644
Log:
[svn-upgrade] new version libmoosex-getopt-perl (0.33)
Added:
branches/upstream/libmoosex-getopt-perl/current/t/107_union_bug.t
Modified:
branches/upstream/libmoosex-getopt-perl/current/ChangeLog
branches/upstream/libmoosex-getopt-perl/current/MANIFEST
branches/upstream/libmoosex-getopt-perl/current/META.json
branches/upstream/libmoosex-getopt-perl/current/META.yml
branches/upstream/libmoosex-getopt-perl/current/Makefile.PL
branches/upstream/libmoosex-getopt-perl/current/README
branches/upstream/libmoosex-getopt-perl/current/dist.ini
branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt.pm
branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Basic.pm
branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Dashes.pm
branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/GLD.pm
branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute.pm
branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/NoGetopt.pm
branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/Trait.pm
branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/Trait/NoGetopt.pm
branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/OptionTypeMap.pm
branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Strict.pm
branches/upstream/libmoosex-getopt-perl/current/t/008_configfromfile.t
branches/upstream/libmoosex-getopt-perl/current/t/009_gld_and_explicit_options.t
branches/upstream/libmoosex-getopt-perl/current/t/100_gld_default_bug.t
branches/upstream/libmoosex-getopt-perl/current/t/107_no_auto_help.t
Modified: branches/upstream/libmoosex-getopt-perl/current/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/ChangeLog?rev=62644&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/ChangeLog (original)
+++ branches/upstream/libmoosex-getopt-perl/current/ChangeLog Fri Sep 17 10:31:46 2010
@@ -1,4 +1,10 @@
Revision history for Perl extension MooseX-Getopt
+
+0.33 Thu 26 Aug 2010
+ * Remove Test::Most from newly added test (RT#60766)
+
+0.32 Thu 26 Aug 2010
+ * Fix handling of Union types (RT#58417)
0.31 Wed 7 Jul 2010
* Fix issue causing tests to fail if MooseX::SimpleConfig isn't installed.
Modified: branches/upstream/libmoosex-getopt-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/MANIFEST?rev=62644&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/MANIFEST (original)
+++ branches/upstream/libmoosex-getopt-perl/current/MANIFEST Fri Sep 17 10:31:46 2010
@@ -35,6 +35,7 @@
t/105_uc_bug_more.t
t/106_no_ignore_case.t
t/107_no_auto_help.t
+t/107_union_bug.t
t/108_usage_attr.t
t/109_help_flag.t
t/110_sort_usage_by_attr_order.t
Modified: branches/upstream/libmoosex-getopt-perl/current/META.json
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/META.json?rev=62644&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/META.json (original)
+++ branches/upstream/libmoosex-getopt-perl/current/META.json Fri Sep 17 10:31:46 2010
@@ -10,7 +10,8 @@
"Florian Ragwitz <rafl at debian.org>",
"Dagfinn Ilmari Manns\u00c3\u00a5ker <ilmari at ilmari.org>",
"\u00c3\u0086var Arnfj\u00c3\u00b6r\u00c3\u00b0 Bjarmason <avar at cpan.org>",
- "Chris Prather <perigrin at cpan.org>"
+ "Chris Prather <perigrin at cpan.org>",
+ "Karen Etheridge <ether at cpan.org>"
],
"dynamic_config" : 0,
"generated_by" : "Dist::Zilla version 4.101612, CPAN::Meta::Converter version 2.101610",
@@ -39,6 +40,7 @@
"requires" : {
"Test::Exception" : "0.21",
"Test::More" : "0.88",
+ "Test::Requires" : "0.05",
"Test::Warn" : "0.21"
}
}
@@ -56,7 +58,7 @@
"web" : "http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo/MooseX-Getopt.git;a=summary"
}
},
- "version" : "0.31",
+ "version" : "0.33",
"x_Dist_Zilla" : {
"plugins" : [
{
Modified: branches/upstream/libmoosex-getopt-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/META.yml?rev=62644&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/META.yml (original)
+++ branches/upstream/libmoosex-getopt-perl/current/META.yml Fri Sep 17 10:31:46 2010
@@ -11,9 +11,11 @@
- 'Dagfinn Ilmari Mannsåker <ilmari at ilmari.org>'
- 'Ãvar Arnfjörð Bjarmason <avar at cpan.org>'
- 'Chris Prather <perigrin at cpan.org>'
+ - 'Karen Etheridge <ether at cpan.org>'
build_requires:
Test::Exception: 0.21
Test::More: 0.88
+ Test::Requires: 0.05
Test::Warn: 0.21
configure_requires:
ExtUtils::MakeMaker: 6.31
@@ -32,7 +34,7 @@
bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Getopt
homepage: http://search.cpan.org/dist/MooseX-Getopt
repository: git://git.moose.perl.org/MooseX-Getopt.git
-version: 0.31
+version: 0.33
x_Dist_Zilla:
plugins:
-
Modified: branches/upstream/libmoosex-getopt-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/Makefile.PL?rev=62644&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/Makefile.PL (original)
+++ branches/upstream/libmoosex-getopt-perl/current/Makefile.PL Fri Sep 17 10:31:46 2010
@@ -10,10 +10,11 @@
my %WriteMakefileArgs = (
'ABSTRACT' => 'A Moose role for processing command line options',
- 'AUTHOR' => 'Stevan Little <stevan at iinteractive.com>, Brandon L. Black <blblack at gmail.com>, Yuval Kogman <nothingmuch at woobling.org>, Ryan D Johnson <ryan at innerfence.com>, Drew Taylor <drew at drewtaylor.com>, Tomas Doran <bobtfish at bobtfish.net>, Florian Ragwitz <rafl at debian.org>, Dagfinn Ilmari MannsÃ¥ker <ilmari at ilmari.org>, Ãvar Arnfjörð Bjarmason <avar at cpan.org>, Chris Prather <perigrin at cpan.org>',
+ 'AUTHOR' => 'Stevan Little <stevan at iinteractive.com>, Brandon L. Black <blblack at gmail.com>, Yuval Kogman <nothingmuch at woobling.org>, Ryan D Johnson <ryan at innerfence.com>, Drew Taylor <drew at drewtaylor.com>, Tomas Doran <bobtfish at bobtfish.net>, Florian Ragwitz <rafl at debian.org>, Dagfinn Ilmari MannsÃ¥ker <ilmari at ilmari.org>, Ãvar Arnfjörð Bjarmason <avar at cpan.org>, Chris Prather <perigrin at cpan.org>, Karen Etheridge <ether at cpan.org>',
'BUILD_REQUIRES' => {
'Test::Exception' => '0.21',
'Test::More' => '0.88',
+ 'Test::Requires' => '0.05',
'Test::Warn' => '0.21'
},
'CONFIGURE_REQUIRES' => {
@@ -28,7 +29,7 @@
'Getopt::Long::Descriptive' => '0.081',
'Moose' => '0.56'
},
- 'VERSION' => '0.31',
+ 'VERSION' => '0.33',
'test' => {
'TESTS' => 't/*.t'
}
Modified: branches/upstream/libmoosex-getopt-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/README?rev=62644&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/README (original)
+++ branches/upstream/libmoosex-getopt-perl/current/README Fri Sep 17 10:31:46 2010
@@ -1,7 +1,7 @@
This archive contains the distribution MooseX-Getopt,
-version 0.31:
+version 0.33:
A Moose role for processing command line options
Modified: branches/upstream/libmoosex-getopt-perl/current/dist.ini
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/dist.ini?rev=62644&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/dist.ini (original)
+++ branches/upstream/libmoosex-getopt-perl/current/dist.ini Fri Sep 17 10:31:46 2010
@@ -1,5 +1,5 @@
name = MooseX-Getopt
-version = 0.31
+version = 0.33
author = Stevan Little <stevan at iinteractive.com>
author = Brandon L. Black <blblack at gmail.com>
author = Yuval Kogman <nothingmuch at woobling.org>
@@ -10,6 +10,7 @@
author = Dagfinn Ilmari Mannsåker <ilmari at ilmari.org>
author = Ãvar Arnfjörð Bjarmason <avar at cpan.org>
author = Chris Prather <perigrin at cpan.org>
+author = Karen Etheridge <ether at cpan.org>
license = Perl_5
copyright_holder = Infinity Interactive, Inc
@@ -28,3 +29,4 @@
Test::Exception = 0.21
Test::Warn = 0.21
Test::More = 0.88
+Test::Requires = 0.05
Modified: branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt.pm?rev=62644&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt.pm (original)
+++ branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt.pm Fri Sep 17 10:31:46 2010
@@ -3,7 +3,7 @@
$MooseX::Getopt::AUTHORITY = 'cpan:STEVAN';
}
BEGIN {
- $MooseX::Getopt::VERSION = '0.31';
+ $MooseX::Getopt::VERSION = '0.33';
}
# ABSTRACT: A Moose role for processing command line options
@@ -294,6 +294,10 @@
Chris Prather <perigrin at cpan.org>
+=item *
+
+Karen Etheridge <ether at cpan.org>
+
=back
=head1 COPYRIGHT AND LICENSE
Modified: branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Basic.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Basic.pm?rev=62644&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Basic.pm (original)
+++ branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Basic.pm Fri Sep 17 10:31:46 2010
@@ -3,7 +3,7 @@
$MooseX::Getopt::Basic::AUTHORITY = 'cpan:STEVAN';
}
BEGIN {
- $MooseX::Getopt::Basic::VERSION = '0.31';
+ $MooseX::Getopt::Basic::VERSION = '0.33';
}
# ABSTRACT: MooseX::Getopt::Basic - role to implement the Getopt::Long functionality
@@ -323,6 +323,10 @@
Chris Prather <perigrin at cpan.org>
+=item *
+
+Karen Etheridge <ether at cpan.org>
+
=back
=head1 COPYRIGHT AND LICENSE
Modified: branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Dashes.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Dashes.pm?rev=62644&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Dashes.pm (original)
+++ branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Dashes.pm Fri Sep 17 10:31:46 2010
@@ -3,7 +3,7 @@
$MooseX::Getopt::Dashes::AUTHORITY = 'cpan:STEVAN';
}
BEGIN {
- $MooseX::Getopt::Dashes::VERSION = '0.31';
+ $MooseX::Getopt::Dashes::VERSION = '0.33';
}
# ABSTRACT: convert underscores in attribute names to dashes
@@ -115,6 +115,10 @@
Chris Prather <perigrin at cpan.org>
+=item *
+
+Karen Etheridge <ether at cpan.org>
+
=back
=head1 COPYRIGHT AND LICENSE
Modified: branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/GLD.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/GLD.pm?rev=62644&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/GLD.pm (original)
+++ branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/GLD.pm Fri Sep 17 10:31:46 2010
@@ -3,7 +3,7 @@
$MooseX::Getopt::GLD::AUTHORITY = 'cpan:STEVAN';
}
BEGIN {
- $MooseX::Getopt::GLD::VERSION = '0.31';
+ $MooseX::Getopt::GLD::VERSION = '0.33';
}
# ABSTRACT: A Moose role for processing command line options with Getopt::Long::Descriptive
@@ -152,6 +152,10 @@
Chris Prather <perigrin at cpan.org>
+=item *
+
+Karen Etheridge <ether at cpan.org>
+
=back
=head1 COPYRIGHT AND LICENSE
Modified: branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute.pm?rev=62644&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute.pm (original)
+++ branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute.pm Fri Sep 17 10:31:46 2010
@@ -3,7 +3,7 @@
$MooseX::Getopt::Meta::Attribute::AUTHORITY = 'cpan:STEVAN';
}
BEGIN {
- $MooseX::Getopt::Meta::Attribute::VERSION = '0.31';
+ $MooseX::Getopt::Meta::Attribute::VERSION = '0.33';
}
# ABSTRACT: Optional meta attribute for custom option names
@@ -22,7 +22,7 @@
$Moose::Meta::Attribute::Custom::Getopt::AUTHORITY = 'cpan:STEVAN';
}
BEGIN {
- $Moose::Meta::Attribute::Custom::Getopt::VERSION = '0.31';
+ $Moose::Meta::Attribute::Custom::Getopt::VERSION = '0.33';
}
sub register_implementation { 'MooseX::Getopt::Meta::Attribute' }
@@ -142,6 +142,10 @@
Chris Prather <perigrin at cpan.org>
+=item *
+
+Karen Etheridge <ether at cpan.org>
+
=back
=head1 COPYRIGHT AND LICENSE
Modified: branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/NoGetopt.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/NoGetopt.pm?rev=62644&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/NoGetopt.pm (original)
+++ branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/NoGetopt.pm Fri Sep 17 10:31:46 2010
@@ -3,7 +3,7 @@
$MooseX::Getopt::Meta::Attribute::NoGetopt::AUTHORITY = 'cpan:STEVAN';
}
BEGIN {
- $MooseX::Getopt::Meta::Attribute::NoGetopt::VERSION = '0.31';
+ $MooseX::Getopt::Meta::Attribute::NoGetopt::VERSION = '0.33';
}
# ABSTRACT: Optional meta attribute for ignoring params
@@ -21,7 +21,7 @@
$Moose::Meta::Attribute::Custom::NoGetopt::AUTHORITY = 'cpan:STEVAN';
}
BEGIN {
- $Moose::Meta::Attribute::Custom::NoGetopt::VERSION = '0.31';
+ $Moose::Meta::Attribute::Custom::NoGetopt::VERSION = '0.33';
}
sub register_implementation { 'MooseX::Getopt::Meta::Attribute::NoGetopt' }
@@ -104,6 +104,10 @@
Chris Prather <perigrin at cpan.org>
+=item *
+
+Karen Etheridge <ether at cpan.org>
+
=back
=head1 COPYRIGHT AND LICENSE
Modified: branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/Trait.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/Trait.pm?rev=62644&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/Trait.pm (original)
+++ branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/Trait.pm Fri Sep 17 10:31:46 2010
@@ -3,7 +3,7 @@
$MooseX::Getopt::Meta::Attribute::Trait::AUTHORITY = 'cpan:STEVAN';
}
BEGIN {
- $MooseX::Getopt::Meta::Attribute::Trait::VERSION = '0.31';
+ $MooseX::Getopt::Meta::Attribute::Trait::VERSION = '0.33';
}
# ABSTRACT: Optional meta attribute trait for custom option names
@@ -41,7 +41,7 @@
$Moose::Meta::Attribute::Custom::Trait::Getopt::AUTHORITY = 'cpan:STEVAN';
}
BEGIN {
- $Moose::Meta::Attribute::Custom::Trait::Getopt::VERSION = '0.31';
+ $Moose::Meta::Attribute::Custom::Trait::Getopt::VERSION = '0.33';
}
sub register_implementation { 'MooseX::Getopt::Meta::Attribute::Trait' }
@@ -150,6 +150,10 @@
Chris Prather <perigrin at cpan.org>
+=item *
+
+Karen Etheridge <ether at cpan.org>
+
=back
=head1 COPYRIGHT AND LICENSE
Modified: branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/Trait/NoGetopt.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/Trait/NoGetopt.pm?rev=62644&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/Trait/NoGetopt.pm (original)
+++ branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/Trait/NoGetopt.pm Fri Sep 17 10:31:46 2010
@@ -3,7 +3,7 @@
$MooseX::Getopt::Meta::Attribute::Trait::NoGetopt::AUTHORITY = 'cpan:STEVAN';
}
BEGIN {
- $MooseX::Getopt::Meta::Attribute::Trait::NoGetopt::VERSION = '0.31';
+ $MooseX::Getopt::Meta::Attribute::Trait::NoGetopt::VERSION = '0.33';
}
# ABSTRACT: Optional meta attribute trait for ignoring params
@@ -17,7 +17,7 @@
$Moose::Meta::Attribute::Custom::Trait::NoGetopt::AUTHORITY = 'cpan:STEVAN';
}
BEGIN {
- $Moose::Meta::Attribute::Custom::Trait::NoGetopt::VERSION = '0.31';
+ $Moose::Meta::Attribute::Custom::Trait::NoGetopt::VERSION = '0.33';
}
sub register_implementation { 'MooseX::Getopt::Meta::Attribute::Trait::NoGetopt' }
@@ -100,6 +100,10 @@
Chris Prather <perigrin at cpan.org>
+=item *
+
+Karen Etheridge <ether at cpan.org>
+
=back
=head1 COPYRIGHT AND LICENSE
Modified: branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/OptionTypeMap.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/OptionTypeMap.pm?rev=62644&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/OptionTypeMap.pm (original)
+++ branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/OptionTypeMap.pm Fri Sep 17 10:31:46 2010
@@ -3,7 +3,7 @@
$MooseX::Getopt::OptionTypeMap::AUTHORITY = 'cpan:STEVAN';
}
BEGIN {
- $MooseX::Getopt::OptionTypeMap::VERSION = '0.31';
+ $MooseX::Getopt::OptionTypeMap::VERSION = '0.33';
}
# ABSTRACT: Storage for the option to type mappings
@@ -22,6 +22,15 @@
sub has_option_type {
my (undef, $type_or_name) = @_;
+ if (blessed($type_or_name)
+ && $type_or_name->isa('Moose::Meta::TypeConstraint::Union')) {
+ foreach my $union_type (@{$type_or_name->type_constraints}) {
+ return 1
+ if __PACKAGE__->has_option_type($union_type);
+ }
+ return 0;
+ }
+
return 1 if exists $option_type_map{blessed($type_or_name) ? $type_or_name->name : $type_or_name};
my $current = blessed($type_or_name) ? $type_or_name : find_type_constraint($type_or_name);
@@ -39,6 +48,16 @@
sub get_option_type {
my (undef, $type_or_name) = @_;
+
+ if (blessed($type_or_name)
+ && $type_or_name->isa('Moose::Meta::TypeConstraint::Union')) {
+ foreach my $union_type (@{$type_or_name->type_constraints}) {
+ my $option_type = __PACKAGE__->get_option_type($union_type);
+ return $option_type
+ if defined $option_type;
+ }
+ return;
+ }
my $name = blessed($type_or_name) ? $type_or_name->name : $type_or_name;
@@ -144,6 +163,10 @@
Chris Prather <perigrin at cpan.org>
+=item *
+
+Karen Etheridge <ether at cpan.org>
+
=back
=head1 COPYRIGHT AND LICENSE
Modified: branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Strict.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Strict.pm?rev=62644&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Strict.pm (original)
+++ branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Strict.pm Fri Sep 17 10:31:46 2010
@@ -3,7 +3,7 @@
$MooseX::Getopt::Strict::AUTHORITY = 'cpan:STEVAN';
}
BEGIN {
- $MooseX::Getopt::Strict::VERSION = '0.31';
+ $MooseX::Getopt::Strict::VERSION = '0.33';
}
# ABSTRACT: only make options for attrs with the Getopt metaclass
@@ -83,6 +83,10 @@
Chris Prather <perigrin at cpan.org>
+=item *
+
+Karen Etheridge <ether at cpan.org>
+
=back
=head1 COPYRIGHT AND LICENSE
Modified: branches/upstream/libmoosex-getopt-perl/current/t/008_configfromfile.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/t/008_configfromfile.t?rev=62644&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/t/008_configfromfile.t (original)
+++ branches/upstream/libmoosex-getopt-perl/current/t/008_configfromfile.t Fri Sep 17 10:31:46 2010
@@ -3,18 +3,13 @@
use strict;
use warnings;
+use Test::More tests => 37;
use Test::Exception;
-use Test::More;
use File::Spec;
-if ( !eval { require MooseX::ConfigFromFile } )
-{
- plan skip_all => 'Test requires MooseX::ConfigFromFile';
-}
-else
-{
- plan tests => 37;
-}
+use Test::Requires {
+ 'MooseX::ConfigFromFile' => 0.01, # skip all if not installed
+};
{
package App;
Modified: branches/upstream/libmoosex-getopt-perl/current/t/009_gld_and_explicit_options.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/t/009_gld_and_explicit_options.t?rev=62644&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/t/009_gld_and_explicit_options.t (original)
+++ branches/upstream/libmoosex-getopt-perl/current/t/009_gld_and_explicit_options.t Fri Sep 17 10:31:46 2010
@@ -3,15 +3,14 @@
use strict;
use warnings;
-use Test::More;
+use Test::More tests => 5;
use Test::Exception;
-BEGIN {
- eval 'use Getopt::Long::Descriptive;';
- plan skip_all => "Getopt::Long::Descriptive required for this test" if $@;
- plan tests => 5;
- use_ok('MooseX::Getopt');
-}
+use Test::Requires {
+ 'Getopt::Long::Descriptive' => 0.01, # skip all if not installed
+};
+
+use_ok('MooseX::Getopt');
{
package Testing::Foo;
Modified: branches/upstream/libmoosex-getopt-perl/current/t/100_gld_default_bug.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/t/100_gld_default_bug.t?rev=62644&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/t/100_gld_default_bug.t (original)
+++ branches/upstream/libmoosex-getopt-perl/current/t/100_gld_default_bug.t Fri Sep 17 10:31:46 2010
@@ -3,15 +3,14 @@
use strict;
use warnings;
-use Test::More;
+use Test::More tests => 5;
use Test::Exception;
-BEGIN {
- eval 'use Getopt::Long::Descriptive;';
- plan skip_all => "Getopt::Long::Descriptive required for this test" if $@;
- plan tests => 5;
- use_ok('MooseX::Getopt');
-}
+use Test::Requires {
+ 'Getopt::Long::Descriptive' => 0.01, # skip all if not installed
+};
+
+use_ok('MooseX::Getopt');
{
package Engine::Foo;
Modified: branches/upstream/libmoosex-getopt-perl/current/t/107_no_auto_help.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/t/107_no_auto_help.t?rev=62644&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/t/107_no_auto_help.t (original)
+++ branches/upstream/libmoosex-getopt-perl/current/t/107_no_auto_help.t Fri Sep 17 10:31:46 2010
@@ -12,10 +12,9 @@
use Test::More;
-BEGIN {
-plan skip_all => 'This test needs MooseX::SimpleConfig 0.07'
- unless eval { require MooseX::SimpleConfig && MooseX::SimpleConfig->VERSION(0.07); };
-}
+use Test::Requires {
+ 'MooseX::SimpleConfig' => 0.07, # skip all if not installed
+};
my $fail_on_exit = 1;
{
Added: branches/upstream/libmoosex-getopt-perl/current/t/107_union_bug.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/t/107_union_bug.t?rev=62644&op=file
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/t/107_union_bug.t (added)
+++ branches/upstream/libmoosex-getopt-perl/current/t/107_union_bug.t Fri Sep 17 10:31:46 2010
@@ -1,0 +1,66 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More;
+
+{
+ package example;
+
+ use Moose;
+ use Moose::Util::TypeConstraints;
+ with qw(
+ MooseX::Getopt
+ );
+
+ subtype 'ResultSet'
+ => as 'DBIx::Class::ResultSet';
+
+ subtype 'ResultList'
+ => as 'ArrayRef[Int]';
+
+ MooseX::Getopt::OptionTypeMap->add_option_type_to_map(
+ 'ResultList' => '=s',
+ );
+
+ coerce 'ResultList'
+ => from 'Str'
+ => via {
+ return [ grep { m/^\d+$/ } split /\D/,$_ ]; # <- split string into arrayref
+ };
+
+ has 'results' => (
+ is => 'rw',
+ isa => 'ResultList | ResultSet', # <- union constraint
+ coerce => 1,
+ );
+
+ has 'other' => (
+ is => 'rw',
+ isa => 'Str',
+ );
+}
+
+# Without MooseX::Getopt
+{
+ my $example = example->new({
+ results => '1234,5678,9012',
+ other => 'test',
+ });
+ isa_ok($example, 'example');
+ is_deeply($example->results, [qw(1234 5678 9012)], 'result as expected');
+}
+
+# With MooseX::Getopt
+{
+ local @ARGV = ('--results','1234,5678,9012','--other','test');
+ my $example = example->new_with_options;
+ isa_ok($example, 'example');
+
+ is($example->other,'test');
+ is_deeply($example->results, [qw(1234 5678 9012)], 'result as expected');
+}
+
+done_testing;
+
More information about the Pkg-perl-cvs-commits
mailing list