Hey all-
I've been thinking about this for a while. Even with all of the docs out
there on how to construct a nice module, there's a lot of modules that
have poor or inconsistent interfaces, which don't pass -T or even -w,
and so on. So I was thinking: What if there was a Module::Interface that
module authors could use to create simple, consistent modules so CPAN
quality was potentially a little higher? Such a module might do
something like:
1. provide a new() method that handled options
and subclass-able blessing
2. provide a config() method for dealing with
object and module option configs
3. provide easy hooks for hybrid modules that
need both function and OO hooks.
4. bundle certain tools that could validate
the "style" (indenting, etc) of a module
in at least rudimentary terms
So, if I wanted to write a new module, I could just say:
use Module::Interface;
at the top and my module would already be many steps towards providing
proper blessing and configuration methods. Maybe error handling too.
Anyone have any input on this? It seems like a simple module like this
could potentially help CPAN. I tentatively chose the Module:: namespace
because Module::Reload is in there, and this would be something just for
use by other modules. Comments? Good idea? Bad idea?
Cheers,
Nate