[Koha-patches] [PATCH] Changes to bulkmarcimport.pl
paul POULAIN
paul.poulain at biblibre.com
Mon Dec 29 11:46:18 CET 2008
David Bavousett a écrit :
Hi David (& welcome onboard :-) )
> + elsif ($record->field($sourcetag,$sourcesubfield)){
>
mmm... this is wrong. ->field($x,$y) is invalid. Should have been written
+ elsif ($record->field($sourcetag)){
> + my $source=$record->field($sourcetag)->subfield($sourcesubfield)
FYI: This could have been written :
my $source = $record->subfield($sourcetag,$sourcesubfield);
shorter & don't fail if $field->sourcetag does not exist, thus, the if()
before is not needed.
--
Paul POULAIN
http://www.biblibre.com
Expert en Logiciels Libres pour l'info-doc
Tel : (33) 4 91 81 35 08
More information about the Koha-patches
mailing list