|Just another Perl shrine|
Reloading modules- suppressing warnings works sometimes?by JPaul (Hermit)
|on Dec 20, 2003 at 20:46 UTC||Need Help??|
JPaul has asked for the wisdom of the Perl Monks concerning the following question:
I have another stoater here, that I'm sure some wise monk will be able to point out what exactly is going on - but truly has me confused.
First of all, I only recently discovered perl could literally reload modules on the fly. This is why I love perl. Not only is this so immensely cool - but perl makes it so easy. I firmly believe this is a sign of a superior language. But enough ass kissing.
My reload module is amply stolen from Apache::StatINC, as suggested here. This works perfectly for loading modules like it should - EXCEPT when it reloads itself. I suspect changing the package namespace on the function while it is running perhaps cocks up the lexical scope for the local - but I'm not entirely positive.
All I want is for the warning to go away.
I could, simply, not use warnings at all - but I'd much rather find a way around this, if I can. Turning warnings off doesn't work either, I believe also related to scope.
-- Alexander Widdlemouse undid his bellybutton and his bum dropped off --
Update: Apparently my terminology is guff. Not lexical scope, but dynamic.