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 Cormack <chrisc@catalyst.net.nz>
Wed, 21 Sep 2011 02:56:29 +0000 (14:56 +1200)
commit7cdea5de355e853f25300821cc641672443177de
tree58dfc494f5151be7ddb0d647617433cb505f3cb0
parent9ee49d65d46f12722af19e72576b187adbb72292
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>
acqui/addorderiso2709.pl
acqui/basketgroup.pl
acqui/neworderempty.pl
admin/authorised_values.pl
admin/preferences.pl
t/00-testcritic.t