Subject: | YAML::Tiny does not handle old Scalar::Util |
I've embedded YAML::Tiny in an installer program so it can run it on whichever perl happens to be available on a given Linux distribution. I'm running into an issue on Mandrake 9.0.
The error is: "refaddr" is not exported by the Scalar::Util installed
The attached oneliner should fix the problem:
http://github.com/toddr/YAML-Tiny/commit/76cf29b94eb0c7d4d67c03b5afa4b57aa1c06037
The error is: "refaddr" is not exported by the Scalar::Util installed
The attached oneliner should fix the problem:
http://github.com/toddr/YAML-Tiny/commit/76cf29b94eb0c7d4d67c03b5afa4b57aa1c06037
Subject: | yaml_tiny_scalar.patch |
diff --git a/lib/YAML/Tiny.pm b/lib/YAML/Tiny.pm
index dc3a445..2ccd889 100644
--- a/lib/YAML/Tiny.pm
+++ b/lib/YAML/Tiny.pm
@@ -586,6 +586,7 @@ sub LoadFile {
BEGIN {
eval {
require Scalar::Util;
+ Scalar::Util->can('refaddr') or die("Scalar::Util is too old");
};
if ( $@ ) {
# Failed to load Scalar::Util