http://www.perlmonks.org?node_id=36037


in reply to RE: RE: Factory Pattern for Class Heirarchy
in thread Factory Pattern for Class Heirarchy

Merlyn, I don't hate you :-)

Actually, I have seen 'autouse' before and had just forgot about it. And it's even in the standard distro. The biggest difference between the 'autouse' module and my code is that my module doesn't require any pre-declaration of what modules you want to use; you just call them and they get loaded. It's a step beyond run-time loading. Not that I'm promoting this as how this should be done; this was just an educational exercise.

In developing this module, I had the chance to look at AUTOLOAD and the 'goto' function and gain a better understanding of what they were capable of. As I said in the notes with my code, this was not something I would put into production code. But it was a demonstration of one way to approach this problem.

  • Comment on RE: RE: RE: Factory Pattern for Class Heirarchy