my $data = LoadFile( $file );
####
my ($data) = LoadFile( $file);
####
use strict;
use warnings;
use Test::More;
use Test::Deep;
use YAML::Tiny ();
use YAML::XS ();
my $yaml_doc =<##
# YAML::XS::VERSION = 0.41
# YAML::Tiny::VERSION = 1.51
ok 1 - YAML::XS - two documents in a single file
ok 2 - YAML::Tiny - two documents in a single file
ok 3 - multi documents are identical
ok 4 - same scalar/list behaviour
ok 5 - same scalar/list behaviour
# Here is your problem: ( ... )
# my $scalar1_xs ... last from list (like comma operator):
# {
# 'item' => 'y',
# 'name' => 'file2'
# }
# my ($scalar2_xs) ... with pars - first from list:
# {
# 'item' => 'x',
# 'name' => 'file1'
# }
1..5