1use Test::Base; 2 3plan eval { require YAML; 1 } 4 ? (tests => 1 * blocks) 5 : (skip_all => 'Requires YAML'); 6 7filters { 8 data1 => 'yaml', 9 data2 => 'eval', 10}; 11 12run_compare; 13 14__END__ 15=== YAML Hashes 16--- data1 17foo: xxx 18bar: [ 1, 2, 3] 19--- data2 20+{ 21 foo => 'xxx', 22 bar => [1,2,3], 23} 24 25 26=== YAML Arrays 27--- data1 28- foo 29- bar 30- {x: y} 31--- data2 32[ 33 'foo', 34 'bar', 35 { x => 'y' }, 36] 37 38 39=== YAML Scalar 40--- data1 41--- | 42 sub foo { 43 print "bar\n"; 44 } 45--- data2 46<<'END'; 47sub foo { 48 print "bar\n"; 49} 50END 51