B::Hooks::EndOfScope::XS(3) User Contributed Perl Documentation B::Hooks::EndOfScope::XS(3)

# [DESCRIPTION](#DESCRIPTION)

This is the implementation of B::Hooks::EndOfScope based on Variable::Magic, which is an XS module dependent on a compiler. It will always be automatically preferred if Variable::Magic is available.

```
    on_scope_end { ... };
    on_scope_end $code;
```

Registers $code to be executed after the surrounding scope has been compiled.

This is exported by default. See Sub::Exporter on how to customize it.

# [POD ERRORS](#POD_ERRORS)

Hey! **The above document had some coding errors, which are explained below:**

[Around line 58:](#Around)

Unknown directive: =func

2026-10-25 perl v5.44.0

---

Document: B::Hooks::EndOfScope::XS(3pm) from perl-b-hooks-endofscope 0.28-r7 (Chainguard OS)
Source: https://github.com/karenetheridge/B-Hooks-EndOfScope
