NAME
Zuzu::Weak - weak-reference classification helpers
DESCRIPTION
Provides the shared Perl-side classification for values that may later be stored through weak-storage rules. The classification is based on ZuzuScript semantics rather than host implementation details.
FUNCTIONS
is_weakable_value( $value )
Returns true for reference-capable Zuzu values and false for scalar Zuzu values. null, booleans, numbers, strings, binary strings, and regular expressions are scalar values and are never weakened.
make_weak_value( $value )
Compatibility helper for code that needs a value-level API. Perl weak storage must weaken the target scalar itself, so new storage code should use store_value instead.
resolve_weak_value( $value )
Returns the value unchanged. Perl weak storage resolves through the target scalar itself.
store_value( $slot_ref, $value, $is_weak )
Stores $value into $slot_ref. When $is_weak is true and the value is weakable from ZuzuScript's perspective, weakens the stored reference in that slot.
slot_value( $slot_ref )
Reads a storage scalar. A dead Perl weak reference naturally reads as undef, matching the core weak-storage representation.
COPYRIGHT AND LICENCE
Zuzu::Weak is copyright Toby Inkster.
It is free software; you may redistribute it and/or modify it under the terms of either the Artistic License 1.0 or the GNU General Public License version 2.