marc_original_order
rec1 rec2 rec
+ frec
regex prefix suffix surround
first lookup join_with
save_into_lookup
marc_encoding => 'utf-8',
config => $config,
load_row_coderef => sub {
- my ($database,$input,$mfn) = shift;
+ my ($database,$input,$mfn) = @_;
$store->load_row( database => $database, input => $input, id => $mfn );
},
);
die "need row argument" unless ($arg->{row});
die "need normalisation argument" unless ($arg->{rules});
+ # FIXME load this conditionally
+# use WebPAC::Normalize::ISBN;
+
no strict 'subs';
_set_lookup( $arg->{lookup} ) if defined($arg->{lookup});
_set_rec( $arg->{row} );
_clean_ds( %{ $arg } );
$load_row_coderef = $arg->{load_row_coderef};
- # FIXME load this conditionally
- use WebPAC::Normalize::ISBN;
-
eval "$arg->{rules}";
die "error evaling $arg->{rules}: $@\n" if ($@);
my ($marc_record_offset, $marc_fetch_offset) = (0, 0);
sub _get_ds {
+
+warn "## out = ",dump($out);
+
return $out;
}
=cut
+sub frec {
+ my @out = rec(@_);
+ warn "rec(",dump(@_),") has more than one return value, ignoring\n" if $#out > 0;
+ return shift @out;
+}
+
sub rec {
my @out;
if ($#_ == 0) {