<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>In The Box - Latest Comments in One config file to rule them all</title><link>http://inthebox.disqus.com/</link><description></description><atom:link href="http://inthebox.disqus.com/one_config_file_to_rule_them_all/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Mon, 29 Sep 2008 01:41:26 -0000</lastBuildDate><item><title>Re: One config file to rule them all</title><link>http://inthebox.webmin.com/one-config-file-to-rule-them-all#comment-2723748</link><description>&lt;p&gt;This was a great read. Thanks for writing it!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mrxinu</dc:creator><pubDate>Mon, 29 Sep 2008 01:41:26 -0000</pubDate></item><item><title>Re: One config file to rule them all</title><link>http://inthebox.webmin.com/one-config-file-to-rule-them-all#comment-1606289</link><description>&lt;p&gt;I had a similar issue to overcome, this is my solution, with slightly less overheads...&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.hm2k.com/posts/storing-mysql-database-settings-for-php-and-perl-in-one-file" rel="nofollow"&gt;http://www.hm2k.com/posts/stor...&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's mainly for use with PHP and Perl, but might work in other languages.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">HM2K</dc:creator><pubDate>Mon, 07 Apr 2008 15:22:50 -0000</pubDate></item><item><title>Re: One config file to rule them all</title><link>http://inthebox.webmin.com/one-config-file-to-rule-them-all#comment-1606288</link><description>&lt;p&gt;You're right, Christian.  The editor in Wordpress is hateful and "corrects" certain characters, even when they're wrapped in pre tags.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">SwellJoe</dc:creator><pubDate>Wed, 12 Dec 2007 19:12:10 -0000</pubDate></item><item><title>Re: One config file to rule them all</title><link>http://inthebox.webmin.com/one-config-file-to-rule-them-all#comment-1606287</link><description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;the perl should read:&lt;/p&gt;

&lt;p&gt;###&lt;br&gt;my $file = "apache.config";&lt;br&gt;open(CONFIG, "&amp;lt; $file") or die "can't open $file: $!";&lt;br&gt;my %config = map {&lt;br&gt;      s/#.*//; # Remove comments&lt;br&gt;      s/^\s+//; # Remove opening whitespace&lt;br&gt;      s/\s+$//;  # Remove closing whitespace&lt;br&gt;      m/(.*?)\s*=\s*(.*)/; }&lt;br&gt;      ;&lt;br&gt; &lt;br&gt;# Print it out&lt;br&gt;use Data::Dumper;&lt;br&gt;print Dumper(\%config);&lt;br&gt;###&lt;/p&gt;

&lt;p&gt;###&lt;br&gt;my $file = "apache.config";&lt;br&gt;open(CONFIG, "&amp;lt; $file") or die "can't open $file: $!";&lt;br&gt;while () {&lt;br&gt;    chomp;&lt;br&gt;    s/#.*//; # Remove comments&lt;br&gt;    s/^\s+//; # Remove opening whitespace&lt;br&gt;    s/\s+$//;  # Remove closing whitespace&lt;br&gt;    next unless length;&lt;br&gt;    my ($key, $value) = split(/\s*=\s*/, $_, 2);&lt;br&gt;    $config{$key} = $value;&lt;br&gt;}&lt;br&gt; &lt;br&gt;# Print it out&lt;br&gt;use Data::Dumper;&lt;br&gt;print Dumper(\%config);&lt;br&gt;###&lt;/p&gt;

&lt;p&gt;Christian&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Christian</dc:creator><pubDate>Sun, 25 Nov 2007 05:48:35 -0000</pubDate></item><item><title>Re: One config file to rule them all</title><link>http://inthebox.webmin.com/one-config-file-to-rule-them-all#comment-1606286</link><description>&lt;p&gt;man, i read the entire thing thinking about webmin, probably because it was in the intro.  didn't even put 2 and 2 together.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">paul</dc:creator><pubDate>Thu, 11 Oct 2007 01:25:12 -0000</pubDate></item></channel></rss>
