Re: perl yaml error

"Hugo Cornelis" <[email protected]>
Newsgroups gmane.text.yaml.general
Message-ID <[email protected]>
Works, and is way faster too.  Thanks.


On 5/24/07, Ingy dot Net <[email protected]> wrote:
> YAML.pm was written by me in 2001. It is not faithful to the spec. It is
> quite buggy, even though people use it daily.
>
> Try my new module: YAML::LibYAML which is a wrapper around
> Kirill's libyaml.
>
> It is still very young and doesn't handle circular refs,
> aliases/anchors, tags and objects yet, but will in the next few weeks.
>
> I just checked and your test case Loads correctly in YAML::LibYAML.
>
> Cheers, Ingy
>
>
> On 24/05/07 17:50 -0500, Hugo Cornelis wrote:
> > Hi,
> >
> >
> > If I run the following yaml through the perl yaml parser I get an error:
> >
> > syn10- spine PF 13:
> >  -
> >    - 6.38091
> >    - 7.73471
> >
> > perl -e 'use YAML "LoadFile"; my $a = LoadFile("1.yml")'
> >
> > YAML Error: Invalid element in map
> >   Code: YAML_LOAD_ERR_BAD_MAP_ELEMENT
> >   Line: 1
> >   Document: 1
> > at /usr/local/share/perl/5.8.7/YAML.pm line 33
> >
> >
> > If I remove the 'dash' from the key, or when I quote the key, the
> > error disappears.
> >
> > This yaml has been generated using the same perl module.  So, I guess,
> > this is a bug in the emitter or in the loader, but I am not sure in
> > which of the two.
> >
> > Do I have to quote the key name, like "syn10- spine PF 13" ?
> >
> > Also, on ypaste it works without error, it has ID 8.  So this seems to
> > say that this is correct yaml and it is a bug in the loader.
> >
> >
> > Hugo
> >
> >
> > --
> >                    Hugo Cornelis Ph.D.
> >
> >                  Research Imaging Center
> >   University of Texas Health Science Center at San Antonio
> >                    7703 Floyd Curl Drive
> >                 San Antonio, TX  78284-6240
> >
> >                    Phone: 210 567 8112
> >                      Fax: 210 567 8152
>


-- 
                    Hugo Cornelis Ph.D.

                  Research Imaging Center
   University of Texas Health Science Center at San Antonio
                    7703 Floyd Curl Drive
                 San Antonio, TX  78284-6240

                    Phone: 210 567 8112
                      Fax: 210 567 8152

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.