1use Test::Base tests => 5; 2 3my $block1 = [blocks]->[0]; 4my @values = $block1->grocery; 5is scalar(@values), 3, 6 'check list context'; 7is_deeply \@values, ['apples', 'oranges', 'beef jerky'], 8 'list context content'; 9 10my $block2 = [blocks]->[1]; 11is_deeply $block2->todo, 12[ 13 'Fix YAML', 14 'Fix Inline', 15 'Fix Test::Base', 16], 'deep block from index'; 17 18my $block3 = [blocks]->[2]; 19is $block3->perl, 'xxx', 20 'scalar context'; 21is_deeply [$block3->perl], ['xxx', 'yyy', 'zzz'], 22 'deep list compare'; 23 24__END__ 25 26=== One 27--- grocery lines chomp 28apples 29oranges 30beef jerky 31 32=== Two 33--- todo lines chomp array 34Fix YAML 35Fix Inline 36Fix Test::Base 37 38=== Three 39--- perl eval 40return qw( 41 xxx 42 yyy 43 zzz 44) 45