X-Git-Url: https://git.p6c8.net/devedit.git/blobdiff_plain/b9d3c70c666be41d61b30f6b41d39f19d15582cd..1fbf10bec35aeb289a9cf3e1c65a826883bffdea:/modules/Config/DevEdit.pm?ds=inline diff --git a/modules/Config/DevEdit.pm b/modules/Config/DevEdit.pm index 7402ff1..c387514 100644 --- a/modules/Config/DevEdit.pm +++ b/modules/Config/DevEdit.pm @@ -6,7 +6,7 @@ package Config::DevEdit; # Read and parse the configuration files # # Author: Patrick Canterino -# Last modified: 2005-01-06 +# Last modified: 2005-06-09 # use strict; @@ -14,6 +14,8 @@ use strict; use vars qw(@EXPORT); use Carp qw(croak); +use Text::ParseWords; + ### Export ### use base qw(Exporter); @@ -37,6 +39,25 @@ sub read_config($) $config->{'errors'} = parse_config($config->{'error_file'}); $config->{'templates'} = parse_config($config->{'template_file'}); + # Parse list of forbidden files + + if($config->{'forbidden'}) + { + my @files; + + foreach my $file(parse_line('\s+',0,$config->{'forbidden'})) + { + $file =~ tr!\\!/!; + + $file = '/'.$file unless($file =~ m!^/!); + $file =~ s!/+$!!g; + + push(@files,$file); + } + + $config->{'forbidden'} = \@files; + } + return $config; }