Skip to content

Instantly share code, notes, and snippets.

@robinedwards
Created October 14, 2010 15:16
Show Gist options
  • Save robinedwards/626348 to your computer and use it in GitHub Desktop.
Save robinedwards/626348 to your computer and use it in GitHub Desktop.
# 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