Test::Version is a Perl module that has the role to check for VERSION information in modules.
plan tests => $num_tests;
version_ok( $file );
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".