Test::AutoLoader - a testing utility for autosplit/autoloaded modules.


Test-AutoLoader documentation  | view source Contained in the Test-AutoLoader distribution.

Index


NAME

Top

Test::AutoLoader - a testing utility for autosplit/autoloaded modules.

SYNOPSIS

Top

  use Test::AutoLoader;
  use Test::More tests => 3;

  use_ok("My::Module"); # from Test::More
  autoload_ok("My::Module","mysub","sub_two); # test only the listed subs
  autoload_ok("My::Module"); # tests all '.al' files found for the module

DESCRIPTION

Top

This single-purpose module attempts to eliminate uncaught syntax errors or other obvious goofs in subroutines that are autosplit, and hence not looked at by perl -c Module.pm. Ideally, this module will become unnecessary as you reach full coverage of those subroutines in your unit tests. Until that happy day, however, this should provide a quick and dirty backstop for embarrassing typos.

Test::AutoLoader is built on Test::Builder, and should interoperate smoothly with other such modules (e.g. Test::Simple, Test::More).

EXPORT

Top

autoload_ok

Very much like the 'use_ok' subroutine (see Test::More). If passed only a module name, it will find all subroutine definitions in the "auto" directory and attempt to compile them. If passed a list of subroutine names, it will look for and attempt to compile those (and only those). Any files that cannot be found (if specified directly), read, and compiled will be listed in the diagnostic output for the failed test.

AUTHOR

Top

Ben Warfield (ben_warfield@nrgn.com)

COPYRIGHT AND LICENSE

Top

SEE ALSO

Top

perl, Test::More, AutoLoader.


Test-AutoLoader documentation  | view source Contained in the Test-AutoLoader distribution.