aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Shevchenko <andy@smile.org.ua>2008-11-16 16:17:40 +0000
committerAndy Shevchenko <andy@smile.org.ua>2008-11-16 16:17:40 +0000
commit9303e6c1c7d7da954c082597f2ed44878d678973 (patch)
tree45fc974b5eecd93068195f3e208e1d153ed7e196
parenta801e86610a37d34d53095c3538740cd26233e79 (diff)
downloadrenrot-9303e6c1c7d7da954c082597f2ed44878d678973.tar.gz
renrot-9303e6c1c7d7da954c082597f2ed44878d678973.tar.bz2
trimValue() -> trim_value(). boolConverter() now works with untrimmed values.git-andy
git-svn-id: file:///svnroot/renrot/branches/andy@590 fe2816f4-e837-0410-b10a-f608c9d244a1
-rwxr-xr-xrenrot12
1 files changed, 6 insertions, 6 deletions
diff --git a/renrot b/renrot
index 437cb40..027e32f 100755
--- a/renrot
+++ b/renrot
@@ -391,3 +391,3 @@ sub boolConv {
sub boolConverter {
- my $value = shift;
+ my $value = trim_value(shift);
if ($value =~ m/^(0|No|False|Off)$/i) {
@@ -615,3 +615,3 @@ sub getOptions {
########################################################################################
-# Usage : trimValue($value)
+# Usage : trim_value($value)
# Purpose : removes heading and trailing spaces
@@ -622,3 +622,3 @@ sub getOptions {
# See Also : N/A
-sub trimValue {
+sub trim_value {
my $value = shift;
@@ -641,3 +641,3 @@ sub parsePair {
if ($str =~ m/^([^=]+)=(.+)/) {
- ($key, $value) = (trimValue($1), trimValue($2));
+ ($key, $value) = (trim_value($1), trim_value($2));
$value =~ s/^[\'\"](.+)[\'\"]/$1/; # trim quotes
@@ -645,3 +645,3 @@ sub parsePair {
} elsif ($str =~ m/^([^=]+)=$/) {
- $key = trimValue($1);
+ $key = trim_value($1);
dbgmsg (4, "Parsed empty '$key', applying default value: ", defined $value ? "'$value'" : "undef", "\n");
@@ -797,3 +797,3 @@ sub keywordizer {
$keywordArr[$i] =~ s/\r?\n$//; # remove CR and LF symbols
- push (@result, trimValue($keywordArr[$i])) if ($keywordArr[$i] !~ m/^\s*$/);
+ push (@result, trim_value($keywordArr[$i])) if ($keywordArr[$i] !~ m/^\s*$/);
}

Return to:

Send suggestions and report system problems to the System administrator.