Skip to content

EitanSchuler/yaml-libyaml-pm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Name

YAML::XS - Perl YAML Serialization using XS and libyaml

yaml-libyaml-pm

Synopsis

use YAML::XS;

my $yaml = Dump [ 1..4 ];
my $array = Load $yaml;

Description

Kirill Siminov's libyaml is arguably the best YAML implementation. The C library is written precisely to the YAML 1.1 specification. It was originally bound to Python and was later bound to Ruby.

This module is a Perl XS binding to libyaml which offers Perl the best YAML support to date.

This module exports the functions Dump, Load, DumpFile and LoadFile. These functions are intended to work exactly like YAML.pm's corresponding functions.

Configuration

$YAML::XS::UseCode
$YAML::XS::DumpCode
$YAML::XS::LoadCode

If enabled supports deparsing and evaling of code blocks.

$YAML::XS::QuoteNumericStrings

When true (the default) strings that look like numbers but have not been numified will be quoted when dumping.

This ensures leading that things like leading zeros and other formatting are preserved.

Using YAML::XS with Unicode

Handling unicode properly in Perl can be a pain. YAML::XS only deals with streams of utf8 octets. Just remember this:

$perl = Load($utf8_octets);
$utf8_octets = Dump($perl);

There are many, many places where things can go wrong with unicode. If you are having problems, use Devel::Peek on all the possible data points.

See Also

  • YAML.pm

  • YAML::Syck

  • YAML::Tiny

Author

Ingy döt Net <[email protected]>

Copyright and License

Copyright 2007-2017. Ingy döt Net.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://www.perl.com/perl/misc/Artistic.html

Packages

No packages published

Languages

  • C 89.5%
  • C++ 4.8%
  • Perl 3.5%
  • Other 2.0%
  • Other 0.2%