update the tests to strictures 2. ran ack to check this time. FFS.
[p5sagit/Package-Variant.git] / t / 10argument-types.t
1 use strictures 2;
2 use Test::More;
3
4 BEGIN {
5   package TestVariable;
6   use Package::Variant;
7   sub make_variant {
8     my ($class, $target, @args) = @_;
9     install variant_values => sub { [@args] };
10   }
11   $INC{'TestVariable.pm'} = __FILE__;
12 }
13
14 use TestVariable;
15
16 is_deeply TestVariable(23)->variant_values, [23],
17   'simple value argument';
18 is_deeply TestVariable(3..7)->variant_values, [3..7],
19   'multiple value arguments';
20 is_deeply TestVariable({ foo => 23 })->variant_values, [{ foo => 23 }],
21   'hash reference argument';
22
23 done_testing;