=begin pod

=head1 NAME

auto-dynamic - automatically vivify dynamic variables

=head1 SYNOPSIS

=begin code :lang<raku>
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
=end code

=head1 DESCRIPTION

Unknown dynamic variables return a C<Failure> in standard Raku.  That
may be undesired in some situations.

The C<auto-dynamic> distribution enables the automatic vivification
of dynamic variables in the scope in which the C<use> statement is
executed.  It is the L<C<no strict>|https://docs.raku.org/syntax/strict>
equivalent for dynamic variables.

=head1 CAUTION

The functionality of this distribution relies on the current way that
accesses to dynamic variables are being turned into bytecode.  Which
I<may> change at any point in the future.  As such, this distribution
is more intended as a proof of concept.

=head1 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
L<small sponsorship|https://github.com/sponsors/lizmat/>  would mean a great
deal to me!

=head1 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.

=end pod
