22 Jul 2005 15:48:47 UTC
- Distribution: Test-AutoLoader
- Module version: 0.03
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (4)
- Testers (109 / 947 / 0)
- KwaliteeBus factor: 0
- 27.21% Coverage
- License: open_source
- Activity24 month
- Download (4.42KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionBWARFIELD Benjamin Warfield
Test::AutoLoader - a testing utility for autosplit/autoloaded modules.
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
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).
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.
Ben Warfield (email@example.com)
This module is copyright (c) 2005 Neurogen Corporation, Branford, Connecticut, USA. It may be distributed under the terms of the GNU General Public License.
Module Install Instructions
To install Test::AutoLoader, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Test::AutoLoader
For more information on module installation, please visit the detailed CPAN module installation guide.