| 1 | use Test::Morescip-perl cpan autobox-Core 1.33 Test/More/; |
| 2 | use strictscip-perl cpan autobox-Core 1.33 strict/; |
| 3 | use warningsscip-perl cpan autobox-Core 1.33 warnings/; |
| 4 | |
| 5 | use autobox::Corescip-perl cpan autobox-Core 1.33 autobox/Core/; |
| 6 | |
| 7 | |
| 8 | { |
| 9 | my @array = qw(1 2 3); |
| 10 | |
| 11 | my @added = @array->mapscip-perl cpan autobox-Core 1.33 main/map().(sub { ++$_scip-perl cpan autobox-Core 1.33 main/$_. }); |
| 12 | |
| 13 | is_deeply \@added, [qw(2 3 4)]; |
| 14 | |
| 15 | my $arrayref = @array->mapscip-perl cpan autobox-Core 1.33 main/map().( sub { 'foo' } ); |
| 16 | |
| 17 | isscip-perl cpan autobox-Core 1.33 main/is(). refscip-perl cpan autobox-Core 1.33 main/ref(). $arrayref, 'ARRAY', "Returns arrayref in scalar context"; |
| 18 | } |
| 19 | |
| 20 | done_testing; |