in reply to Stucked in YAML::Tiny
I too get that error if reading from test.yaml fails. Then $yaml silently becomes undef, the later use of $yaml->[0] autovivifies it into an array reference, and then it's not a blessed reference, and calling write on it fails.
I suggest to use the LoadFile and DumpFile functions instead, which seem to do proper error checking.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Stucked in YAML::Tiny
by ckj (Chaplain) on Jul 16, 2012 at 07:28 UTC | |
by moritz (Cardinal) on Jul 16, 2012 at 08:39 UTC | |
by aitap (Curate) on Jul 16, 2012 at 10:14 UTC |