Subject: | 0.35 can't deserialize blessed scalars |
YAML.pm v0.35 crashes when trying to Load() any blessed scalar reference. The following patch fixes the problem.
% diff -u /Library/Perl/5.8.1/YAML.pm YAML.pm /Library/WebServer/Documents/earthsync
--- /Library/Perl/5.8.1/YAML.pm Tue Jun 25 01:02:09 2002
+++ YAML.pm Mon Apr 26 14:11:24 2004
@@ -1,5 +1,5 @@
package YAML;
-$VERSION = '0.35';
+$VERSION = '0.35j';
# This module implements a Loader and Dumper for the YAML serialization
# language, VERSION 1.0 TRIAL2. (http://www.yaml.org/spec/)
@@ -931,7 +931,11 @@
return &$handler(YAML::Node->new($node, $explicit));
}
else {
- return CORE::bless $node, $package;
+ if (ref $node) {
+ return CORE::bless $node, $package;
+ } else {
+ return CORE::bless \$node, $package;
+ }
}
}
elsif ($explicit !~ m|/|) {