fix crash introduced in previous patch
authorGalen Charlton <galen.charlton@liblime.com>
Wed, 15 Jul 2009 02:00:36 +0000 (22:00 -0400)
committerGalen Charlton <galen.charlton@liblime.com>
Wed, 15 Jul 2009 02:05:24 +0000 (22:05 -0400)
commit6c2b7f8ccbc98b2911eecf9049a52f78d70e173a
tree99d4c8eafd2d0835d67a317a100faad17796caab
parent46b9ee7a931ed079c6175330a26fc6cc155405bb
fix crash introduced in previous patch

In the previous patch,

-    my @subf = $field->subfields;
-    (defined @subf) or @subf = ();

is not equivalent to

+    my @subf = $field->subfields || ();

as, the results of $field->subields is interpeted in scalar
context, not list context, resutling in @subf containing
the number of subfields, not the subfield data itself, which
engenders the error

Can't use string ("1") as an ARRAY ref while "strict refs" in use

later on.  Changing the operator to 'or' instead of '||'
fixes this.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
cataloguing/additem.pl