diff options
author | Patrick Spek <p.spek@tyil.nl> | 2019-07-12 11:42:23 +0200 |
---|---|---|
committer | Patrick Spek <Tyil@users.noreply.github.com> | 2019-07-14 08:29:24 +0200 |
commit | 640dc5f8da3e42aa4d82aba450bcacd82046caf6 (patch) | |
tree | 71faaedfa0772e1609eb12b7c5bf53d412c95a35 /lib/Config/Parser | |
parent | 67f036c37e062e2c864e35b1fe06b51e74eb523d (diff) |
Attempt to allow IO::Path for path based arguments
Diffstat (limited to 'lib/Config/Parser')
-rw-r--r-- | lib/Config/Parser/NULL.pm6 | 14 |
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; } |