in reply to How to identify the package of a subroutine given only a reference to it
If you mean the package/stash were it was originally defined in: Yes.
It's kept as special field inside the internal data.
There is a way to inspect this w/o dependencies using B
Otherwise there are various modules on CPAN doing that°.
°) see stash_name in
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to identify the package of a subroutine given only a reference to it (Sub::Identify)
by drclaw (Acolyte) on Jan 30, 2022 at 22:54 UTC |