projects
/
BackupPC.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* Fix for config.pl writing code to handle multi-line expressions.
[BackupPC.git]
/
lib
/
BackupPC
/
Storage
/
Text.pm
diff --git
a/lib/BackupPC/Storage/Text.pm
b/lib/BackupPC/Storage/Text.pm
index
8a8b528
..
e1d31cc
100644
(file)
--- a/
lib/BackupPC/Storage/Text.pm
+++ b/
lib/BackupPC/Storage/Text.pm
@@
-30,7
+30,7
@@
#
#========================================================================
#
#
#========================================================================
#
-# Version 3.0.0beta2, released 1
1
Nov 2006.
+# Version 3.0.0beta2, released 1
8
Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
# See http://backuppc.sourceforge.net.
#
@@
-344,8
+344,8
@@
sub ConfigFileMerge
while ( <C> ) {
if ( /^\s*\$Conf\{([^}]*)\}\s*=(.*)/ ) {
my $var = $1;
while ( <C> ) {
if ( /^\s*\$Conf\{([^}]*)\}\s*=(.*)/ ) {
my $var = $1;
+ $skipExpr = "\$fakeVar = $2\n";
if ( exists($newConf->{$var}) ) {
if ( exists($newConf->{$var}) ) {
- $skipExpr = "\$fakeVar = $2\n";
my $d = Data::Dumper->new([$newConf->{$var}], [*value]);
$d->Indent(1);
$d->Terse(1);
my $d = Data::Dumper->new([$newConf->{$var}], [*value]);
$d->Indent(1);
$d->Terse(1);
@@
-359,11
+359,14
@@
sub ConfigFileMerge
} else {
$contents .= $_;
}
} else {
$contents .= $_;
}
- if ( defined($skipExpr) ) {
+ if ( defined($skipExpr)
+ && ($skipExpr =~ /^\$fakeVar = *<</
+ || $skipExpr =~ /;[\n\r]*$/) ) {
#
# if we have a complete expression, then we are done
# skipping text from the original config file.
#
#
# if we have a complete expression, then we are done
# skipping text from the original config file.
#
+ $skipExpr = $1 if ( $skipExpr =~ /(.*)/s );
eval($skipExpr);
$skipExpr = undef if ( $@ eq "" );
}
eval($skipExpr);
$skipExpr = undef if ( $@ eq "" );
}