in reply to Re: Basic rest service help
in thread Basic rest service help

hi thanks for your response... i did correct the mistake. while creating the file(./book create treasury.yml) it gives "Cannot open treasury.yml: No such file or directory at ./book line 68." when i create a file with treasury.yml and run it gives "ERROR I Only Do Hashes: The submitted YAML data is not a HASH." .. what is the correct way to do this...

Replies are listed 'Best First'.
Re^3: Basic rest service help
by Anonymous Monk on Jan 24, 2011 at 09:58 UTC
    what is the correct way to do this...

    As described in the article? What exactly did you do?

      i created the file treasury.yml by using the following.

      #file name yaml.pl use YAML qw(Dump Bless); $hash = {isbn => '0-7852-1155-1', title => 'The New Strong Exhaustive +Concordance of the Bible', author => 'James Strong, LL.D., S.T.D.', p +ublisher => 'Thomas Nelson Publishers', city => 'Nashville, Tennessee +', year => '1995'}; print Dump $hash;

      perl yaml.pl > treasury.yml

      then i used ./book list.. not working

        then i used ./book list.. not working

        What is the first few bytes of treasury.yml?

        $ head -c10 treasury.yml | od -tacx1 0000000 - - - cr nl a u t h o - - - \r \n a u t h o 2d 2d 2d 0d 0a 61 75 74 68 6f 0000012
        Add something like this to library.cgi to see what it receives
        use Data::Dumper; warn Dumper($data),' ';