6 our $VERSION = '1.301001_075';
7 $VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
9 use Test::Stream 1.301001 '-internal';
18 Test::use::ok - Alternative to Test::More::use_ok
22 use ok 'Some::Module';
26 According to the B<Test::More> documentation, it used to be recommended to run
27 C<use_ok()> inside a C<BEGIN> block, so functions are exported at compile-time
28 and prototypes are properly honored.
30 That is, instead of writing this:
32 use_ok( 'Some::Module' );
33 use_ok( 'Other::Module' );
35 One should write this:
37 BEGIN { use_ok( 'Some::Module' ); }
38 BEGIN { use_ok( 'Other::Module' ); }
40 However, people often either forget to add C<BEGIN>, or mistakenly group
41 C<use_ok> with other tests in a single C<BEGIN> block, which can create subtle
42 differences in execution order.
44 With this module, simply change all C<use_ok> in test scripts to C<use ok>,
45 and they will be executed at C<BEGIN> time. The explicit space after C<use>
46 makes it clear that this is a single compile-time action.
56 The source code repository for Test::More can be found at
57 F<http://github.com/Test-More/test-more/>.
63 =item Chad Granum E<lt>exodist@cpan.orgE<gt>
69 The following people have all contributed to the Test-More dist (sorted using
74 =item Chad Granum E<lt>exodist@cpan.orgE<gt>
76 =item Fergal Daly E<lt>fergal@esatclear.ie>E<gt>
78 =item Mark Fowler E<lt>mark@twoshortplanks.comE<gt>
80 =item Michael G Schwern E<lt>schwern@pobox.comE<gt>
88 There has been a lot of code migration between modules,
89 here are all the original copyrights together:
95 =item Test::Stream::Tester
97 Copyright 2014 Chad Granum E<lt>exodist7@gmail.comE<gt>.
99 This program is free software; you can redistribute it and/or
100 modify it under the same terms as Perl itself.
102 See F<http://www.perl.com/perl/misc/Artistic.html>
110 Originally authored by Michael G Schwern E<lt>schwern@pobox.comE<gt> with much
111 inspiration from Joshua Pritikin's Test module and lots of help from Barrie
112 Slaymaker, Tony Bowden, blackstar.co.uk, chromatic, Fergal Daly and the perl-qa
115 Idea by Tony Bowden and Paul Johnson, code by Michael G Schwern
116 E<lt>schwern@pobox.comE<gt>, wardrobe by Calvin Klein.
118 Copyright 2001-2008 by Michael G Schwern E<lt>schwern@pobox.comE<gt>.
120 This program is free software; you can redistribute it and/or
121 modify it under the same terms as Perl itself.
123 See F<http://www.perl.com/perl/misc/Artistic.html>
127 To the extent possible under law, 唐鳳 has waived all copyright and related
128 or neighboring rights to L<Test-use-ok>.
130 This work is published from Taiwan.
132 L<http://creativecommons.org/publicdomain/zero/1.0>
136 This module is copyright 2005 Fergal Daly <fergal@esatclear.ie>, some parts
137 are based on other people's work.
139 Under the same license as Perl itself
141 See http://www.perl.com/perl/misc/Artistic.html
143 =item Test::Builder::Tester
145 Copyright Mark Fowler E<lt>mark@twoshortplanks.comE<gt> 2002, 2004.
147 This program is free software; you can redistribute it
148 and/or modify it under the same terms as Perl itself.