From: Stevan Little Date: Mon, 3 Dec 2007 17:06:22 +0000 (+0000) Subject: some doc fixes X-Git-Tag: 0_08~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-Getopt.git;a=commitdiff_plain;h=6ac028c4d869259041b7c526071cf614ffb033fa some doc fixes --- diff --git a/ChangeLog b/ChangeLog index 2128009..1aaf026 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ Revision history for Perl extension MooseX-Getopt +0.07 + * MooseX::Getopt::Meta::Attribute::NoGetopt + - fixed miscapitalization of NoGetopt in the docs + 0.06 Fri. Nov. 23, 2007 * MooseX::Getopt - refactored &new_with_option some so that diff --git a/README b/README index c2162d6..0d82d8c 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -MooseX::Getopt version 0.06 +MooseX::Getopt version 0.07 =========================== See the individual module documentation for more information diff --git a/lib/MooseX/Getopt.pm b/lib/MooseX/Getopt.pm index 6d1ab25..2602a4a 100644 --- a/lib/MooseX/Getopt.pm +++ b/lib/MooseX/Getopt.pm @@ -8,7 +8,7 @@ use MooseX::Getopt::OptionTypeMap; use MooseX::Getopt::Meta::Attribute; use MooseX::Getopt::Meta::Attribute::NoGetopt; -our $VERSION = '0.06'; +our $VERSION = '0.07'; our $AUTHORITY = 'cpan:STEVAN'; has ARGV => (is => 'rw', isa => 'ArrayRef'); diff --git a/lib/MooseX/Getopt/Meta/Attribute.pm b/lib/MooseX/Getopt/Meta/Attribute.pm index 082d807..22e4191 100644 --- a/lib/MooseX/Getopt/Meta/Attribute.pm +++ b/lib/MooseX/Getopt/Meta/Attribute.pm @@ -32,7 +32,8 @@ has 'cmd_aliases' => ( no Moose; # register this as a metaclass alias ... -package Moose::Meta::Attribute::Custom::Getopt; +package # stop confusing PAUSE + Moose::Meta::Attribute::Custom::Getopt; sub register_implementation { 'MooseX::Getopt::Meta::Attribute' } 1; diff --git a/lib/MooseX/Getopt/Meta/Attribute/NoGetopt.pm b/lib/MooseX/Getopt/Meta/Attribute/NoGetopt.pm index 88f36e6..5222a50 100644 --- a/lib/MooseX/Getopt/Meta/Attribute/NoGetopt.pm +++ b/lib/MooseX/Getopt/Meta/Attribute/NoGetopt.pm @@ -10,7 +10,8 @@ extends 'Moose::Meta::Attribute'; # << Moose extending Moose :) no Moose; # register this as a metaclass alias ... -package Moose::Meta::Attribute::Custom::NoGetopt; +package # stop confusing PAUSE + Moose::Meta::Attribute::Custom::NoGetopt; sub register_implementation { 'MooseX::Getopt::Meta::Attribute::NoGetopt' } 1; @@ -21,7 +22,7 @@ __END__ =head1 NAME -MooseX::Getopt::Meta::Attribute::NoGetOpt - Optional meta attribute for ignoring params +MooseX::Getopt::Meta::Attribute::NoGetopt - Optional meta attribute for ignoring params =head1 SYNOPSIS @@ -31,7 +32,7 @@ MooseX::Getopt::Meta::Attribute::NoGetOpt - Optional meta attribute for ignoring with 'MooseX::Getopt'; has 'data' => ( - metaclass => 'NoGetOpt', # do not attempt to capture this param + metaclass => 'NoGetopt', # do not attempt to capture this param is => 'ro', isa => 'Str', default => 'file.dat', @@ -41,7 +42,7 @@ MooseX::Getopt::Meta::Attribute::NoGetOpt - Optional meta attribute for ignoring This is a custom attribute metaclass which can be used to specify that a specific attribute should B be processed by -C. All you need to do is specify the C +C. All you need to do is specify the C metaclass. has 'foo' => (metaclass => 'NoGetopt', ... ); diff --git a/t/005_strict.t b/t/005_strict.t index 858437b..8a8d634 100644 --- a/t/005_strict.t +++ b/t/005_strict.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 10; use Test::Exception; BEGIN { @@ -99,3 +99,10 @@ BEGIN { throws_ok { App->new_with_options } qr/Unknown option: private_stuff/; } + +{ + local @ARGV = (qw/--length 100/); + + throws_ok { App->new_with_options } qr/Unknown option: length/; +} +