perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <>
Subject Re: [Patch mp2] Solving module reloading problems (Apache::Reload) with ModPerl::Util::clear_namespace()
Date Tue, 24 Aug 2004 19:15:35 GMT
Geoffrey Young <> writes:


> what if you want to unload just Foo and not Foo::Bar?  CGI and Digest
> come to mind...

It's really hard to make module unloading work 100% reliably because

  0) {modules} != {packages} so reloading a module will influence
     every package it touches (even the ones you forgot to delete),

  1) perl sometimes does compile-time tricks to avoid symbol lookups,

  2) symbols are occasionally aliased into other namespaces (eg Exporter), 
     and those aliases won't get rebound once the new symbol definitions
     are loaded.

  ... I'm sure there's a whole bunch more issues 
      that I'm overlooking (ithreads?)  ...

There's always Symbol::delete_package, but it looks pretty
pedestrian when compared to Philippe's patch.  I certainly
don't see any harm done by including it in mp2, since it
may work just fine for the majority of users.

Joe Schaefer

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message