From b366ef7066f63df2e19bd93e34de202f34a1c282 Mon Sep 17 00:00:00 2001
From: Patrick Spek
Date: Thu, 27 Apr 2017 14:53:13 +0200
Subject: Initial commit
---
lib/Config/Parser/toml.pm6 | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 lib/Config/Parser/toml.pm6
(limited to 'lib')
diff --git a/lib/Config/Parser/toml.pm6 b/lib/Config/Parser/toml.pm6
new file mode 100644
index 0000000..7d63593
--- /dev/null
+++ b/lib/Config/Parser/toml.pm6
@@ -0,0 +1,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;
+ }
+}
--
cgit v1.1