Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: YAML::TINY and module install test

by gnosti (Friar)
on Feb 11, 2009 at 05:21 UTC ( #742980=note: print w/ replies, xml ) Need Help??


in reply to YAML::TINY and module install test

At first glance, your YAML appears incorrectly formatted. The - order lines should be indented two spaces. I'm also dubious about your having two item: fields under - order. Do you know that those are hash keys, and that the second will tend to clobber the first?

I wonder if you've read sufficiently about the modules you are using. Perhaps you need to try going from perl data structures to YAML, to see what the formatting should be.

I would try the following (possibly valid) YAML:

--- email: goose@gmail.com orders: - order: wb090130 item: 0001 item: 0002 price: 3.98 downloads: 3 - order: wb090131 item: 0003 item: 0004 price: 3.98 downloads: 5 total: 7.96 ...
UPDATE: YAML should end with '...'


Comment on Re: YAML::TINY and module install test
Select or Download Code
Re^2: YAML::TINY and module install test
by porcustal (Initiate) on Feb 11, 2009 at 22:36 UTC

    Well I think your right I need to study the format of the expected yaml file. I used your excellent suggestion and created lines to write out a yaml file which worked, and which i could read, so it was my bad.

    But the documention of the module leaves alot to be desired, so for now i'll just stick with rolling my own storage flatfile...

    manythanks for all the help!



    Learning Perl, one %hash at a time....
      But the documention of the module leaves alot to be desired, so for now i'll just stick with rolling my own storage flatfile... manythanks for all the help!

      That sounds like you're giving up :) its not easy to get ahead reinventing wheels. http://yaml.org/
      AppConfig...

      Yes I plan on coming back to it, :) but for now its easier to make a data file I understand than trying to understand someone else's creation... I'm not doing anything complicated atm. Data::dump looks like a quick to understand module if i need something more robust, app::config seems like it might be worth looking at too sometime.



      Learning Perl, one %hash at a time....

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://742980]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2014-09-21 21:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (176 votes), past polls