pub enum Scope {
Global,
Local,
Named(SymStr),
InPlace,
}Expand description
installation scope in the state_tables
Variants§
Global
globally visible, does not expire
Local
globally visible, but expires at the end of the current group
Named(SymStr)
a named scope - visible only when explicitly activated
InPlace
in-place: replace the value in the frame it was last bound in, WITHOUT
recording a new undo entry (or globally, at the locked base frame, if it
was never bound). Perl State.pm:175 $scope eq 'inplace' (“Special case
for \box & friends”). This is Knuth’s “same level” reassignment / what
@xworld21 tentatively called scope => 'definition': the binding keeps its
save-stack level, so a mutation rides exactly as long as the current
binding — persisting past the current group if the binding was made above
it, reverting with the group if it was made locally. Distinct from Global
(which promotes + wipes lower-frame undo) and Local (which pushes an outer
binding down a level). The Value-table fast path is assign_value_inplace.