> I have a programmer who is building an interface for backuppc to edit the
> config.pl and the per user config.pl files. However, so far he has written
> the interface using xml files.
> I am trying to find out how to parse the config.pl file and I know it is in
> the source code somewhere. I am willing to bet that Craig has already
> written a parser that pulls the config.pl and then dumps all of the config
> parameters into variables that can then be used to populate the new
I parse config.pl using perl itself. It's just perl code after all.
See ConfigRead() in lib/BackupPC/Lib.pm. After that you have a %Conf
hash that exactly represents what was in the config.pl file.
If you want to get to the comments too, look at configure.pl. It has
code that merges new config settings into the existing file, so it
understands the basic layout of the file. That might be useful
so you can show descriptive text to the user.