blob: 8d0e3e71cf9b173e8dbeeb1b7bf0f50f7d791307 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#! /usr/bin/env false
# SPDX-FileCopyrightText: 2023 Patrick Spek <p.spek@tyil.nl>
# SPDX-License-Identifier: AGPL-3.0-only
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;
}
|