Hayulp! Sub::WrapPackages and caller()

drhyde on 2003-12-19T12:12:49

It's time I fixed Sub::WrapPackages so that caller() Does The Right Thing. And it's making my brane hurt.

Internally, I use The Damian's Hook::LexWrap, which does voodoo with caller() itself. I need to be careful because I can't just go trampling on his voodoo in case someone using my module is also using a naked Hook::LexWrap elsewhere. Clues welcome please!

This also means that once I *have* got caller() working properly, I should run his test suite as part of mine to make sure I haven't broken him.


Sub::Uplevel

advent on 2003-12-21T10:10:12

I've not looked at your code or the problem in depth, but when I was writing Sub::Attempts I used Sub::Uplevel to fix my caller. Any use?

Re:Sub::Uplevel

2shortplanks on 2003-12-21T10:11:03

Ooops, that'll teach me not to check who I'm logged in as.

Re:Sub::Uplevel

drhyde on 2003-12-21T10:51:03

Unfortunately not, because one of the bugs documented is "Blows over any CORE::GLOBAL::caller you might have" - and Hook::LexWrap does have.