This queue is for tickets about the MooseX-Getopt CPAN distribution.

Report information
The Basics
Id:
42967
Status:
open
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
ctbrown [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
Wishlist
Broken in:
0.15
Fixed in:
(no value)



It would be nice if MooseX::Getopt supported the incremental options "verbose+"-type option for 'Int' types so that a command line of "--verbose --verbose" will set the verbose=2. Best Wishes, Chris
Am Mo 02. Feb 2009, 11:06:55, CTBROWN schrieb:
Show quoted text
> It would be nice if MooseX::Getopt supported the incremental options > "verbose+"-type option for 'Int' types so that a command line of > "--verbose --verbose" will set the verbose=2. > > Best Wishes, > > Chris
You can configure it this way: use Moose; use Moose::Util::TypeConstraints; use MooseX::Getopt::OptionTypeMap; subtype 'Verbosity', as 'Int', where { $_ >= 0 }; MooseX::Getopt::OptionTypeMap->add_option_type_to_map( Verbosity => '+' ); with 'MooseX::Getopt'; has 'verbose' => (is => 'ro', isa => 'Verbosity');


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.