aboutsummaryrefslogtreecommitdiff
path: root/lib/Config/Parser/NULL.pm6
diff options
context:
space:
mode:
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;
}