Bug 10640: give ModBookseller() an explicit return value.
authorKenza Zaki <kenza.zaki@biblibre.com>
Thu, 25 Jul 2013 08:18:11 +0000 (10:18 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Sun, 8 Sep 2013 20:35:45 +0000 (20:35 +0000)
commitbe4fb1db9cc17d6d4f10ad8e633b5b87844d1472
tree767f0725b61ff04c0ed09cfa1f51b235d81076bc
parent995a270dd10bd2dd56222fcdcb29ab033fad567e
Bug 10640: give ModBookseller() an explicit return value.

Before, ModBookseller always returns undef. This patch modifies it in
order to be more explicit.

Now it returns :

1 -> If a modification has been done
0E0 -> If the given ID doesn't exist
undef -> If no ID given

It also fixes one of the tests which didn't pass before
in t/db_dependent/Bookseller.t

To Test:
prove t/db_dependent/Bookseller.t
Bookseller.t .. 1/54
[Some warnings about uninitialized values]
t/db_dependent/Bookseller.t .. ok
All tests successful.
Files=1, Tests=54,  1 wallclock secs ( 0.03 usr  0.00 sys +  0.46 cusr  0.04 csys =  0.53 CPU)
Result: PASS

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Change is logical and passes new and old tests.
Fixed the author line to have Kenza's correct email address.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
C4/Bookseller.pm
t/db_dependent/Bookseller.t