in reply to YAML::TINY and module install test

So how is it failing? Maybe you want
YAML::Tiny->read( "$orders_yam" ) or die "Couldn't read file: errno($!) : errstr =", YAML::Tiny->errstr;

Replies are listed 'Best First'.
Re^2: YAML::TINY and module install test
by porcustal (Initiate) on Feb 11, 2009 at 02:54 UTC

    Heh yea thanks, some error reporting would be good :) I get this with the error code added...

    sg:~/desktop % perl yaml.pl Couldn't read file: errno() : errstr =Stream does not end with newline + character at yaml.pl line 10.
    I don't know what this is refering to.. i haven't used the read() function much, but why is it asking for this mysterious new-line?

    I'm on an Mac OS X computer btw.

    Learning Perl, one %hash at a time....
      YAML::Tiny seems to think your yaml file isn't properly formatted. Since you're on OS X, and ysh thinks your yaml is fine, its probably a bug in YAML::Tiny (missing binmode). You could probably work around it with
      use open IN => ':bytes'; use YAML::Tiny; ....
      If that fixes it, you should report the bug.

        Hmm didn't make any difference when i just added that. But then going on the thought that its a file encoding issue I switched from SubethaEdit to vim and remade the customers.yml then reran the script and got a new error :)

        Bad or unsupported hash line at /usr/local/lib/perl5/site_perl/5.10.0/YAML/Tiny.pm line 279.

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