X-Git-Url: https://git.p6c8.net/devedit.git/blobdiff_plain/5a4bc87c675dd76627a0d413707139f2e0530eea..4e40e9a450e412da79b7c3ef4a1eaae268b206a4:/modules/Config/DevEdit.pm?ds=sidebyside diff --git a/modules/Config/DevEdit.pm b/modules/Config/DevEdit.pm index 8adfd35..e423819 100644 --- a/modules/Config/DevEdit.pm +++ b/modules/Config/DevEdit.pm @@ -3,10 +3,10 @@ package Config::DevEdit; # # Dev-Editor - Module Config::DevEdit # -# Parse the configuration file +# Read and parse the configuration files # # Author: Patrick Canterino -# Last modified: 2004-01-16 +# Last modified: 2004-04-25 # use strict; @@ -22,13 +22,33 @@ use base qw(Exporter); # read_config() # -# Parse the configuration file +# Read the configuration files of Dev-Editor # # Params: Path to configuration file # # Return: Configuration (Hash Reference) sub read_config($) +{ + my $file = shift; + + my $config = parse_config($file); + + $config->{'errors'} = parse_config($config->{'error_file'}); + $config->{'templates'} = parse_config($config->{'template_file'}); + + return $config; +} + +# parse_config() +# +# Parse an INI-style configuration file +# +# Params: Path to configuration file +# +# Return: Configuration (Hash Reference) + +sub parse_config($) { my $file = shift; local *CF;