The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Test::Version - check for VERSION information in modules

VERSION

This document describes version 0.02 of Test::Version, released 18 November 2002.

SYNOPSIS

use Test::Version;

plan tests => $num_tests;

version_ok( $file );

DESCRIPTION

THIS IS ALPHA SOFTWARE.

Check files for VERSION information in perl modules. Inspired by brian d foy's Test::Pod (see Test::Pod).

FUNCTIONS

version_ok( FILENAME, [EXPECTED, [NAME] ] )

version_ok requires a filename and returns one of the three values:

    NO_FILE       Could not find the file
    NO_VERSION    File had no VERSION information
    VERSION_OK    VERSION information exists

version_ok okays a test without an expected result if it finds VERSION information, or if an expected result is specified and it finds that condition. For instance, if you know there is no VERSION information,

    version_ok( $file, NO_VERSION );

When it fails, version_ok will show error information.

The optional third argument NAME is the name of the test which version_ok passes through to Test::Builder. Otherwise, it choose a default test name "VERSION test for FILENAME".

CAVEATS

Currently only checks files ending in '.pm', and expects the package name to match the filename. I'm open to suggestions for more robust parsing.

BUGS

Likely so. Address bug reports and comments to: particle@cpan.org. When sending bug reports, please provide the version of Test::Version, the version of Perl, and the name and version of the operating system you are using.

AUTHOR

particle, <particle@cpan.org>

Copyright 2002, Ars ex Machina, Corp. All rights reserved.

This package is free software and is provided "as is" without express or implied warranty. It may be used, redistributed and/or modified under the terms of the Perl Artistic License (see http://www.perl.com/perl/misc/Artistic.html)

CREDITS

Thanks to brian d foy for the inspiration -- his Test::Pod module (on which this code is based,) and his "Better Documentation Through Testing" article in The Perl Journal, Nov 2002 (see http://www.tpj.com/).

SEE ALSO

Test::Pod

1 POD Error

The following errors were encountered while parsing the POD:

Around line 139:

You forgot a '=back' before '=head2'