Bug 2505: adding warnings to C4/Biblio.pm
authorAndrew Moore <andrew.moore@liblime.com>
Wed, 17 Dec 2008 22:28:04 +0000 (16:28 -0600)
committerHenri-Damien LAURENT <henridamien@koha-fr.org>
Tue, 27 Jan 2009 11:19:43 +0000 (12:19 +0100)
commitf1f78e547594e02910023b1e045a40c0ade25048
tree5b8c11a2610e82d2d60ebce45e91571feb144417
parentd7a0dcc55b2459a47d6371e5e849db4b36040099
Bug 2505: adding warnings to C4/Biblio.pm

I added 'use warnings' to C4::Biblio and made a handful of changes to
reduce the number of warnings emitted.

One notable spot is the change in the regex in
C4::Biblio::GetNoZebraIndexes. I have replaced the parens with a character
class. The parens change the way 'split' works, making it return elements
for each delimiter. We did not want those elements returned, and they
only resulted in "'' => undef" being added to the final hash. They also
resulted in two "undefined" warnings for each pass through the loop. I've
included a simple test for this function.

There may be a few warnings still emitted in spots, but either I haven't
seen them yet, or I have chosen to not fix them yet because they require
too much change.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
C4/Biblio.pm
t/lib/KohaTest/Biblio/GetNoZebraIndexes.pm [new file with mode: 0644]