--- trunk/run.pl 2006/07/02 12:42:02 559 +++ trunk/run.pl 2006/07/02 20:14:21 564 @@ -105,7 +105,7 @@ "one=s" => \$only_filter, "only=s" => \$only_filter, "config" => \$config, - "debug" => \$debug, + "debug+" => \$debug, "stats" => \$stats, "validate=s" => \$validate_path, "marc-normalize=s" => \$marc_normalize, @@ -300,7 +300,6 @@ $log->error( "MFN $mfn validation errors:\n", join("\n", @errors) ) if (@errors); } - my $ds = WebPAC::Normalize::data_structure( row => $row, rules => $rules, @@ -329,6 +328,19 @@ } else { $marc->add_fields( @marc_fields ); + # tweak leader + if (my $new_l = WebPAC::Normalize::marc_leader()) { + + my $leader = $marc->leader; + + foreach my $o ( keys %$new_l ) { + my $insert = $new_l->{$o}; + $leader = substr($leader, 0, $o) . + $insert . substr($leader, $o+length($insert)); + } + $marc->leader( $leader ); + } + if ($marc_lint) { $lint->check_record( $marc ); my $err = join( "\n", $lint->warnings ); @@ -340,7 +352,7 @@ } if ($marc_dump) { - $log->info("MARC record on MFN $mfn\n", + $log->info("MARC record on MFN $mfn\tleader:", $marc->leader(), "\n", "Original imput row: ",dump($row), "\n", "Normalized MARC row: ",dump(@marc_fields), "\n", );