|
|
||
|---|---|---|
| .github | CI test prior to release | |
| .META | 0.0.2 | |
| doc | CI test prior to release | |
| lib | CI test prior to release | |
| t | Initial commit | |
| xt | CI test prior to release | |
| .gitignore | CI test prior to release | |
| Changes | 0.0.2 | |
| dist.ini | Initial commit | |
| LICENSE | Initial commit | |
| META6.json | 0.0.2 | |
| README.md | CI test prior to release | |
| run-tests | CI test prior to release | |
Actions Status Actions Status Actions Status
NAME
auto-dynamic - automatically vivify dynamic variables
SYNOPSIS
use auto-dynamic;
$*foo = 42;
say $*foo; # 42
%*hash<a> = 666;
dd %*hash; # {:a(666)}
@*array[2] = "ok";
say @*array; # [Any, Any, "ok"]
&*handler = { say "duh" }
&*handler(); # duh
DESCRIPTION
Unknown dynamic variables return a Failure in standard Raku. That may be undesired in some situations.
The auto-dynamic distribution enables the automatic vivification of dynamic variables in the scope in which the use statement is executed. It is the no strict equivalent for dynamic variables.
CAUTION
The functionality of this distribution relies on the current way that accesses to dynamic variables are being turned into bytecode. Which may change at any point in the future. As such, this distribution is more intended as a proof of concept.
AUTHOR
Elizabeth Mattijsen liz@raku.rocks
Source can be located at: https://codeberg.org/lizmat/auto-dynamic . Comments and Pull Requests are welcome.
If you like this module, or what I'm doing more generally, committing to a small sponsorship would mean a great deal to me!
COPYRIGHT AND LICENSE
Copyright 2024, 2026 Elizabeth Mattijsen
This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.