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)
committerGalen Charlton <galen.charlton@liblime.com>
Mon, 5 Jan 2009 22:16:38 +0000 (16:16 -0600)
commit0b1c856e4b15d484abb2e800344f4ee21ac2886d
tree97d51e5cb8ab068c7f4eb2ea5f8a5761d75adcca
parent80781eedeb7c8920b81f87cd402ee3b1685f2172
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]