On Tue Jul 31 22:28:21 2001, RT_System wrote: > > On Fri, Jun 29, 2001 at 04:30:14PM -0400, J�rg Ziefle wrote: > > > This is a bug report for perl from gt4556a@gatech.edu, > > > generated with the help of perlbug 1.26 running under perl > 5.00503. > > > > > > > > > ----------------------------------------------------------------- > > > [Please enter your report here] > > > > > > Problem: Symbol.pm 's delete_package function doesn't delete the > package > > > from > > > %INC, so when require()ing the package again, it's still found in > %INC and > > > not > > > reloaded. > > > > > > Fix: making delete_package delete the package from %INC as well or > > > documenting > > > this so the coder is aware of it and can manually remove the > package from > > > %INC. > > > > > > Sample code and a patch on request. > > > > Consider this a request. > > Personally, I would prefer a doc patch. When I've used delete_package > before, I've not wanted anything deleted from %INC. At most, make the > behavior optional. It'd be hard to write code for it anyway; what if > I > want to delete the package Tie::RefHash::Nestable? There's no > accompanying file for that. Or, conversely, if I delete the package > (and file from %INC) for Tie::RefHash, the package > Tie::RefHash::Nestable will still be around. > > delete_package should not be used to delete a module or library, and I > don't think we should conflate the two. It is there to just clear out > a > namespace, which could be used in conjunction with delete'ing from > %INC. > Perhaps there's room for someone to write an "unuse" pragma? It'd be > pretty hairy, I think, to completely back out of a "use". How does > Perl > know which symbols have been exported to which packages? Which > packages > are in which files? It seems like someone wants to do with > delete_package more than it is designed to do, and even doing all that > is desired would be difficult anyway. pudge responded to the original poster's request more than eleven years ago, and the original poster has not further responded. I believe pudge's reasoning is sound and recommend that this ticket be closed. I am taking the ticket for that purpose and will close it in seven days unless someone wants to take the discussion over. Thank you very much. Jim Keenan --- via perlbug: queue: perl5 status: open https://rt.perl.org:443/rt3/Ticket/Display.html?id=7206Thread Previous | Thread Next