Hi all,
I think that using `tie' to hang out-of-band information to a data
structure, as YAML::Node does, is a poor choice of approach. There is
every possibility that a user has a data structure with ties that they
care about, which will be nuked AIUI...
What would be wrong with just using a hash in the YAML object doing
the dumping, from the reference address of the object (as returned by
Scalar::Util::refaddr) to the information? Stay as "hands-off" to the
data structure as possible.
Otherwise, there is a good example of handing out-of-band information
off a reference without tie (using a custom mg_type) in the Info/
directory of the Pixie distribution. It is a fairly simple XS module.
--
Sam Vilain, sam@...
A meeting is an event at which the minutes are kept and the hours are
lost.
- anon.
|