@@ -, +, @@ scripts that don't compile. --- C4/Installer/PerlDependencies.pm | 4 ++++ debian/control | 1 + t/db_dependent/00-strict.t | 24 ++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 0 deletions(-) create mode 100644 t/db_dependent/00-strict.t --- a/C4/Installer/PerlDependencies.pm +++ a/C4/Installer/PerlDependencies.pm @@ -573,6 +573,10 @@ our $PERL_DEPS = { 'usage' => 'Core', 'required' => '0', 'min_ver' => '0.05', + }, + 'Test::Strict' => { + 'usage' => 'Core', + 'required' => '0.14', } }; --- a/debian/control +++ a/debian/control @@ -68,6 +68,7 @@ Build-Depends: libcgi-session-driver-memcached-perl, libsms-send-perl, libtemplate-perl, libtest-simple-perl | perl-modules, + libtest-strict-perl, libtext-csv-encoded-perl, libtext-csv-perl, libtext-csv-xs-perl, --- a/t/db_dependent/00-strict.t +++ a/t/db_dependent/00-strict.t @@ -0,0 +1,24 @@ +# This script is called by the pre-commit git hook to test modules compile + +use strict; +use warnings; +use Test::More; +use Test::Strict; +use File::Spec; +use File::Find; +use lib("misc/translator"); +use lib("installer"); + +my @dirs = ( 'acqui', 'admin', 'authorities', 'basket', + 'catalogue', 'cataloguing', 'changelanguage.pl', 'circ', 'debian', 'docs', + 'edithelp.pl', 'errors', 'fix-perl-path.PL', 'help.pl', 'installer', + 'koha_perl_deps.pl', 'kohaversion.pl', 'labels', + 'mainpage.pl', 'Makefile.PL', 'members', 'misc', 'offline_circ', 'opac', + 'patroncards', 'reports', 'reserve', 'resetversion.pl', 'reviews', + 'rewrite-config.PL', 'rotating_collections', 'serials', 'services', 'skel', + 'sms', 'suggestion', 'svc', 'tags', 'tools', 'virtualshelves' ); + +$Test::Strict::TEST_STRICT = 0; +$Test::Strict::TEST_SKIP = [ 'misc/kohalib.pl', 'sms/sms_listen_windows_start.pl' ]; + +all_perl_files_ok(@dirs); --