|
NAMETest::XTFiles - standard interface for author tests to find files to check VERSIONVersion 0.002 SYNOPSIS use Test::XTFiles;
my @files = Test::XTFiles->new->all_module_files;
DESCRIPTIONAuthor 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. USAGEall_executable_filesReturns 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. all_filesReturns 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;
all_module_filesReturns 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_filesReturns 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. all_pod_filesReturns 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. It's probably better to use the "all_files" method and check which files contain Pod. all_test_filesReturns a list of all ".t" files to be tested, if added by the distribution. filesReturns a list of all files to be tested as XT::Files::File objects. SEE ALSOXT::Files, XT::Files::File SUPPORTBugs / Feature RequestsPlease 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. Source CodeThis 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 AUTHORSven Kirmess <sven.kirmess@kzone.ch> COPYRIGHT AND LICENSEThis software is Copyright (c) 2018-2019 by Sven Kirmess. This is free software, licensed under: The (two-clause) FreeBSD License
|