Getopt-TypeConstraint-Mouse
view release on metacpan or search on metacpan
use strict;
use warnings;
use Test::More;
use Project::Libs;
use Getopt::TypeConstraint::Mouse;
subtest basic => sub {
local @ARGV = qw(--in=foo --out=bar);
{
package MyApp;
use Mouse;
with 'MouseX::Getopt';
has 'out' => ( is => 'ro', isa => 'Str', required => 1 );
has 'in' => ( is => 'ro', isa => 'Str', required => 1 );
}
my $app = MyApp->new_with_options;
my $opts = Getopt::TypeConstraint::Mouse->get_options(
t/documentation.t view on Meta::CPAN
use strict;
use warnings;
use Test::More;
use Project::Libs;
use Getopt::TypeConstraint::Mouse;
subtest 'alias of documentation option' => sub {
local @ARGV = qw(--out=bar);
{
package MyApp;
use Mouse;
with 'MouseX::Getopt';
has 'out' => (
is => 'ro',
isa => 'Str',
documentation => 'foo',
);
}
( run in 2.397 seconds using v1.01-cache-2.11-cpan-8f98c5d2c55 )