Test::Version - check for VERSION information in modules
This document describes version 0.02 of Test::Version, released 18 November 2002.
use Test::Version;
plan tests => $num_tests;
version_ok( $file );
THIS IS ALPHA SOFTWARE.
Check files for VERSION information in perl modules. Inspired by brian d foy's Test::Pod (see Test::Pod).
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".
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.
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.
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)
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/).
Test::Pod
1 POD Error
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head2'
To install Test::Version, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Version
CPAN shell
perl -MCPAN -e shell install Test::Version
For more information on module installation, please visit the detailed CPAN module installation guide.