aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md8
-rw-r--r--lib/Config.rakumod6
2 files changed, 11 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 93fd1ae..eaae2b4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic
Versioning](http://semver.org/spec/v2.0.0.html).
+## [UNRELEASED]
+
+### Changed
+
+- Methods now use `self` to call `Config` itself, instead of hardcoding to
+ `Config`. This allows for inheritance with the `Config` class, without
+ breaking its core functionality.
+
## [3.0.3] - 2020-11-16
Due to a user error, version 3.0.2 has been skipped.
diff --git a/lib/Config.rakumod b/lib/Config.rakumod
index cddf256..e896517 100644
--- a/lib/Config.rakumod
+++ b/lib/Config.rakumod
@@ -146,7 +146,7 @@ multi method read (
--> Config:D
) {
- Config.new(
+ self.new(
%!template,
:$!name,
data => merge-hash(%!data.clone, %data),
@@ -252,7 +252,7 @@ multi method set (
$index = $value;
- Config.new(
+ self.new(
%!template,
:$!name,
:%data,
@@ -287,7 +287,7 @@ multi method unset (
$index{@parts[*-1]}:delete;
- Config.new(
+ self.new(
%!template,
:$!name,
:%data,