aboutsummaryrefslogtreecommitdiff
path: root/lib/Config/Parser/NULL.pm6
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2019-07-12 11:42:23 +0200
committerPatrick Spek <Tyil@users.noreply.github.com>2019-07-14 08:29:24 +0200
commit640dc5f8da3e42aa4d82aba450bcacd82046caf6 (patch)
tree71faaedfa0772e1609eb12b7c5bf53d412c95a35 /lib/Config/Parser/NULL.pm6
parent67f036c37e062e2c864e35b1fe06b51e74eb523d (diff)
Attempt to allow IO::Path for path based arguments
Diffstat (limited to 'lib/Config/Parser/NULL.pm6')
-rw-r--r--lib/Config/Parser/NULL.pm614
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/Config/Parser/NULL.pm6 b/lib/Config/Parser/NULL.pm6
index 5113043..2352cfc 100644
--- a/lib/Config/Parser/NULL.pm6
+++ b/lib/Config/Parser/NULL.pm6
@@ -12,11 +12,16 @@ class Config::Parser::NULL is Config::Parser
my %mock-config = ();
#| Return the mock config, skipping the file entirely.
- method read(Str $path --> Hash)
+ multi method read(Str $path --> Hash)
{
%mock-config;
}
+ multi method read(IO::Path $path --> Hash)
+ {
+ %mock-config;
+ }
+
#| Set the mock config to return on read.
method set-config(Hash $config)
{
@@ -24,7 +29,12 @@ class Config::Parser::NULL is Config::Parser
}
#| Return True, as if writing succeeded.
- method write(Str $path, Hash $config --> Bool)
+ multi method write(Str $path, Hash $config --> Bool)
+ {
+ True;
+ }
+
+ multi method write(IO::Path $path, Hash $config --> Bool)
{
True;
}