Re: Problem moving from Data::Dumper to YAML



Rob Chanter wrote:
Hi List,

I'm having a little trouble with YAML. The current version of a script
uses Data::Dumper to keep running totals over multiple runs of the script
in a nested hash, as well as a couple of arrays to give other programs
hints about how to order the data (for, say, graphing). I'd very much like
to switch over to YAML for the serialising.

[snip]
Now, according to the documentation, YAML::Dump() "works very much like
Data::Dumper::Dumper()", and should pretty much be a drop-in replacement.
[snip]

I guess the answer is that it "works very much like
Data::Dumper::Dumper()" as the YAML docs say,
but is not in fact a "drop-in replacement", which the
docs do not claim. It would appear that not all of the
parameters that Dumper() supports are supported
by Dump().

--
Brad

.



Relevant Pages

  • Problem moving from Data::Dumper to YAML
    ... I'm having a little trouble with YAML. ... as well as a couple of arrays to give other programs ... @dispositions = qw(total_rejects redirects viruses spam clean); ...
    (perl.beginners)
  • YAML no reorder data at loading
    ... I want to load the following yaml content: ... And build two arrays: one for keys, that must be in this order: ...
    (comp.lang.ruby)
  • Re: nested hash / openstruct question
    ... Your YAML has arrays under DEV and QA. ... Nobu Nakada ...
    (comp.lang.ruby)
  • Re: problem with YAML:load
    ... A friend of me, give a simple script for starting point, i save it as ... Nota = Struct.new ... [root@kannel blajarruby]# ruby ./lyaml01 ... irb:002:0> require 'yaml' ...
    (comp.lang.ruby)
  • Beginner: Options with YAML
    ... I already use YAML to handle persistance of a queue, ... So I have a script with these settings (currently as Constants in the ... How do I put this in a YAML file and load it into my Ruby script? ...
    (comp.lang.ruby)