Req advice on new module to be uploaded: Config::Magic?
From: Rusty Phillips (rustyp_at_freeshell.org)
Date: 06/19/04
- Previous message: Charlie: "mechanize question"
- Next in thread: Rusty Phillips: "Re: Req advice on new module to be uploaded: Config::Magic?"
- Reply: Rusty Phillips: "Re: Req advice on new module to be uploaded: Config::Magic?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 19 Jun 2004 06:01:48 -0500
Hello,
I'm new to developing perl modules for CPAN, but I just finished a
lot of work on something I think others will find useful.
Basically, what it does is parse almost any kind of config file
and convert it into a hash tree. It uses Parse::RecDescent, and
the "language" it recognizes is a superset of most other config
files. Because it has no configuration options, and is just supposed
to work, I was thinking of calling it Config::Magic.
I thought I'd check in here first to get feedback before I upload.
I've already registered at PAUSE.
Just to give the idea of what this does, here's an example input:
Section 1 {
[Section 4 ]
#Comment Style 1
\\Comment Style 2
; Comment Style 3
Monkey:1
Monkey=>2
Monkey:=3
<Section 2>
Foo = Bar
Baz { Bip:1
Pants=5 }
</Section>
<Tasty Cheese="3" />
<Section 5>
Foo=Bippity,boppity,boo
</Section>
}
And here's the corresponding output (inspecting the generated hash
reference with Data::Dumper:
$VAR1 = {
'Section 1' => {
'Tasty' => {
'Cheese' => '3'
},
'Section' => [
{
'Foo ' => 'Bar',
'Baz' => {
'Bip' => '1',
'Pants' => '5'
},
'2' => {}
},
{
'Foo' => [
'Bippity',
'boppity',
'boo'
],
'5' => {}
}
],
'Section 4 ' => {
'Monkey' => [
'1',
'2',
'3'
]
}
}
};
So my questions are:
1) Do you think the name is appropriate and searchable? If not, do
you have any suggestions?
2) Does anyone else know of any all-encompassing config modules
like this? I couldn't find any, but there's a lot of stuff in CPAN
(Config::Auto does not have this degree of flexibility)
3) Anyone here interested in giving it a try (I'll announce on
comp.lang.perl.announce when it's uploaded)?
Let me know shortly if you would. Thanks!
Rusty Phillips
- Previous message: Charlie: "mechanize question"
- Next in thread: Rusty Phillips: "Re: Req advice on new module to be uploaded: Config::Magic?"
- Reply: Rusty Phillips: "Re: Req advice on new module to be uploaded: Config::Magic?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|