1package Test::use::ok; 2use 5.005; 3 4our $VERSION = '1.302175'; 5 6 7__END__ 8 9=head1 NAME 10 11Test::use::ok - Alternative to Test::More::use_ok 12 13=head1 SYNOPSIS 14 15 use ok 'Some::Module'; 16 17=head1 DESCRIPTION 18 19According to the B<Test::More> documentation, it is recommended to run 20C<use_ok()> inside a C<BEGIN> block, so functions are exported at 21compile-time and prototypes are properly honored. 22 23That is, instead of writing this: 24 25 use_ok( 'Some::Module' ); 26 use_ok( 'Other::Module' ); 27 28One should write this: 29 30 BEGIN { use_ok( 'Some::Module' ); } 31 BEGIN { use_ok( 'Other::Module' ); } 32 33However, people often either forget to add C<BEGIN>, or mistakenly group 34C<use_ok> with other tests in a single C<BEGIN> block, which can create subtle 35differences in execution order. 36 37With this module, simply change all C<use_ok> in test scripts to C<use ok>, 38and they will be executed at C<BEGIN> time. The explicit space after C<use> 39makes it clear that this is a single compile-time action. 40 41=head1 SEE ALSO 42 43L<Test::More> 44 45=head1 MAINTAINER 46 47=over 4 48 49=item Chad Granum E<lt>exodist@cpan.orgE<gt> 50 51=back 52 53=encoding utf8 54 55=head1 CC0 1.0 Universal 56 57To the extent possible under law, 唐鳳 has waived all copyright and related 58or neighboring rights to L<Test-use-ok>. 59 60This work is published from Taiwan. 61 62L<http://creativecommons.org/publicdomain/zero/1.0> 63 64=cut 65