470 |
} |
} |
471 |
|
|
472 |
my $found = 0; |
my $found = 0; |
473 |
|
my $just_single = 1; |
474 |
|
|
475 |
my $eval_code; |
my $eval_code; |
476 |
# remove eval{...} from beginning |
# remove eval{...} from beginning |
482 |
|
|
483 |
# do actual replacement of placeholders |
# do actual replacement of placeholders |
484 |
# repeatable fields |
# repeatable fields |
485 |
$format =~ s/v(\d+)(?:\^(\w))?/$self->get_data(\$rec,$1,$2,$i,\$found)/ges; |
if ($format =~ s/v(\d+)(?:\^(\w))?/$self->get_data(\$rec,$1,$2,$i,\$found)/ges) { |
486 |
|
$just_single = 0; |
487 |
|
} |
488 |
|
|
489 |
# non-repeatable fields |
# non-repeatable fields |
490 |
$format =~ s/s(\d+)(?:\^(\w))?/$self->get_data(\$rec,$1,$2,0,\$found)/ges; |
if ($format =~ s/s(\d+)(?:\^(\w))?/$self->get_data(\$rec,$1,$2,0,\$found)/ges) { |
491 |
|
return if ($i > 0 && $just_single); |
492 |
|
} |
493 |
|
|
494 |
if ($found) { |
if ($found) { |
495 |
$log->debug("format: $format"); |
$log->debug("format: $format"); |