Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / Test / use / ok.pm
1 package Test::use::ok;
2 use 5.005;
3 $Test::use::ok::VERSION = 0.02;
4
5 __END__
6
7 =head1 NAME
8
9 Test::use::ok - Alternative to Test::More::use_ok
10
11 =head1 SYNOPSIS
12
13     use ok( 'Some::Module' );
14
15 =head1 DESCRIPTION
16
17 According to the B<Test::More> documentation, it is recommended to run
18 C<use_ok()> inside a C<BEGIN> block, so functions are exported at
19 compile-time and prototypes are properly honored.
20
21 That is, instead of writing this:
22
23     use_ok( 'Some::Module' );
24     use_ok( 'Other::Module' );
25
26 One should write this:
27
28     BEGIN { use_ok( 'Some::Module' ); }
29     BEGIN { use_ok( 'Other::Module' ); }
30
31 However, people often either forget to add C<BEGIN>, or mistakenly group
32 C<use_ok> with other tests in a single C<BEGIN> block, which can create subtle
33 differences in execution order.
34
35 With this module, simply change all C<use_ok> in test scripts to C<use ok>,
36 and they will be executed at C<BEGIN> time.  The explicit space after C<use>
37 makes it clear that this is a single compile-time action.
38
39 =head1 SEE ALSO
40
41 L<Test::More>
42
43 =head1 COPYRIGHT
44
45 Copyright 2005, 2006 by Audrey Tang E<lt>cpan@audreyt.orgE<gt>.
46
47 This software is released under the MIT license cited below.
48
49 =head2 The "MIT" License
50
51 Permission is hereby granted, free of charge, to any person obtaining a copy
52 of this software and associated documentation files (the "Software"), to deal
53 in the Software without restriction, including without limitation the rights
54 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
55 copies of the Software, and to permit persons to whom the Software is
56 furnished to do so, subject to the following conditions:
57
58 The above copyright notice and this permission notice shall be included in
59 all copies or substantial portions of the Software.
60
61 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
62 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
63 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
64 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
65 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
66 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
67 DEALINGS IN THE SOFTWARE.
68
69 =cut