Test::XTFiles - standard interface for author tests to find files to check
Version 0.002
use Test::XTFiles; my @files = Test::XTFiles->new->all_module_files;
Author tests often iterate over the files of a distribution to check them. XT::Files is a standard interface that allows the author test to ask the distribution for all the files of a type, instead of guessing which files to check.
Returns a list of all the Perl scripts that should be tested. This includes tests, if the distribution added them. You should test them as you test Perl scripts.
This list can be useful for tests that test things like execute permission or the shebang line.
Returns all files that should be tested. A typical use case would be to test all files that contain Pod documentation as Pod can be, but doesn't have to be, included in scripts, modules, tests and, of course, pod files.
# all files with Pod in it use Pod::Simple::Search; my @files = grep { Pod::Simple::Search->new->contains_pod($_) } Test::XTFiles->new->all_files;
Returns a list of all Perl modules that should be tested.
Before using this method make sure that you really want to test only modules. Most tests should run against modules and scripts. It's often better to use the all_perl_files method instead.
all_perl_files
Returns a list of all Perl files that should be tested. That includes modules, scripts and, if the distribution added them, tests. Most author tests should probably iterate over this list.
Returns a list of all Pod files. These are the files that end in .pod. This list does not contain script or modules that include a Pod documentation.
.pod
It's probably better to use the all_files method and check which files contain Pod.
all_files
Returns a list of all .t files to be tested, if added by the distribution.
.t
Returns a list of all files to be tested as XT::Files::File objects.
XT::Files, XT::Files::File
Please report any bugs or feature requests through the issue tracker at https://github.com/skirmess/XT-Files/issues. You will be notified automatically of any progress on your issue.
This is open source software. The code repository is available for public review and contribution under the terms of the license.
https://github.com/skirmess/XT-Files
git clone https://github.com/skirmess/XT-Files.git
Sven Kirmess <sven.kirmess@kzone.ch>
This software is Copyright (c) 2018-2019 by Sven Kirmess.
This is free software, licensed under:
The (two-clause) FreeBSD License
To install XT::Files, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XT::Files
CPAN shell
perl -MCPAN -e shell install XT::Files
For more information on module installation, please visit the detailed CPAN module installation guide.