The use of the following functions is deprecated and strongly discouraged.
Instead, you should use the object oriented interface described in the "SYNOPSIS" and in
Test::Compile::Internal.
They are automatically exported to your namespace, which is no longer considered best practise. At some
stage in the future, this will stop and you'll have to import them explicitly to keep using them.
The object oriented methods also provide a more consistent interface. For example: all_pm_files_ok()
calls the plan() function - so you can't call multiple test functions in the same test file.
all_pm_files_ok(@files)
Thisfunctionisdeprecated. Please use "all_pm_files_ok(@dirs)" in Test::Compile::Internal instead.
It's pretty much the same, except it doesn't call the plan() function.
Checks all the perl module files it can find for compilation errors.
It uses all_pm_files(@files) to find the perl module files.
It also calls the plan() function for you (one test for each module), so you can't have already
called plan(). Unfortunately, this also means you can't use this function with all_pl_files_ok(). If
this is a problem you should really be using the object oriented interface.
Returns true if all Perl module files are ok, or false if any fail.
all_pl_files_ok(@files)
Thisfunctionisdeprecated. Please use "all_pl_files_ok(@dirs)" in Test::Compile::Internal instead.
It's pretty much the same, except it doesn't call the plan() function.
Checks all the perl script files it can find for compilation errors.
It uses all_pl_files(@files) to find the perl script files.
It also calls the plan() function for you (one test for each script), so you can't have already
called "plan". Unfortunately, this also means you can't use this function with all_pm_files_ok(). If
this is a problem you should really be using the object oriented interface.
Returns true if all Perl script files are ok, or false if any fail.
"pm_file_ok($filename, $testname)"
Thisfunctionisdeprecated. Please use "all_pm_files_ok(@dirs)" in Test::Compile::Internal instead.
It's pretty much the same, except it won't allow you to specify a test name, and it can handle more
than one file at a time.
pm_file_ok() will okay the test if $filename compiles as a perl module.
The optional second argument $testname is the name of the test. If it is omitted, pm_file_ok()
chooses a default test name Compile test for $filename.
"pl_file_ok($filename, $testname)"
Thisfunctionisdeprecated. Please use "all_pl_files_ok(@dirs)" in Test::Compile::Internal instead.
It's pretty much the same, except you can't specify a test name, and it can handle more than one file
at a time.
pl_file_ok() will okay the test if $filename compiles as a perl script. You need to give the path to
the script relative to this distribution's base directory. So if you put your scripts in a
'top-level' directory called script the argument would be "script/filename".
The optional second argument $testname is the name of the test. If it is omitted, pl_file_ok()
chooses a default test name Compile test for $filename.
all_pm_files(@dirs)
Thisfunctionisdeprecated. Please use "all_pm_files(@dirs)" in Test::Compile::Internal instead.
Returns a list of all the perl module files - that is, files ending in .pm - in @dirs and in
directories below. If no directories are passed, it defaults to blib if blib exists, or else lib if
not. Skips any files in CVS, .svn, or .git directories.
all_pl_files(@dirs)
Thisfunctionisdeprecated. Please use "all_pl_files(@dirs)" in Test::Compile::Internal instead.
Returns a list of all the perl script files - that is, any files in @dirs that either have a .pl
extension, or have no extension and have a perl shebang line.
If @dirs is undefined, it searches script if script exists, or else bin if bin exists.
Skips any files in CVS, .svn, or .git directories.
all_files_ok(@dirs)
Thisfunctionisdeprecated. Please use "all_files_ok(@dirs)" in Test::Compile::Internal instead.
Checks all the perl files it can find for compilation errors.
If @dirs is defined then it is taken as an array of directories to be searched for perl files,
otherwise it searches some default locations - see "all_pm_files(@dirs)" and "all_pl_files(@dirs)".