Skip to content

Commit 10da44f

Browse files
committed
YAML modules default for $LoadBlessed was changed to false
1 parent 869ebb8 commit 10da44f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/CPAN.pm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,9 @@ sub _yaml_loadfile {
558558
# 5.6.2 could not do the local() with the reference
559559
# so we do it manually instead
560560
my $old_loadcode = ${"$yaml_module\::LoadCode"};
561+
my $old_loadblessed = ${"$yaml_module\::LoadBlessed"};
561562
${ "$yaml_module\::LoadCode" } = $CPAN::Config->{yaml_load_code} || 0;
563+
${ "$yaml_module\::LoadBlessed" } = 1;
562564

563565
my ($code, @yaml);
564566
if ($code = UNIVERSAL::can($yaml_module, "LoadFile")) {
@@ -582,6 +584,7 @@ sub _yaml_loadfile {
582584
}
583585
}
584586
${"$yaml_module\::LoadCode"} = $old_loadcode;
587+
${"$yaml_module\::LoadBlessed"} = $old_loadblessed;
585588
return \@yaml;
586589
} else {
587590
# this shall not be done by the frontend

0 commit comments

Comments
 (0)