| 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->pushscip-perl cpan autobox-Core 1.33 main/push().('baz'); |
| 10 | |
| 11 | is_deeply \@array, [qw(foo bar baz)]; |
| 12 | is_deeply \@returned, [qw(foo bar baz)]; |
| 13 | |
| 14 | my $arrayref = @array->pushscip-perl cpan autobox-Core 1.33 main/push().('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 | my $array = [qw(foo bar)]; |
| 18 | |
| 19 | $array->pushscip-perl cpan autobox-Core 1.33 main/push().('baz'); |
| 20 | |
| 21 | is_deeplyscip-perl cpan autobox-Core 1.33 main/is_deeply(). $array, [qw(foo bar baz)]; |
| 22 |