Help language development. Donate to The Perl Foundation

TOML zef:tony-o last updated on 2021-03-24

18a13ba10b7d83a1c43f6b121d038f536b454082/

TOML

A TOML 1.0.0 compliant serializer/deserializer.

Usage

Parsing TOML

use TOML;

my $config = from-toml("config.toml".IO.slurp);
# use $config like any ol' hash

Generating TOML

use TOML;

my $config = {
  bands => ['green day',
            'motorhead',
            't swift',],
  favorite => 'little big',
};

my $toml-config = to-toml($config);
#favorite = "little big"
#bands = ["green day",
#         "motorhead",
#         "t swift"]

License

License: Artistic-2.0

Authors

@tony-o

Credits

The tests here use @BurntSushi's toml-tests.