in reply to Hiding Internal Classes ?

John,

Toby Everett and I have just come up with a pretty complete solution to this and many other problems. Our solution is a much better way to handle dynamically created packages. We're still polishing it up before we put it on CPAN, but if you want to get a pre-release peek at it, take a look at ftp://ftp.bike-nomad.com/Class-Prototyped-0.03.tar.gz.

The basic idea is to have each object live in its own namespace, with automatically generated names. And you have complete control over inheritance (from other objects or regular Perl classes), and a full reflection capability, and the ability to add and delete data fields or subroutines on the fly and have everything work dynamically.

And subroutine calls are just as fast as regular Perl calls. If you've done any work with the Self language, you'll appreciate the ability to make objects with unique behavior that can inherit from other objects or classes.

Take a look at our work; we'd enjoy suggestions.