From 28e3fa6d3514a560410f514ab8537a2a1206a7f7 Mon Sep 17 00:00:00 2001
From: Patrick Spek
Date: Sun, 12 Jul 2020 08:54:43 +0200
Subject: Use rakumod extension
---
lib/Config/Parser.pm6 | 13 -------------
lib/Config/Parser.rakumod | 13 +++++++++++++
lib/Config/Parser/NULL.pm6 | 30 ------------------------------
lib/Config/Parser/NULL.rakumod | 30 ++++++++++++++++++++++++++++++
4 files changed, 43 insertions(+), 43 deletions(-)
delete mode 100644 lib/Config/Parser.pm6
create mode 100644 lib/Config/Parser.rakumod
delete mode 100644 lib/Config/Parser/NULL.pm6
create mode 100644 lib/Config/Parser/NULL.rakumod
(limited to 'lib/Config')
diff --git a/lib/Config/Parser.pm6 b/lib/Config/Parser.pm6
deleted file mode 100644
index 5d0343b..0000000
--- a/lib/Config/Parser.pm6
+++ /dev/null
@@ -1,13 +0,0 @@
-#! /usr/bin/env false
-
-use v6.d;
-
-unit class Config::Parser;
-
-#| Attempt to read the file at a given $path, and returns its
-#| parsed contents as a Hash.
-method read(IO() $path --> Hash) { … }
-
-#| Attempt to write the $config Hash at a given $path. Returns
-#| True on success, False on failure.
-method write(IO() $path, Hash $config --> Bool) { … }
diff --git a/lib/Config/Parser.rakumod b/lib/Config/Parser.rakumod
new file mode 100644
index 0000000..5d0343b
--- /dev/null
+++ b/lib/Config/Parser.rakumod
@@ -0,0 +1,13 @@
+#! /usr/bin/env false
+
+use v6.d;
+
+unit class Config::Parser;
+
+#| Attempt to read the file at a given $path, and returns its
+#| parsed contents as a Hash.
+method read(IO() $path --> Hash) { … }
+
+#| Attempt to write the $config Hash at a given $path. Returns
+#| True on success, False on failure.
+method write(IO() $path, Hash $config --> Bool) { … }
diff --git a/lib/Config/Parser/NULL.pm6 b/lib/Config/Parser/NULL.pm6
deleted file mode 100644
index 2845e3c..0000000
--- a/lib/Config/Parser/NULL.pm6
+++ /dev/null
@@ -1,30 +0,0 @@
-#! /usr/bin/env false
-
-use v6.d;
-
-use Config::Parser;
-
-#| The Config::Parser::NULL is a parser to mock with for testing purposes.
-#| It exposes an additional method, set-config, so you can set a config
-#| Hash to return when calling `read`.
-unit class Config::Parser::NULL is Config::Parser;
-
-my %mock-config;
-
-#| Return the mock config, skipping the file entirely.
-multi method read(IO() $path --> Hash)
-{
- %mock-config;
-}
-
-#| Set the mock config to return on read.
-method set-config(Hash $config)
-{
- %mock-config = $config;
-}
-
-#| Return True, as if writing succeeded.
-multi method write(IO() $path, Hash $config --> Bool)
-{
- True;
-}
diff --git a/lib/Config/Parser/NULL.rakumod b/lib/Config/Parser/NULL.rakumod
new file mode 100644
index 0000000..2845e3c
--- /dev/null
+++ b/lib/Config/Parser/NULL.rakumod
@@ -0,0 +1,30 @@
+#! /usr/bin/env false
+
+use v6.d;
+
+use Config::Parser;
+
+#| The Config::Parser::NULL is a parser to mock with for testing purposes.
+#| It exposes an additional method, set-config, so you can set a config
+#| Hash to return when calling `read`.
+unit class Config::Parser::NULL is Config::Parser;
+
+my %mock-config;
+
+#| Return the mock config, skipping the file entirely.
+multi method read(IO() $path --> Hash)
+{
+ %mock-config;
+}
+
+#| Set the mock config to return on read.
+method set-config(Hash $config)
+{
+ %mock-config = $config;
+}
+
+#| Return True, as if writing succeeded.
+multi method write(IO() $path, Hash $config --> Bool)
+{
+ True;
+}
--
cgit v1.1