1Test::Compile::InternalU(s3e)r Contributed Perl DocumentaTteisotn::Compile::Internal(3)
2
3
4

NAME

6       Test::Compile::Internal - Test whether your perl files compile.
7

SYNOPSIS

9           use Test::Compile::Internal;
10           my $test = Test::Compile::Internal->new();
11           $test->all_files_ok();
12           $test->done_testing();
13

DESCRIPTION

15       "Test::Compile::Internal" is an object oriented tool for testing
16       whether your perl files compile.
17
18       It is primarily to provide the inner workings of "Test::Compile", but
19       it can also be used directly to test a CPAN distribution.
20

METHODS

22       "new()"
23           A basic constructor, nothing special.
24
25       "all_files_ok(@dirs)"
26           Checks all the perl files it can find for compilation errors.
27
28           If @dirs is defined then it is taken as an array of directories to
29           be searched for perl files, otherwise it searches some default
30           locations - see "all_pm_files()" and "all_pl_files()".
31
32       "verbose($verbose)"
33           An accessor to get/set the verbose flag.  If "verbose" is set, you
34           can get some extra diagnostics when compilation fails.
35
36           Verbose is set on by default.
37
38       "all_pm_files(@dirs)"
39           Returns a list of all the perl module files - that is any files
40           ending in .pm in @dirs and in directories below. If @dirs is
41           undefined, it searches blib if blib exists, or else lib.
42
43           Skips any files in "CVS" or ".svn" directories.
44
45           The order of the files returned is machine-dependent. If you want
46           them sorted, you'll have to sort them yourself.
47
48       "all_pl_files(@dirs)"
49           Returns a list of all the perl script files - that is, any files in
50           @dirs that either have a .pl extension, or have no extension and
51           have a perl shebang line.
52
53           If @dirs is undefined, it searches script if script exists, or else
54           bin if bin exists.
55
56           Skips any files in "CVS" or ".svn" directories.
57
58           The order of the files returned is machine-dependent. If you want
59           them sorted, you'll have to sort them yourself.
60
61       "pl_file_compiles($file)"
62           Returns true if $file compiles as a perl script.
63
64       "pm_file_compiles($file)"
65           Returns true if $file compiles as a perl module.
66

TEST METHODS

68       "Test::Compile::Internal" encapsulates a "Test::Builder" object, and
69       provides access to some of its methods.
70
71       "done_testing()"
72           Declares that you are done testing, no more tests will be run after
73           this point.
74
75       "ok($test, $name)"
76           Your basic test. Pass if $test is true, fail if $test is false.
77           Just like "Test::Simple"'s "ok()".
78
79       "plan($count)"
80           Defines how many tests you plan to run.
81
82       "exported_to($caller)"
83           Tells "Test::Builder" what package you exported your functions to.
84           I am not sure why you would want to do that, or whether it would do
85           you any good.
86
87       "diag(@msgs)"
88           Prints out the given @msgs. Like print, arguments are simply
89           appended together.
90
91           Output will be indented and marked with a # so as not to interfere
92           with test output. A newline will be put on the end if there isn't
93           one already.
94
95           We encourage using this rather than calling print directly.
96
97       "skip($reason)"
98           Skips the current test, reporting the $reason.
99
100       "skip_all($reason)"
101           Skips all the tests, using the given $reason. Exits immediately
102           with 0.
103

AUTHORS

105       Sagar R. Shah "<srshah@cpan.org>", Marcel GrĂ¼nauer,
106       "<marcel@cpan.org>", Evan Giles, "<egiles@cpan.org>"
107
109       Copyright 2007-2015 by the authors.
110
111       This library is free software; you can redistribute it and/or modify it
112       under the same terms as Perl itself.
113

SEE ALSO

115       Test::Strict provides functions to ensure your perl files compile, with
116       the added bonus that it will check you have used strict in all your
117       files.
118
119
120
121perl v5.28.1                      2015-09-24        Test::Compile::Internal(3)
Impressum