NOTICE: This package has been removed from pkgsrc

./wip/p5-Test-use-ok, Alternative to Test::More::use_ok

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ]


Branch: CURRENT, Version: 0.01, Package name: p5-Test-use-ok-0.01, Maintainer: kuli0020

According to the Test::More documentation, it is recommended to run
use_ok() inside a BEGIN block, so functions are exported at
compile-time and prototypes are properly honored.

That is, instead of writing this:

use_ok( 'Some::Module' );
use_ok( 'Other::Module' );

One should write this:

BEGIN { use_ok( 'Some::Module' ); }
BEGIN { use_ok( 'Other::Module' ); }

However, people often either forget to add BEGIN, or mistakenly group
use_ok with other tests in a single BEGIN block, which can create subtle
differences in execution order.

With this module, simply change all use_ok in test scripts to use ok,
and they will be executed at BEGIN time. The explicit space after use
makes it clear that this is a single compile-time action.


Required to run:
[lang/perl5] [devel/p5-Test-Simple]

Master sites: (Expand)

SHA1: b329a46b493e5f516001b0ff19329a6dd77f0be3
RMD160: eacf699f10ed3ad6562c9862611be41f5e46091e
Filesize: 8.654 KB

Version history: (Expand)


CVS history: (Expand)


   2008-06-25 11:20:57 by abs | Files touched by this commit (89) | Package removed
Log message:
The following perl packages are in main pkgsrc. Remove from wip and update
DEPENDS lines as appropriate.

    p5-Algorithm-C3
    p5-CGI-Simple
    p5-Class-Accessor-Grouped
    p5-Class-C3-XS
    p5-Class-C3
    p5-Geo-Distance
    p5-HTTP-Body
    p5-HTTP-Request-AsCGI
    p5-MRO-Compat
    p5-PAR
    p5-RRDTool-OO
    p5-SQL-Abstract-Limit
    p5-Set-Object
    p5-Template-Timer
    p5-Test-Differences
    p5-Test-MockObject
    p5-Test-use-ok
    p5-Tree-Simple-VisitorFactory
    p5-UNIVERSAL-can
    p5-UNIVERSAL-isa
    p5-Unicode-Map
    p5-Unicode-MapUTF8
   2008-05-30 14:22:19 by abs | Files touched by this commit (64)
Log message:
Remove unnecessary (empty) PLIST files for p5-* packages
   2006-04-07 20:18:01 by Roman Kulik | Files touched by this commit (4) | Imported package
Log message:
According to the Test::More documentation, it is recommended to run
use_ok() inside a BEGIN block, so functions are exported at
compile-time and prototypes are properly honored.

That is, instead of writing this:

    use_ok( 'Some::Module' );
        use_ok( 'Other::Module' );

	One should write this:

	    BEGIN { use_ok( 'Some::Module' ); }
	        BEGIN { use_ok( 'Other::Module' ); }

		However, people often either forget to add BEGIN, or mistakenly group
		use_ok with other tests in a single BEGIN block, which can create subtle
		differences in execution order.

		With this module, simply change all use_ok in test scripts to use ok,
		and they will be executed at BEGIN time.  The explicit space after use
		makes it clear that this is a single compile-time action.