--- trunk/lib/WebPAC/Input.pm 2006/09/04 16:15:07 626 +++ trunk/lib/WebPAC/Input.pm 2006/09/06 18:08:30 634 @@ -551,25 +551,29 @@ my $regexpes; + my $log = $self->_get_logger(); + foreach my $f (keys %$modify_record) { -warn "--- f: $f\n"; + $log->debug("field: $f"); + foreach my $sf (keys %{ $modify_record->{$f} }) { -warn "---- sf: $sf\n"; + $log->debug("subfield: $sf"); + foreach my $from (keys %{ $modify_record->{$f}->{$sf} }) { my $to = $modify_record->{$f}->{$sf}->{$from}; #die "no field?" unless defined($to); -warn "----- transform: |$from| -> |$to|\n"; + $log->debug("transform: |$from| -> |$to|"); if ($sf =~ /^\^/) { my $regex = - 's/\Q'. $sf .'\E([^\^]+)\Q'. $from .'\E([^\^]+)/'. $sf .'$1'. $to .'$2/g'; + 's/\Q'. $sf .'\E(.*?)\Q'. $from .'\E(.*?)/'. $sf .'$1'. $to .'$2/g'; push @{ $regexpes->{$f} }, $regex; -warn ">>>>> $regex [sf]\n"; + $log->debug(">>>>> $regex [sf]"); } else { my $regex = 's/\Q'. $from .'\E/'. $to .'/g'; push @{ $regexpes->{$f} }, $regex; -warn ">>>>> $regex [global]\n"; + $log->debug(">>>>> $regex [global]"); } }