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

use v6.d;

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

unit class Config::Parser::toml is Config::Parser;

method read(IO() $path --> Hash)
{
	from-toml($path.slurp);
}

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

	True;
}