version 1.2, 2004/12/08 22:34:30
|
version 1.3, 2004/12/09 20:01:48
|
Line 69 while (my $fname = shift) {
|
Line 69 while (my $fname = shift) {
|
print STDERR "Aborting: The target file $db_filename exists.".$/; |
print STDERR "Aborting: The target file $db_filename exists.".$/; |
next; |
next; |
} |
} |
my ($error,$constructed_hash) = &process_file($fname,$db_filename); |
my ($error,$constructed_hash) = &process_file($fname,$db_filename,$debug); |
if (! defined($error) || ! $test) { |
if (! defined($error) || ! $test) { |
$error = &write_hash($db_filename,$constructed_hash); |
$error = &write_hash($db_filename,$constructed_hash); |
} |
} |
Line 104 sub process_file {
|
Line 104 sub process_file {
|
# P:put |
# P:put |
# D:delete |
# D:delete |
my ($action,$time,$concatenated_data) = split(':',$command,3); |
my ($action,$time,$concatenated_data) = split(':',$command,3); |
|
if ($fname eq 'roles.hist' && $concatenated_data =~ /^.*:.*:/) { |
|
(undef,undef,$concatenated_data) = split(':',$concatenated_data,3); |
|
} |
my @data = split('&',$concatenated_data); |
my @data = split('&',$concatenated_data); |
foreach my $k_v_pair (@data) { |
foreach my $k_v_pair (@data) { |
my ($key,$value) = split('=',$k_v_pair,2); |
my ($key,$value) = split('=',$k_v_pair,2); |