aboutsummaryrefslogtreecommitdiff
path: root/lib/Config/Parser/toml.pm6
blob: 7d63593b65ae417b7b1a6920bc63a2d921d7c235 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#! /usr/bin/env false

use v6.c;

use Config::Parser;
use Config::TOML;

class Config::Parser::toml is Config::Parser
{
    method read(Str $path --> Hash)
    {
        from-toml(slurp $path);
    }

    method write(Str $path, Hash $config --> Bool)
    {
        spurt $path, to-toml($config);

        True;
    }
}