No need for this.
This commit is contained in:
1 parent
46ca6f6fe7
commit
2d7c309c9e
2 files changed
+13
-13
No files matched your search
+3
-3
@@ -28,13 +28,13 @@ sub conf_get
|
|||||||
|
|
||||||
# Return the requested configuration value(s).
|
# Return the requested configuration value(s).
|
||||||
if ($count == 1) {
|
if ($count == 1) {
|
||||||
return $Auto::SETTINGS{c}{$val[0]};
|
return $Auto::SETTINGS{$val[0]};
|
||||||
}
|
}
|
||||||
elsif ($count == 2) {
|
elsif ($count == 2) {
|
||||||
return $Auto::SETTINGS{c}{$val[0]}{$val[1]};
|
return $Auto::SETTINGS{$val[0]}{$val[1]};
|
||||||
}
|
}
|
||||||
elsif ($count == 3) {
|
elsif ($count == 3) {
|
||||||
return $Auto::SETTINGS{c}{$val[0]}{$val[1]}{$val[2]};
|
return $Auto::SETTINGS{$val[0]}{$val[1]}{$val[2]};
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
+10
-10
@@ -76,27 +76,27 @@ sub parse
|
|||||||
my @sblk = split('@@@', $blk);
|
my @sblk = split('@@@', $blk);
|
||||||
|
|
||||||
# Check to see if this config option already exists.
|
# Check to see if this config option already exists.
|
||||||
if (defined $rs{c}{$sblk[0]}{$sblk[1]}{$ebuf[0]}) {
|
if (defined $rs{$sblk[0]}{$sblk[1]}{$ebuf[0]}) {
|
||||||
# It does, so merely push this second one to the existing array.
|
# It does, so merely push this second one to the existing array.
|
||||||
push(@{ $rs{c}{$sblk[0]}{$sblk[1]}{$ebuf[0]} }, $param);
|
push(@{ $rs{$sblk[0]}{$sblk[1]}{$ebuf[0]} }, $param);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
# It doesn't, create it as an array.
|
# It doesn't, create it as an array.
|
||||||
@{ $rs{c}{$sblk[0]}{$sblk[1]}{$ebuf[0]} } = @param;
|
@{ $rs{$sblk[0]}{$sblk[1]}{$ebuf[0]} } = @param;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
# We're inside a block with no parameter.
|
# We're inside a block with no parameter.
|
||||||
$rs{c}{$blk}{$ebuf[0]} = $ebuf[1];
|
$rs{$blk}{$ebuf[0]} = $ebuf[1];
|
||||||
|
|
||||||
# Check to see if this config option already exists.
|
# Check to see if this config option already exists.
|
||||||
if (defined $rs{c}{$blk}{$ebuf[0]}) {
|
if (defined $rs{$blk}{$ebuf[0]}) {
|
||||||
# It does, so merely push this second one to the existing array.
|
# It does, so merely push this second one to the existing array.
|
||||||
push(@{ $rs{c}{$blk}{$ebuf[0]} }, $param);
|
push(@{ $rs{$blk}{$ebuf[0]} }, $param);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
# It doesn't, create it as an array.
|
# It doesn't, create it as an array.
|
||||||
@{ $rs{c}{$blk}{$ebuf[0]} } = @param;
|
@{ $rs{$blk}{$ebuf[0]} } = @param;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -104,13 +104,13 @@ sub parse
|
|||||||
# We're not inside a block.
|
# We're not inside a block.
|
||||||
|
|
||||||
# Check to see if this config option already exists.
|
# Check to see if this config option already exists.
|
||||||
if (defined $rs{c}{$ebuf[0]}) {
|
if (defined $rs{$ebuf[0]}) {
|
||||||
# It does, so merely push this second one to the existing array.
|
# It does, so merely push this second one to the existing array.
|
||||||
push(@{ $rs{c}{$ebuf[0]} }, $param);
|
push(@{ $rs{$ebuf[0]} }, $param);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
# It doesn't, create it as an array.
|
# It doesn't, create it as an array.
|
||||||
@{ $rs{c}{$ebuf[0]} } = @param;
|
@{ $rs{$ebuf[0]} } = @param;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user