1NAME
2    Test::use::ok - Alternative to Test::More::use_ok
3
4SYNOPSIS
5        use ok 'Some::Module';
6
7DESCRIPTION
8    According to the Test::More documentation, it is recommended to run
9    "use_ok()" inside a "BEGIN" block, so functions are exported at
10    compile-time and prototypes are properly honored.
11
12    That is, instead of writing this:
13
14        use_ok( 'Some::Module' );
15        use_ok( 'Other::Module' );
16
17    One should write this:
18
19        BEGIN { use_ok( 'Some::Module' ); }
20        BEGIN { use_ok( 'Other::Module' ); }
21
22    However, people often either forget to add "BEGIN", or mistakenly group
23    "use_ok" with other tests in a single "BEGIN" block, which can create
24    subtle differences in execution order.
25
26    With this module, simply change all "use_ok" in test scripts to "use
27    ok", and they will be executed at "BEGIN" time. The explicit space after
28    "use" makes it clear that this is a single compile-time action.
29
30SEE ALSO
31    Test::More
32
33CC0 1.0 Universal
34    To the extent possible under law, 唐鳳 has waived all copyright and
35    related or neighboring rights to Test-use-ok.
36
37    This work is published from Taiwan.
38
39    <http://creativecommons.org/publicdomain/zero/1.0>
40
41