From 8bdc0d07437d3ac4134fb4b9c8e9a15e93a2b93b Mon Sep 17 00:00:00 2001 From: eschnett Date: Fri, 18 Jan 2013 13:25:28 +0000 Subject: Correct regular expressions for parsing configuration.ccl files git-svn-id: http://svn.cactuscode.org/flesh/trunk@4940 17b73243-c579-4c4c-a9d2-2d5706c11dac --- lib/sbin/ConfigurationParser.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/sbin/ConfigurationParser.pl b/lib/sbin/ConfigurationParser.pl index 19af291a..c90dd910 100644 --- a/lib/sbin/ConfigurationParser.pl +++ b/lib/sbin/ConfigurationParser.pl @@ -290,7 +290,7 @@ re.ccl of thorn '$thorn'"); # "\n Please adjust thorn \U$thorn\E to use \'Requires\' instead."); # } } - elsif($line =~ m/^\s*REQUIRES\s*(.*)/i) + elsif($line =~ m/^\s*REQUIRES\s+(.*)/i) { my $cap = $1; if ($cap !~ m{^[A-Za-z0-9_. ]+$}) { @@ -298,7 +298,7 @@ re.ccl of thorn '$thorn'"); } $cfg->{"\U$thorn\E REQUIRES"} .= "$cap "; } - elsif($line =~ m/^\s*OPTIONAL\s*/i) + elsif($line =~ m/^\s*OPTIONAL\s+/i) { ($optional, $define, $line_number) = &ParseOptionalBlock($filename, $line_number, \@data); if ($optional !~ m{^[A-Za-z0-9_. ]+$}) { @@ -307,7 +307,7 @@ re.ccl of thorn '$thorn'"); $cfg->{"\U$thorn\E OPTIONAL"} .= "$optional "; $cfg->{"\U$thorn\E OPTIONAL \U$optional\E DEFINE"} = $define; } - elsif($line =~ m/^\s*OPTIONAL_IFACTIVE\s*/i) + elsif($line =~ m/^\s*OPTIONAL_IFACTIVE\+*/i) { ($optional, $define, $line_number) = &ParseOptionalBlock($filename, $line_number, \@data); if ($optional !~ m{^[A-Za-z0-9_. ]+$}) { @@ -316,7 +316,7 @@ re.ccl of thorn '$thorn'"); $cfg->{"\U$thorn\E OPTIONAL_IFACTIVE"} .= "$optional "; $cfg->{"\U$thorn\E OPTIONAL_IFACTIVE \U$optional\E DEFINE"} = $define; } - elsif($line =~ m/^\s*NO_SOURCE\s*/i) + elsif($line =~ m/^\s*NO_SOURCE\s*$/i) { $cfg->{"\U$thorn\E OPTIONS"} .= "NO_SOURCE"; } -- cgit v1.2.3