in reply to Re^6: Moose and YAML
in thread Moose and YAML

YAML's Fine Manual has the solution:
Bless(perl-node, [yaml-node | class-name])
Associate a normal Perl node, with a yaml node. A yaml node is an object tied to the YAML::Node class. The second argument is either a yaml node that you've already created or a class (package) name that supports a yaml_dump() function. A yaml_dump() function should take a perl node and return a yaml node.
So all you have to do is write a yaml_dump() function in your class.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Replies are listed 'Best First'.
Re^8: Moose and YAML
by Anonymous Monk on May 01, 2010 at 06:58 UTC