Revision history for Perl extension MooseX-Getopt
+0.05
+ * MooseX::Getopt::OptionTypeMap
+ - added some checks to make sure that the type
+ constraints are found properly
+
0.04 Tues. June 26, 2007
* MooseX::Getopt::OptionTypeMap
- Added support for subtype constraint inference
-MooseX::Getopt version 0.04
+MooseX::Getopt version 0.05
===========================
See the individual module documentation for more information
use MooseX::Getopt::OptionTypeMap;
use MooseX::Getopt::Meta::Attribute;
-our $VERSION = '0.04';
+our $VERSION = '0.05';
our $AUTHORITY = 'cpan:STEVAN';
has ARGV => (is => 'rw', isa => 'ArrayRef');
use Moose 'confess';
use Moose::Util::TypeConstraints 'find_type_constraint';
-our $VERSION = '0.02';
+our $VERSION = '0.03';
our $AUTHORITY = 'cpan:STEVAN';
my %option_type_map = (
return 1 if exists $option_type_map{$type_name};
my $current = find_type_constraint($type_name);
+
+ (defined $current)
+ || confess "Could not find the type constraint for '$type_name'";
+
while (my $parent = $current->parent) {
return 1 if exists $option_type_map{$parent->name};
$current = $parent;
sub get_option_type {
my (undef, $type_name) = @_;
+
return $option_type_map{$type_name}
if exists $option_type_map{$type_name};
my $current = find_type_constraint($type_name);
+
+ (defined $current)
+ || confess "Could not find the type constraint for '$type_name'";
+
while (my $parent = $current->parent) {
return $option_type_map{$parent->name}
if exists $option_type_map{$parent->name};