• Home
  • History
  • Annotate
  • only in this directory
NameDateSize

..11-Apr-2013244

ChangesH A D02-Mar-2010377

inc/H05-Apr-20133

lib/H11-Apr-20134

Makefile.PLH A D02-Mar-2010199

MANIFESTH A D02-Mar-2010386

META.ymlH A D02-Mar-2010295

READMEH A D02-Mar-20102.2 KiB

SIGNATUREH A D02-Mar-20101.7 KiB

t/H11-Apr-20133

README

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
33COPYRIGHT
34    Copyright 2005, 2006 by Audrey Tang <cpan@audreyt.org>.
35
36    This software is released under the MIT license cited below.
37
38  The "MIT" License
39    Permission is hereby granted, free of charge, to any person obtaining a
40    copy of this software and associated documentation files (the
41    "Software"), to deal in the Software without restriction, including
42    without limitation the rights to use, copy, modify, merge, publish,
43    distribute, sublicense, and/or sell copies of the Software, and to
44    permit persons to whom the Software is furnished to do so, subject to
45    the following conditions:
46
47    The above copyright notice and this permission notice shall be included
48    in all copies or substantial portions of the Software.
49
50    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
51    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
52    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
53    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
54    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
55    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
56    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
57
58