Description
Perl code can run cleanup actions automatically when execution leaves a lexical scope. This is useful for releasing locks, restoring settings, closing temporary resources, or rolling back local state.
It is a developer library. Cleanup code should be simple and reliable, because it may run during error handling or early returns.