The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
use strict;
use warnings;
use Smart::Options::Declare;
use Test::More;
use Test::Exception;


sub foo{
    opts my $x => "ArrayRef";
    return $x;
}

TODO: {
    todo_skip "type check not implement yet", 3;

    lives_and{
        @ARGV = qw(--x=10);
        is_deeply foo(), [10];

        @ARGV = qw(--x=10 --x=20 --x=30);
        is_deeply foo(), [10,20,30];

        @ARGV = qw(--x=10 --x=hello);
        is_deeply foo(), [10,'hello'];
    };
}

done_testing;