All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Methods now use
selfto callConfigitself, instead of hardcoding toConfig. This allows for inheritance with theConfigclass, without breaking its core functionality.
Due to a user error, version 3.0.2 has been skipped.
- Updated tests supplied with Config.
.readnow uses%!data.clone, instead of%!data. This should fix an issue where theHashused is shared between the objects, resulting in hard-to-debug errors.
Config has been rebuilt from the ground up. This is a relatively old
project of mine, which I used to get into Raku. I've learned many new things
in the past couple years, many things of which have been applied to this
project.
Much of the user-facing interface is the same, however, breaking some backwards
compatibility was inevitable with some of the new ways I wanted Config to
function. Please read through this CHANGELOG carefully, and consider reading
the documentation if you encounter issues. If you have any questions or
remarks, you can also send an email to ~tyil/raku-devel@lists.sr.ht.
-
.newnow (optionally) accepts aHashwhich will be used as a template. From this template, environment variables will be checked for existence, and used if they exist. You must also set a:nameattribute, which will be used as a prefix for all the variables. This should make it easier to include environment variable based configuration in applications.Additionally, if the
:nameattribute is set, a number of standard directories will be probed to see if there's a usable configuration file to read. Which directories to probe is based on the XDG Base Directory Specification.Both environment and XDG-path based auto-loading of configuration can be turned off with
:!from-envand:!from-xdgrespectively. -
Logis now included to provide some debug logging. Any application using this will get logging in their preferred format through this.
-
The
Configobject is now immutable. Calling methods that alter the configuration values (such as.read,.set,.unset) will now return a newConfigobject. Raku has a very pretty.=operator that may come in handy! -
The
Exceptionclasses are now inX::Config, and the redundantExceptionsuffix has been removed. -
When setting an explicit parser, the parser must be given as a type object, instead of a
Str. This will lead to potential issues being known at compile-time, rather than runtime. -
Config's license has changed fromAGPL-3.0toLGPL-3.0-only. The Lesser General Public License allows use ofConfig, even in closed code bases. This should make the module more usable for all sorts of people, while still maintaining a strong focus on keeping it Free Software.
.clonemethod now exists to create a clone of the Config object.
.readwill now return theConfigobject, instead of aBool.
apikey to META6.json
- Update dependency to
Hash::Mergeto useapiandversionadverbs
-
Lingering say statement in get-parser, breaking tests for Rakudo Star users (GitHub#4)
-
Useless
use lib "lib"statements from tests -
Useless dd statement from tests
- A CHANGELOG is now present to keep track of changes between versions
- Fix
:deleteadverb