YAML::XS 可以接受 UseAliases=0 吗?
Can YAML::XS honor UseAliases=0?
YAML has an alias mechanism such that any given structure
in memory gets serialized once. Any other references to that structure
are serialized only as alias markers. This is how YAML can serialize
duplicate and recursive structures.
Sometimes, when you KNOW that your data is nonrecursive in nature, you
may want to serialize such that every node is expressed in full. (ie
as a copy of the original). Setting $YAML::UseAliases to 0 will allow
you to do this. This also may result in faster processing because the
lookup overhead is by bypassed.
查看 YAML::XS's LibYAML 的源代码,似乎(经验测试表明)该模块不支持 $YAML::UseAliases=0
有没有办法让 YAML::XS 不 转储别名(而不是展平整个数据结构)?
不,目前 YAML::XS 无法做到这一点。
您可以在 GitHub 上创建问题,但不能保证它会被实现 ;-)
YAML has an alias mechanism such that any given structure in memory gets serialized once. Any other references to that structure are serialized only as alias markers. This is how YAML can serialize duplicate and recursive structures.
Sometimes, when you KNOW that your data is nonrecursive in nature, you may want to serialize such that every node is expressed in full. (ie as a copy of the original). Setting $YAML::UseAliases to 0 will allow you to do this. This also may result in faster processing because the lookup overhead is by bypassed.
查看 YAML::XS's LibYAML 的源代码,似乎(经验测试表明)该模块不支持 $YAML::UseAliases=0
有没有办法让 YAML::XS 不 转储别名(而不是展平整个数据结构)?
不,目前 YAML::XS 无法做到这一点。
您可以在 GitHub 上创建问题,但不能保证它会被实现 ;-)