| 1 |
use strict; |
| 2 |
use warnings; |
| 3 |
use FindBin; |
| 4 |
use lib "$FindBin::Bin/../../"; |
| 5 |
use t::scan::Util; |
| 6 |
|
| 7 |
test(<<'TEST'); # perlref |
| 8 |
$sref->$*; # same as ${ $sref } |
| 9 |
$aref->@*; # same as @{ $aref } |
| 10 |
$aref->$#*; # same as $#{ $aref } |
| 11 |
$href->%*; # same as %{ $href } |
| 12 |
$cref->&*; # same as &{ $cref } |
| 13 |
$gref->**; # same as *{ $gref } |
| 14 |
$gref->*{SCALAR}; # same as *{ $gref }{SCALAR} |
| 15 |
$aref->@[ ... ]; # same as @$aref[ ... ] |
| 16 |
$href->@{ ... }; # same as @$href{ ... } |
| 17 |
$aref->%[ ... ]; # same as %$aref[ ... ] |
| 18 |
$href->%{ ... }; # same as %$href{ ... } |
| 19 |
TEST |
| 20 |
|
| 21 |
test(<<'TEST'); |
| 22 |
$aref->@[ qw(foo) ]; |
| 23 |
$href->@{ qw(foo) }; |
| 24 |
$aref->%[ qw(foo) ]; |
| 25 |
$href->%{ qw(foo) }; |
| 26 |
TEST |
| 27 |
|
| 28 |
test(<<'TEST'); # CVLIBRARY/WebDriver-Tiny-0.006/lib/WebDriver/Tiny/Elements.pm |
| 29 |
sub append { bless [ shift->@*, map @$_[ 1.. $#$_ ], @_ ] } |
| 30 |
sub first { bless [ $_[0]->@[ 0, 1 ] ] } |
| 31 |
sub last { bless [ $_[0]->@[ 0, -1 ] ] } |
| 32 |
sub size { $#{ $_[0] } } |
| 33 |
sub slice { my ( $drv, @ids ) = shift->@*; bless [ $drv, @ids[@_] ] } |
| 34 |
sub split { my ( $drv, @ids ) = $_[0]->@*; map { bless [ $drv, $_ ] } @ids } |
| 35 |
TEST |
| 36 |
|
| 37 |
test(<<'TEST'); # CPAN-Testers-Schema-0.023/lib/CPAN/Testers/Schema/ResultSet/Stats.pm |
| 38 |
|
| 39 |
die $LOG->error( |
| 40 |
sprintf 'No upload matches for dist %s version %s (report %s)', |
| 41 |
$data->{distribution}->@{qw( name version )}, $guid, |
| 42 |
); |
| 43 |
TEST |
| 44 |
|
| 45 |
done_testing; |