Config::Magic .72 released
From: Rusty Phillips (rustyp_at_freeshell.org)
Date: 06/23/04
- Previous message: Daniel Miller: "math::trulyrandom"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 23 Jun 2004 02:10:04 GMT
New module now available on CPAN for reading all kinds of
configuration files. .7 was just added to CPAN. .72 should enter
shortly, as it was uploaded a few hours ago. The difference is a fix of
some problems with the POD at the end of the module - none of the actual
mechanics of the module were changed.
The modules reads configuration files/strings and converts them into hash
references. It is capable of reading pretty much any kind of standard
config file - XML, CSV, apache, INI files, space separated, equals
separated, and many more. It can even read hybrids. Here's an example of
what the module is capable of:
Input file:
Section 1 {
[Section 4]
#Comment Style 1
\\Comment Style 2
; Comment Style 3
Monkey:1
Monkey=>2
Monkey:=3
Monkey 4
<Section 2>
Foo = Bar
Baz { Bip:1
Pants=5 }
</Section>
<Tasty Cheese="3" />
<Section 5>
Foo=Bippity,boppity,boo
</Section>
}
Output (from Data::Dumper)
$VAR1 = {
'Section 1' => {
'Tasty' => {
'Cheese' => {}
},
'Section' => [
{
'Foo ' => 'Bar',
'Baz' => {
'Bip' => '1',
'Pants' => '5'
},
'2' => {}
},
{
'Foo' => [
'Bippity',
'boppity',
'boo'
],
'5' => {}
}
],
'Section 4' => {
'Monkey' => [
'1',
'2',
'3',
'4'
]
}
}
};
Feedback is greatly appreciated.
- Previous message: Daniel Miller: "math::trulyrandom"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|