NAME

Test::Program - Testing tools for Perl programs

VERSION

Version 0.04

SYNOPSIS

You've written a command-line program, not just a module, and you want to make sure that it compiles, runs and has valid POD embedded.

use Test::More tests => 1;
use Test::Program;

my $program = "bin/flooble";

program_compiles_ok( $program );

# And coming soon...
program_pod_ok( $program );
program_help_ok( $program );
program_version_ok( $program );

EXPORT

All the *_ok functions are exported by default.

FUNCTIONS

All functions in Test::Program are standard Test::Builder-based functions. All return true or false depending on whether the test passed or failed.

Unlike most Test::, none of these functions takes a parameter for the description of the test. Each of the fucntions generates its own automatically.

For the functions that execute a program, rather than just checking POD statically, the function will also use the command-line options on the shebang line.

program_compiles_ok( $program )

Checks to see that $program compiles under perl -cw.

program_pod_ok( $program )

Checks to see that $program has valid POD.

PRIVATE FUNCTIONS

shebang_switches( $program )

Returns a string representing the switches passed on the shebang line in the program.

AUTHOR

Andy Lester, <andy at petdance.com>

BUGS

Please report any bugs or feature requests to bug-test-program at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Program. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Test::Program

You can also look for information at:

ACKNOWLEDGEMENTS

Thanks to Matt Liggett for the original idea and push to do it.

COPYRIGHT & LICENSE

Copyright 2006 Andy Lester, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.