What's a good library to manipulate Apache2 config files?

apache, java, perl, python

Solution

In Perl, you've got at least 2 modules for that:

Apache::ConfigFile

Apache::Admin::Config

Problem

I'd like to create a script to manipulate Apache2 configuration directly, reading and writing its properties (like adding a new VirtualHost, changing settings of one that already exists). Are there any libs out there, for Perl, Python or Java that automates that task?

Original source