Skip to content
YAML Implementation for Perl 6
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore yaml() returns YAML::API object May 22, 2017
META6.json Add META6.json Jun 10, 2017

Perl6 YAML

Build Status

A YAML Loader and Dumper


Currently this depends on LibYAML.pm6

Install from Sources

You can install this YAML module from source like this:

$ zef install
# or
$ git clone
$ cd yaml-perl6
$ zef install .


The toplevel API is the first thing we want to get stable. The layer under that, the Loader/Dumper/Reader/Writer/Parser/Emitter will change, so it's not recommended to use that and think it will always work. Make sure to update LibYAML also when updating this module.

# current usage
use YAML;

my $yaml = q:to/./
    integer: 23
      a: true
      b: false
    - x
    - y
    - z
    This is: document no. 2

# get back single document
# note that currently, this will parse the complete string instead
# of stopping after the first document
my $doc = yaml.load($yaml);
my %hash = yaml.load($yaml);

# load all documents
my @docs = yaml.all.load($yaml);
my $docs = yaml.all.load($yaml);

# dump data to YAML
my $yaml = yaml.dump(%data1, @data2, ...);
my @docs = (%data1, @data2);
my $yaml = yaml.dump(@docs);


  • Load and Dump strings, numbers, booleans, arrays, hashes, (objects)
  • Load and Dump Aliases/Anchors, including cyclic structures


  • Tags
  • Files and Filehandles
  • Error messages
  • Allow other parsers/emitters as a backend
  • Other low level API stuff


YAMLish is a pure-perl6 module for YAML that doesn't rely on an external library like YAML currently does.

You can’t perform that action at this time.