]> git.koha-community.org Git - koha.git/commit
Bug 6679 Fix scripts in admin & acqui to pass Perl::Critic
authorChris Cormack <chrisc@catalyst.net.nz>
Mon, 8 Aug 2011 08:29:05 +0000 (20:29 +1200)
committerChris Nighswonger <chris.nighswonger@gmail.com>
Sat, 8 Oct 2011 16:16:39 +0000 (12:16 -0400)
commit3ca4d242d0c6b5e881f3c33fec9c30f785c16c27
tree1494c5cdac64d1867e898462c0ec79731a4520b0
parent1fdebcb296788b7c95f5644fa5712ba644448b8c
Bug 6679 Fix scripts in admin & acqui to pass Perl::Critic

Scripts in admin & acqui subdirectores weren't passing t/00-testcritic.t. This
patch add admin & acqui scripts to test case and fix various errors related to
Perl::Critic compliancy.

- Fixing a style error to pass Perl::Critic, plus silencing a warn
- More style errors, plus fixing a security issue
- Explicitly using Carp

Contrary to common belief, subroutine prototypes do not enable
compile-time checks for proper arguments. Don't use them.

Defining a named sub within another sub, does not prevent that
subroutine being global

Signed-off-by: Frédéric Demians <frederic@tamil.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 7cdea5de355e853f25300821cc641672443177de)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
acqui/addorderiso2709.pl
acqui/basketgroup.pl
acqui/neworderempty.pl
admin/authorised_values.pl
admin/preferences.pl
t/00-testcritic.t