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

Um, whats that mean? What kind of output do you expect, and how does it differ from what you get?

Replies are listed 'Best First'.
Re^6: Moose and YAML
by llancet (Friar) on Apr 28, 2010 at 11:12 UTC
    In my example, the Blessed hashref can only produce:
    --- foo: fooValue
    after set keys. I want this also work with Blessed blessed hashref.
      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