-#!/usr/bin/perl
-
use strict;
use warnings;
-use Test::More tests => 10;
-use Test::Exception;
+use Test::More tests => 11;
+use Test::Fatal;
+use Test::NoWarnings 1.04 ':early';
BEGIN {
use_ok('MooseX::Getopt');
}
{
-
package App;
use Moose;
with 'MooseX::Getopt::Strict';
has 'data' => (
- metaclass => 'Getopt',
+ traits => ['Getopt'],
is => 'ro',
isa => 'Str',
default => 'file.dat',
);
has 'cow' => (
- metaclass => 'Getopt',
+ traits => ['Getopt'],
is => 'ro',
isa => 'Str',
default => 'moo',
);
has 'horse' => (
- metaclass => 'Getopt',
+ traits => ['Getopt'],
is => 'ro',
isa => 'Str',
default => 'bray',
{
local @ARGV = (qw/--private_stuff 317/);
- throws_ok { App->new_with_options } qr/Unknown option: private_stuff/;
+ like exception { App->new_with_options }, qr/Unknown option: private_stuff/;
}
{
local @ARGV = (qw/--length 100/);
- throws_ok { App->new_with_options } qr/Unknown option: length/;
+ like exception { App->new_with_options }, qr/Unknown option: length/;
}