I've been looking around quite a lot lately. And I must say, I didn't
find a Configuration module that provided a single interface to multiple
backends.
Although many folks say a lot about abstraction and layering,
(I would think it common practice). I found only one that comes near. But
it's part of OpenInteract and not quite the same.
I think Config::Multi is not a bad name for this module. But Config::Front
would also be a name. I think it can have it's uses, as it is in fact a module
that only forms a front end to other config modules and unifies the API (to
a very simple key/value form). I'm writing it because I want to be able to
write unix/perl/win32 registry through one interface.
So which would be better:
Config::Multi
Config::Front
Config::End
Config::Frontend
I personally am quite charmed about the last one.
Best whishes,
Hans Oesterholt.
Randy W. Sims wrote:
Hans Oesterholt-Dijkema wrote:
Good point. Any suggestions?
With this module it's possible to have 1 Conf frontend using one
of the provided backends: String, File, SQL, INI for now, but
later probably Win32::Registry, maybe Wx::Config.
I wasn't really concerned about namespaces when I wrote this.
I like modules with short names.
Anyway It would be:
Config
Config::String
Config::File
Config::SQL
Config::INI
(...)
Config::Win32::Registry
Config::wxConfig
etc.
Sorry, Config is a core module (see perldoc Config). Look at other modules that do what you want:
Browse by catagory:
<http://search.cpan.org/modlist/Option_Parameter_Config_Processing>
Browse by module name:
<http://www.cpan.org/modules/by-module/Config/>
Search for keywords:
<http://search.cpan.org/search?query=config>
Those are just examples, you may find more with different search keywords, etc.
There are a lot of modules out there that handle config "files". Research what is available. If possible use or enhance an existing module. If you really believe you have a unique module, the above research will help suggest an appropriate name.
I'm not trying to discourage you, but there is already a lot of repitition and "junk" on CPAN. It's an authors responsibility to do the research before tossing another module on the heap.
My suggestion for a name (if you find that your module offers something unique) would be Config::<something>, where <something> hints that it's a front end to multiple output formats, maybe Multi????
Regards,
Randy.
-- Best regards, Hans Oesterholt-Dijkema
<<inline: wink_n.gif>>
