Created
October 14, 2010 15:16
-
-
Save robinedwards/626348 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# test.pl >> | |
use Config::ApacheFormat; | |
use Data::Dump 'dump'; | |
my $cfg = Config::ApacheFormat->new( | |
include_support => 1, | |
expand_vars => 1, | |
fix_booleans => 1, | |
duplicate_directives => "last", | |
); | |
$cfg->read(shift); | |
print dump($cfg->{_data}); | |
# eg.conf >> | |
foo | |
fooa 0 | |
foob 1 | |
fooc "" | |
# dump eg.conf with test.pl | |
$ perl test.pl eg.conf | |
{ foo => [1], fooa => [0], foob => [1], fooc => [""] } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment