The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

YAMLScript - Program in YAML

SYNOPSIS

A YAML file:

    # food.yaml
    fruit:
    - apple
    - banana
    nuts:
    - cashew
    - drupe

A YAMLScript file:

    # data.ys
    !yamlscript/v0/data

    foods:: load("food.yaml")
    numbers:: 6..9

Perl code:

    # script.pl
    use strict; use warnings;
    use YAMLScript;
    use IO::All;
    use Data::Dumper qw(Dumper);
    $Data::Dumper::Indent = 1;
    $Data::Dumper::Terse = 1;

    my $ys = io('data.ys')->all;
    my $data = YAMLScript->new->load($ys);

    print Dumper($data);

Run it:

    $ perl script.pl
    {
      'foods' => {
        'fruit' => [
          'apple',
          'banana'
        ],
        'nuts' => [
          'cashew',
          'drupe'
        ]
      },
      'numbers' => [
        6,
        7,
        8,
        9
      ]
    }

DESCRIPTION

YAMLScript is a programming language that uses YAML as a base syntax.

See https://yamlscript.org for more info.

Proper docs coming soon.

SEE ALSO

AUTHORS

COPYRIGHT AND LICENSE

Copyright 2022-2023 by Ingy döt Net

This is free software, licensed under:

The MIT (X11) License