in reply to how Sub::Name set anonymous subroutine 's caller to NOT __ANON__ ?
The CV structure used to represent coderefs internally in Perl's guts has slots for the sub's name and stash (package). This information is used by Carp when generating stack traces. Sub::Name uses some XS to poke some strings into those slots.
|
|---|