| 1 | use Test::Morescip-perl cpan autobox-Core 1.33 Test/More/ qw(no_plan); |
| 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 | my @array = qw(foo bar); |
| 8 | |
| 9 | my @returned = @array->unshiftscip-perl cpan autobox-Core 1.33 main/unshift().('baz'); |
| 10 | |
| 11 | is_deeply \@array, [qw(baz foo bar)]; |
| 12 | is_deeply \@returned, [qw(baz foo bar)]; |
| 13 | |
| 14 | my $arrayref = @array->unshiftscip-perl cpan autobox-Core 1.33 main/unshift().('baz'); |
| 15 | |
| 16 | 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"; |
| 17 | |
| 18 | my $array = [qw(foo bar)]; |
| 19 | |
| 20 | $array->unshiftscip-perl cpan autobox-Core 1.33 main/unshift().('baz'); |
| 21 | |
| 22 | is_deeplyscip-perl cpan autobox-Core 1.33 main/is_deeply(). $array, [qw(baz foo bar)]; |
| 23 |