in reply to
Re^2: Need help to build a framework
in thread Need help to build a framework
I did something like this back in 5.6 that required some really funky workarounds. Today I would recommend the following approach (what I did with PGObject's registered type system).
- You have a module private (lexically scoped) hash variable connecting an extension to a plugin class name.
- You specify an interface for that plugin. We could call it extract_files().
- You call it somehow like this:
This approach allows you to add whatever extensions you want and have them register themselves (through an API) which can check for the extract_files interface and add to the registry.