Don't ask to ask, just ask | |
PerlMonks |
Re^3: Track open file handlesby salva (Canon) |
on Apr 06, 2017 at 13:35 UTC ( [id://1187281]=note: print w/replies, xml ) | Need Help?? |
Yes, true. It's actually more complicated than that. A lexical filehandle is made into a GLOB reference by open. But since that open() happens in FileHandle::Track, the associated symbol is generated using that package and the lexical filehandle variable Ah, but that is yet another different problem affecting only the name of the glob, which is something quite unimportant. I was talking about file handles passed as arguments by name. open looks for then into the caller package, so you would probably have to add specific code to handle those cases and qualify the file handle names yourself, or use some other trick, like creating the wrapper in the DB namespace, or using XS, etc. update:
Probably some module exists on CPAN allowing you to change the glob name.
In Section
Cool Uses for Perl
|
|