#!/usr/bin/perl -- use strict; use warnings; use Data::Dump qw/ dd /; use Config::General qw(ParseConfig); my $rawconfig = q{ ## workaround of some kind MaxConnPerIP 12 NoIPLimit image/* MaxConnPerIP 0 MaxConnPerIP 0 }; my %config = ParseConfig(-String => $rawconfig, -AutoTrue => 1); dd( \%config ); __END__ { IfModule => { IfModule => { "mod_limitipconn.c" => { Location => { "" => {} }, MaxConnPerIP => 12, NoIPLimit => "image/*" }, }, Location => { "/location2" => { MaxConnPerIP => 0 }, "/location3" => { MaxConnPerIP => 0 }, }, }, }