@CRITIC_IGNORE = qw(cracklib);
@STRICT_IGNORE = qw(cracklib);
+# The Heimdal history implementation uses a bunch of modules, but may not be
+# of interest to all users. Skip strict testing if its prerequisites aren't
+# installed.
+@STRICT_PREREQ = qw(
+ DB_File::Lock Crypt::PBKDF2 Getopt::Long::Descriptive IPC::Run JSON
+ Readonly
+);
+
# Default minimum version requirement for included Perl scripts.
$MINIMUM_VERSION = '5.010';
# which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
#
# Written by Russ Allbery <eagle@eyrie.org>
-# Copyright 2012, 2013
+# Copyright 2012, 2013, 2014
# The Board of Trustees of the Leland Stanford Junior University
#
# Permission is hereby granted, free of charge, to any person obtaining a
use Test::More;
use Test::RRA qw(use_prereq);
use Test::RRA::Automake qw(automake_setup perl_dirs);
-use Test::RRA::Config qw(@STRICT_IGNORE);
+use Test::RRA::Config qw(@STRICT_IGNORE @STRICT_PREREQ);
# Load prerequisite modules.
use_prereq('Test::Strict');
+# Check whether all prerequisites are available, and skip the test if any of
+# them are not.
+for my $module (@STRICT_PREREQ) {
+ use_prereq($module);
+}
+
# Set up Automake testing. This must be done after loading Test::Strict,
# since it wants to use FindBin to locate this script.
automake_setup();
@EXPORT_OK = qw(
$COVERAGE_LEVEL @COVERAGE_SKIP_TESTS @CRITIC_IGNORE $LIBRARY_PATH
$MINIMUM_VERSION %MINIMUM_VERSION @POD_COVERAGE_EXCLUDE @STRICT_IGNORE
+ @STRICT_PREREQ
);
# This version should match the corresponding rra-c-util release, but with
our %MINIMUM_VERSION;
our @POD_COVERAGE_EXCLUDE;
our @STRICT_IGNORE;
+our @STRICT_PREREQ;
# Load the configuration.
if (!do($PATH)) {
must be either top-level directory names or directory names starting with
F<tests/>.
+=item @STRICT_PREREQ
+
+A list of Perl modules that have to be available in order to do meaningful
+Test::Strict testing. If any of the modules cannot be loaded via C<use>,
+Test::Strict checking will be skipped. There is currently no way to
+require specific versions of the modules.
+
=back
No variables are exported by default, but the variables can be imported
=head1 COPYRIGHT AND LICENSE
-Copyright 2013 The Board of Trustees of the Leland Stanford Junior
+Copyright 2013, 2014 The Board of Trustees of the Leland Stanford Junior
University
Permission is hereby granted, free of charge, to any person obtaining a