Bruce, Here's a simple module that parses the Python config file format you specified. Use it like this:
use ParseConfig;
use warnings;
use strict;
my $cfg = ParseConfig->new('viewcvs.conf');
# Print only the specified root
# use $cfg->show() to print the entire file
$cfg->show('svn_roots');
# Add a name/path pair to the specified root
$cfg->add('svn_roots', test8 => '/foo/bar');
$cfg->show('svn_roots');
# Remove a name/path pair to the specified root
# Unimplemented: this is for you to finish!
#print $cfg->remove('svn_roots', 'test8');
As you can see, I left the "remove" method as an exercise for the reader :)
If you decide to use it, you may want to add a "save" method as well.
Hope this provides enough to get you started.
- Mark.
ParseConfig.pm
Description: Binary data
_______________________________________________ Perl-Win32-Users mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
