view release on metacpan or search on metacpan
# Return the list of files to add to the build.
return @files;
}
# Basic package configuration.
my $build = Module::Build->new(
module_name => 'AFS::PAG',
dist_version_from => 'lib/AFS/PAG.pm',
dist_author => 'Russ Allbery <rra@cpan.org>',
license => 'mit',
recursive_test_files => 1,
add_to_cleanup => [qw(config.log cover_db glue/*.o)],
# XS configuration.
c_source => 'glue',
extra_compiler_flags => ['-I.'],
# Additional package metadata.
meta_merge => {
resources => {
repository => 'git://git.eyrie.org/afs/afs-pag.git',
AFS::PAG 1.02 (2014-07-27)
Rename NEWS to Changes to match the normal Perl convention.
Add repository and bugtracker information in the distribution
metadata.
Update to rra-c-util 5.5:
* Use Lancaster Consensus environment variables to control tests.
* Work around perltidy bug that leaves behind stray log files.
* Use calloc or reallocarray for protection against integer overflows.
AFS::PAG 1.01 (2013-10-06)
Define the correct preprocessor symbols to build properly if a libkafs
or libkopenafs library was found.
Mark autodie required for configure and use for correct automated
testing behavior on Perl 5.10.0. (autodie was added to core in
5.10.1.)
AFS::PAG 1.00 (2013-09-12)
Initial public release with support for libkafs, libkopenafs, and
Linux systems with no support library. pioctl is not yet supported,
only hasafs, haspag, setpag, and unlog. The build system has only
been tested on Debian.
to create a new PAG so that any obtained tokens are isolated from other
processes on the system and can be inherited by child processes.
REQUIREMENTS
Perl 5.10.1 or later, the Config::AutoConf module, and a C compiler are
required to build this module. On any platform other than Linux, either
the kafs library (from Heimdal) or the kopenafs library (from recent
versions of OpenAFS) are also required.
The following additional Perl modules will be used by the test suite if
present:
IPC::System::Simple
Test::MinimumVersion
Test::Perl::Critic
Test::Pod
Test::Pod::Coverage
Test::Spelling
Test::Strict
Test::Synopsis
All are available on CPAN. Those tests will be skipped if the modules
are not available.
To enable tests that may be sensitive to the local environment or that
produce a lot of false positives without uncovering many problems, set
RRA_MAINTAINER_TESTS to a true value.
BUILDING AND INSTALLATION
AFS::PAG uses Module::Build and can be installed using the same process
as any other Module::Build module:
perl Build.PL
./Build
./Build test
./Build install
If your libkafs or libkopenafs libraries are in a path that's not
searched by your linker by default, pass them to Build.PL using the
--extra-linker-flags option, as in:
perl Build.PL --extra-linker-flags '-L/opt/openafs/lib'
You will have to run the last command as root unless you're installing
into a local Perl module tree in your home directory.
t/data/perl.conf view on Meta::CPAN
# Configuration for Perl tests. -*- perl -*-
# Default minimum version requirement.
$MINIMUM_VERSION = '5.010';
# File must end with this line.
1;
t/data/perlcriticrc view on Meta::CPAN
# -*- conf -*-
#
# Default configuration for perlcritic. Be sure to copy this into the source
# for packages that run perlcritic tests automatically during the build for
# reproducible test results.
#
# This file has been updated to match perlcritic 1.118.
#
# The canonical version of this file is maintained in the rra-c-util package,
# which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
#
# Written by Russ Allbery <eagle@eyrie.org>
# Copyright 2011, 2012, 2013
# The Board of Trustees of the Leland Stanford Junior University
#
t/data/perlcriticrc view on Meta::CPAN
# group coding style.
[-CodeLayout::ProhibitParensWithBuiltins]
# Stanford's coding style allows postfix unless for flow control. There
# doesn't appear to be any way to allow it only for flow control (the logic
# for "if" and "when" appears to be special-cased), so we have to allow unless
# globally.
[ControlStructures::ProhibitPostfixControls]
allow = unless
# This is handled with a separate test case that uses Test::Spelling.
[-Documentation::PodSpelling]
# Pod::Man and Pod::Text fixed this bug years ago. I know, I maintain them.
[-Documentation::RequirePodLinksIncludeText]
# The POD sections Perl::Critic wants are incompatible with the POD template
# from perlpodstyle, which is what I use for my POD documentation.
[-Documentation::RequirePodSections]
# This problem was fixed in Perl 5.14, which now properly preserves the value
t/docs/pod-coverage.t view on Meta::CPAN
use strict;
use warnings;
use lib 't/lib';
use Test::More;
use Test::RRA qw(skip_unless_automated use_prereq);
use Test::RRA::Config qw(@POD_COVERAGE_EXCLUDE);
# Skip for normal user installs since this doesn't affect functionality.
skip_unless_automated('POD coverage tests');
# Load prerequisite modules.
use_prereq('Test::Pod::Coverage');
# Test everything found in the distribution.
all_pod_coverage_ok({ also_private => [@POD_COVERAGE_EXCLUDE] });
t/docs/pod-spelling.t view on Meta::CPAN
use 5.006;
use strict;
use warnings;
use lib 't/lib';
use Test::More;
use Test::RRA qw(skip_unless_author use_prereq);
# Only run this test for the module author since the required stopwords are
# too sensitive to the exact spell-checking program and dictionary.
skip_unless_author('Spelling tests');
# Load prerequisite modules.
use_prereq('Test::Spelling');
# Check all POD in the Perl distribution. Add the examples directory if it
# exists. Also add any files in usr/bin or usr/sbin, which are widely used in
# Stanford-internal packages.
my @files = all_pod_files();
if (-d 'examples') {
push(@files, all_pod_files('examples'));
}
for my $dir (qw(usr/bin usr/sbin)) {
if (-d $dir) {
push(@files, glob("$dir/*"));
}
}
# We now have a list of all files to check, so output a plan and run the
# tests. We can't use all_pod_files_spelling_ok because it refuses to check
# non-Perl files and Stanford-internal packages have a lot of shell scripts
# with POD documentation.
plan tests => scalar(@files);
for my $file (@files) {
pod_file_spelling_ok($file);
}
t/docs/pod.t view on Meta::CPAN
use 5.006;
use strict;
use warnings;
use lib 't/lib';
use Test::More;
use Test::RRA qw(skip_unless_automated use_prereq);
# Skip this test for normal user installs, although pod2man may still fail.
skip_unless_automated('POD syntax tests');
# Load prerequisite modules.
use_prereq('Test::Pod');
# Check all POD in the Perl distribution. Add the examples directory if it
# exists. Also add any files in usr/bin or usr/sbin, which are widely used in
# Stanford-internal packages.
my @files = all_pod_files();
if (-d 'examples') {
push(@files, all_pod_files('examples'));
}
for my $dir (qw(usr/bin usr/sbin)) {
if (-d $dir) {
push(@files, glob("$dir/*"));
}
}
# We now have a list of all files to check, so output a plan and run the
# tests. We can't use all_pod_files_ok because it refuses to check non-Perl
# files and Stanford-internal packages have a lot of shell scripts with POD
# documentation.
plan tests => scalar(@files);
for my $file (@files) {
pod_file_ok($file);
}
t/docs/synopsis.t view on Meta::CPAN
use 5.006;
use strict;
use warnings;
use lib 't/lib';
use Test::More;
use Test::RRA qw(skip_unless_automated use_prereq);
# Skip for normal user installs since this doesn't affect functionality.
skip_unless_automated('Synopsis syntax tests');
# Load prerequisite modules.
use_prereq('Perl::Critic::Utils');
use_prereq('Test::Synopsis');
# The default Test::Synopsis all_synopsis_ok() function requires that the
# module be in a lib directory. Use Perl::Critic::Utils to find the modules
# in blib, or lib if it doesn't exist. However, strip out anything in
# blib/script, since scripts use a different SYNOPSIS syntax.
my @files = Perl::Critic::Utils::all_perl_files('blib');
@files = grep { !m{blib/script/}xms } @files;
if (!@files) {
@files = Perl::Critic::Utils::all_perl_files('lib');
}
plan tests => scalar @files;
# Run the actual tests.
for my $file (@files) {
synopsis_ok($file);
}
t/lib/Test/RRA.pm view on Meta::CPAN
# Helper functions for test programs written in Perl.
#
# This module provides a collection of helper functions used by test programs
# written in Perl. This is a general collection of functions that can be used
# by both C packages with Automake and by stand-alone Perl modules. See
# Test::RRA::Automake for additional functions specifically for C Automake
# distributions.
#
# The canonical version of this file is maintained in the rra-c-util package,
# which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
#
# Written by Russ Allbery <eagle@eyrie.org>
# Copyright 2013, 2014
t/lib/Test/RRA.pm view on Meta::CPAN
BEGIN {
@ISA = qw(Exporter);
@EXPORT_OK = qw(skip_unless_author skip_unless_automated use_prereq);
# This version should match the corresponding rra-c-util release, but with
# two digits for the minor version, including a leading zero if necessary,
# so that it will sort properly.
$VERSION = '5.05';
}
# Skip this test unless author tests are requested. Takes a short description
# of what tests this script would perform, which is used in the skip message.
# Calls plan skip_all, which will terminate the program.
#
# $description - Short description of the tests
#
# Returns: undef
sub skip_unless_author {
my ($description) = @_;
if (!$ENV{AUTHOR_TESTING}) {
plan skip_all => "$description only run for author";
}
return;
}
# Skip this test unless doing automated testing or release testing. This is
# used for tests that should be run by CPAN smoke testing or during releases,
# but not for manual installs by end users. Takes a short description of what
# tests this script would perform, which is used in the skip message. Calls
# plan skip_all, which will terminate the program.
#
# $description - Short description of the tests
#
# Returns: undef
sub skip_unless_automated {
my ($description) = @_;
for my $env (qw(AUTOMATED_TESTING RELEASE_TESTING AUTHOR_TESTING)) {
return if $ENV{$env};
}
plan skip_all => "$description normally skipped";
return;
}
# Attempt to load a module and skip the test if the module could not be
# loaded. If the module could be loaded, call its import function manually.
# If the module could not be loaded, calls plan skip_all, which will terminate
# the program.
#
# The special logic here is based on Test::More and is required to get the
# imports to happen in the caller's namespace.
#
# $module - Name of the module to load
# @imports - Any arguments to import, possibly including a version
#
t/lib/Test/RRA.pm view on Meta::CPAN
local $SIG{__DIE__} = undef;
$result = eval qq{
package $package;
use $module $version \@imports;
1;
};
$error = $@;
$sigdie = $SIG{__DIE__} || undef;
}
# If the use failed for any reason, skip the test.
if (!$result || $error) {
my $name = length($version) > 0 ? "$module $version" : $module;
plan skip_all => "$name required for test";
}
# If the module set $SIG{__DIE__}, we cleared that via local. Restore it.
## no critic (Variables::RequireLocalizedPunctuationVars)
if (defined($sigdie)) {
$SIG{__DIE__} = $sigdie;
}
return;
}
1;
__END__
=for stopwords
Allbery Allbery's DESC bareword sublicense MERCHANTABILITY NONINFRINGEMENT
rra-c-util
=head1 NAME
Test::RRA - Support functions for Perl tests
=head1 SYNOPSIS
use Test::RRA
qw(skip_unless_author skip_unless_automated use_prereq);
# Skip this test unless author tests are requested.
skip_unless_author('Coding style tests');
# Skip this test unless doing automated or release testing.
skip_unless_automated('POD syntax tests');
# Load modules, skipping the test if they're not available.
use_prereq('Perl6::Slurp', 'slurp');
use_prereq('Test::Script::Run', '0.04');
=head1 DESCRIPTION
This module collects utility functions that are useful for Perl test
scripts. It assumes Russ Allbery's Perl module layout and test
conventions and will only be useful for other people if they use the
same conventions.
=head1 FUNCTIONS
None of these functions are imported by default. The ones used by a
script should be explicitly imported.
=over 4
=item skip_unless_author(DESC)
Checks whether AUTHOR_TESTING is set in the environment and skips the
whole test (by calling C<plan skip_all> from Test::More) if it is not.
DESC is a description of the tests being skipped. A space and C<only run
for author> will be appended to it and used as the skip reason.
=item skip_unless_automated(DESC)
Checks whether AUTHOR_TESTING, AUTOMATED_TESTING, or RELEASE_TESTING are
set in the environment and skips the whole test (by calling C<plan
skip_all> from Test::More) if they are not. This should be used by tests
that should not run during end-user installs of the module, but which
should run as part of CPAN smoke testing and release testing.
DESC is a description of the tests being skipped. A space and C<normally
skipped> will be appended to it and used as the skip reason.
=item use_prereq(MODULE[, VERSION][, IMPORT ...])
Attempts to load MODULE with the given VERSION and import arguments. If
this fails for any reason, the test will be skipped (by calling C<plan
skip_all> from Test::More) with a skip reason saying that MODULE is
required for the test.
VERSION will be passed to C<use> as a version bareword if it looks like a
version number. The remaining IMPORT arguments will be passed as the
value of an array.
=back
=head1 AUTHOR
Russ Allbery <eagle@eyrie.org>
t/lib/Test/RRA.pm view on Meta::CPAN
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
=head1 SEE ALSO
Test::More(3), Test::RRA::Automake(3), Test::RRA::Config(3)
This module is maintained in the rra-c-util package. The current version
is available from L<http://www.eyrie.org/~eagle/software/rra-c-util/>.
The functions to control when tests are run use environment variables
defined by the L<Lancaster
Consensus|https://github.com/Perl-Toolchain-Gang/toolchain-site/blob/master/lancaster-consensus.md>.
=cut
t/lib/Test/RRA/Config.pm view on Meta::CPAN
# Configuration for Perl test cases.
#
# In order to reuse the same Perl test cases in multiple packages, I use a
# configuration file to store some package-specific data. This module loads
# that configuration and provides the namespace for the configuration
# settings.
#
# The canonical version of this file is maintained in the rra-c-util package,
# which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
package Test::RRA::Config;
use 5.006;
t/lib/Test/RRA/Config.pm view on Meta::CPAN
1;
__END__
=for stopwords
Allbery rra-c-util Automake perlcritic .libs namespace subdirectory
sublicense MERCHANTABILITY NONINFRINGEMENT
=head1 NAME
Test::RRA::Config - Perl test configuration
=head1 SYNOPSIS
use Test::RRA::Config qw($MINIMUM_VERSION);
print "Required Perl version is $MINIMUM_VERSION\n";
=head1 DESCRIPTION
Test::RRA::Config encapsulates per-package configuration for generic Perl
test programs that are shared between multiple packages using the
rra-c-util infrastructure. It handles locating and loading the test
configuration file for both C Automake packages and stand-alone Perl
modules.
Test::RRA::Config looks for a file named F<data/perl.conf> relative to the
root of the test directory. That root is taken from the environment
variables BUILD or SOURCE (in that order) if set, which will be the case
for C Automake packages using C TAP Harness. If neither is set, it
expects the root of the test directory to be a directory named F<t>
relative to the current directory, which will be the case for stand-alone
Perl modules.
The following variables are supported:
=over 4
=item $COVERAGE_LEVEL
The coverage level achieved by the test suite for Perl test coverage
testing using Test::Strict, as a percentage. The test will fail if test
coverage less than this percentage is achieved. If not given, defaults
to 100.
=item @COVERAGE_SKIP_TESTS
Directories under F<t> whose tests should be skipped when doing coverage
testing. This can be tests that won't contribute to coverage or tests
that don't run properly under Devel::Cover for some reason (such as ones
that use taint checking). F<docs> and F<style> will always be skipped
regardless of this setting.
=item @CRITIC_IGNORE
Additional directories to ignore when doing recursive perlcritic testing.
The contents of this directory must be either top-level directory names or
directory names starting with F<tests/>.
=item $LIBRARY_PATH
Add this directory (or a F<.libs> subdirectory) relative to the top of the
source tree to LD_LIBRARY_PATH when checking the syntax of Perl modules.
This may be required to pick up libraries that are used by in-tree Perl
modules so that Perl scripts can pass a syntax check.
=item $MINIMUM_VERSION
Default minimum version requirement for included Perl scripts. If not
given, defaults to 5.008.
=item %MINIMUM_VERSION
Minimum version exceptions for specific directories. The keys should be
minimum versions of Perl to enforce. The value for each key should be a
reference to an array of either top-level directory names or directory
names starting with F<tests/>. All files in those directories will have
that minimum Perl version constraint imposed instead of $MINIMUM_VERSION.
=item @POD_COVERAGE_EXCLUDE
Regexes that match method names that should be excluded from POD coverage
testing. Normally, all methods have to be documented in the POD for a
Perl module, but methods matching any of these regexes will be considered
private and won't require documentation.
=item @STRICT_IGNORE
Additional directories to ignore when doing recursive Test::Strict testing
for C<use strict> and C<use warnings>. The contents of this directory
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
into the local namespace to avoid long variable names.
=head1 AUTHOR
t/lib/Test/RRA/Config.pm view on Meta::CPAN
DEALINGS IN THE SOFTWARE.
=head1 SEE ALSO
perlcritic(1), Test::MinimumVersion(3), Test::RRA(3),
Test::RRA::Automake(3), Test::Strict(3)
This module is maintained in the rra-c-util package. The current version
is available from L<http://www.eyrie.org/~eagle/software/rra-c-util/>.
The C TAP Harness test driver and libraries for TAP-based C testing are
available from L<http://www.eyrie.org/~eagle/software/c-tap-harness/>.
=cut
t/pag/basic.t view on Meta::CPAN
use 5.010;
use strict;
use warnings;
use lib 't/lib';
use Test::RRA qw(use_prereq);
BEGIN { use_prereq('IPC::System::Simple', qw(capturex systemx)) }
# Establish the plan now that we know we're continuing.
use Test::More tests => 6;
# Load the module.
BEGIN { use_ok('AFS::PAG', qw(hasafs haspag setpag unlog)) }
# Determines if the user has valid tokens by running tokens.
#
# Returns: True if the user has valid tokens, false if not or if tokens fails
sub has_tokens {
my $tokens = eval { capturex('tokens') };
if (!$@ && $tokens =~ m{ [ ] tokens [ ] for [ ] }xmsi) {
return 1;
} else {
return;
}
}
# If k_hasafs returns false, we can't run any other tests.
SKIP: {
if (!hasafs()) {
skip 'AFS not available', 5;
}
# See if we already have tokens. If so, we can do some other tests.
my $had_tokens = has_tokens();
ok(setpag(), 'k_setpag succeeds');
ok(haspag(), '...and we are now in a PAG');
# If we had tokens, check to see if k_setpag hides them.
SKIP: {
if (!$had_tokens) {
skip 'cannot check token hiding without existing tokens', 1;
}
ok(!has_tokens(), '...and hides existing tokens');
}
# Try to obtain tokens with aklog and test unlog.
my $status = eval { systemx('aklog') };
SKIP: {
if ($@ || $status != 0 || !has_tokens()) {
skip 'aklog cannot obtain tokens, cannot test unlog', 2;
}
ok(unlog(), 'unlog succeeds');
ok(!has_tokens(), '...and we no longer have tokens');
}
}
t/pag/isolation.t view on Meta::CPAN
use autodie;
use strict;
use warnings;
use lib 't/lib';
use Test::RRA qw(use_prereq);
BEGIN { use_prereq('IPC::System::Simple', qw(capturex systemx)) }
# Establish the plan now that we know we're continuing.
use Test::More tests => 3;
# Load the module.
BEGIN { use_ok('AFS::PAG', qw(hasafs setpag unlog)) }
# Determines if the user has valid tokens by running tokens.
#
# Returns: True if the user has valid tokens, false if not or if tokens fails
sub has_tokens {
my $tokens = eval { capturex('tokens') };
if (!$@ && $tokens =~ m{ [ ] tokens [ ] for [ ] }xmsi) {
return 1;
} else {
return;
}
}
# We need AFS support and existing tokens to run this test.
SKIP: {
if (!hasafs() || !has_tokens()) {
skip 'AFS tokens not available', 2;
}
# Fork off a child that creates a new PAG and then runs unlog. This
# should not affect the tokens in our parent process.
my $pid = fork;
if ($pid == 0) {
setpag();
t/style/coverage.t view on Meta::CPAN
#!/usr/bin/perl
#
# Test Perl code for test coverage.
#
# The canonical version of this file is maintained in the rra-c-util package,
# which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
#
# Written by Russ Allbery <eagle@eyrie.org>
# 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
# copy of this software and associated documentation files (the "Software"),
t/style/coverage.t view on Meta::CPAN
use strict;
use warnings;
use lib 't/lib';
use File::Spec;
use Test::More;
use Test::RRA qw(skip_unless_author use_prereq);
use Test::RRA::Config qw($COVERAGE_LEVEL @COVERAGE_SKIP_TESTS);
# Skip code coverage unless author tests are enabled since it takes a long
# time, is sensitive to versions of various libraries, and does not detect
# functionality problems.
skip_unless_author('Coverage tests');
# Load prerequisite modules.
use_prereq('Devel::Cover');
use_prereq('Test::Strict');
# Build a list of test directories to use for coverage.
my %ignore = map { $_ => 1 } qw(data docs style), @COVERAGE_SKIP_TESTS;
opendir(my $testdir, 't') or BAIL_OUT("cannot open t: $!");
my @t_dirs = readdir($testdir) or BAIL_OUT("cannot read t: $!");
closedir($testdir) or BAIL_OUT("cannot close t: $!");
# Filter out ignored and system directories.
@t_dirs = grep { !$ignore{$_} } File::Spec->no_upwards(@t_dirs);
# Prepend the t directory name to the directories.
@t_dirs = map { File::Spec->catfile('t', $_) } @t_dirs;
# Disable POD coverage; that's handled separately and is confused by
# autoloading.
$Test::Strict::DEVEL_COVER_OPTIONS
t/style/critic.t view on Meta::CPAN
#!/usr/bin/perl
#
# Check for perlcritic errors in all code.
#
# If author tests are enabled, check all Perl code in blib/lib, examples, usr,
# t, and Build.PL for problems uncovered by perlcritic, ignoring template
# files, junk, and any files explicitly configured to be ignored.
#
# Written by Russ Allbery <eagle@eyrie.org>
# 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
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
t/style/critic.t view on Meta::CPAN
use 5.006;
use strict;
use warnings;
use lib 't/lib';
use Test::More;
use Test::RRA qw(skip_unless_author use_prereq);
use Test::RRA::Config qw(@CRITIC_IGNORE);
# Skip tests unless we're running author tests since this test is too
# sensitive to the exact version of Perl::Critic to be generally useful.
skip_unless_author('Coding style tests');
# Load prerequisite modules.
use_prereq('Perl::Critic::Utils');
use_prereq('Test::Perl::Critic');
# Force the embedded Perl::Tidy check to use the correct configuration.
local $ENV{PERLTIDY} = 't/data/perltidyrc';
# Import the configuration file and run Perl::Critic.
Test::Perl::Critic->import(-profile => 't/data/perlcriticrc');
t/style/critic.t view on Meta::CPAN
}
}
# Strip out Autoconf templates or left-over perltidy files.
@files = grep { !m{ [.](?:in|tdy) }xms } @files;
# Strip out ignored files.
my %ignore = map { $_ => 1 } @CRITIC_IGNORE;
@files = grep { !$ignore{$_} } @files;
# Declare a plan now that we know what we're testing.
plan tests => scalar @files;
# Run the actual tests.
for my $file (@files) {
critic_ok($file);
}
# On Debian with perltidy 20130922-1, a perltidy.LOG file gets left behind in
# the current directory. Remove it if it exists.
unlink('perltidy.LOG');
t/style/minimum-version.t view on Meta::CPAN
use strict;
use warnings;
use lib 't/lib';
use Test::More;
use Test::RRA qw(skip_unless_automated use_prereq);
use Test::RRA::Config qw($MINIMUM_VERSION);
# Skip for normal user installs since this doesn't affect functionality.
skip_unless_automated('Minimum version tests');
# Load prerequisite modules.
use_prereq('Test::MinimumVersion');
# Check all files in the Perl distribution.
all_minimum_version_ok($MINIMUM_VERSION);
t/style/strict.t view on Meta::CPAN
use 5.006;
use strict;
use warnings;
use lib 't/lib';
use File::Spec;
use Test::RRA qw(skip_unless_automated use_prereq);
# Skip for normal user installs since this doesn't affect functionality.
skip_unless_automated('Strictness tests');
# Load prerequisite modules.
use_prereq('Test::Strict');
# Test everything in the distribution directory except the Build and
# Makefile.PL scripts generated by Module::Build. We also want to check use
# warnings.
$Test::Strict::TEST_SKIP = ['Build', 'Makefile.PL'];
$Test::Strict::TEST_WARNINGS = 1;
all_perl_files_ok(File::Spec->curdir);