Test::Data - test functions for particular variable types


Test-Data documentation Contained in the Test-Data distribution.

Index


Code Index:

NAME

Top

Test::Data -- test functions for particular variable types

SYNOPSIS

Top

use Test::Data qw(Scalar Array Hash Function);

DESCRIPTION

Top

Test::Data provides utility functions to check properties and values of data and variables.

Functions

Plug-in modules define functions for each data type. See the appropriate module.

How it works

The Test::Data module simply imports functions from Test::Data::* modules. Each module defines a self-contained function, and puts that function name into @EXPORT. Test::Data defines its own import function, but that does not matter to the plug-in modules.

If you want to write a plug-in module, follow the example of one that already exists. Name the module Test::Data::Foo, where you replace Foo with the right name. Test::Data should automatically find it.

BUGS

Top

I'm not a very good Windows Perler, so some things don't work as they should on Windows. I recently got a Windows box so I can test things, but if you run into problems, I can use all the patches or advice you care to send.

SEE ALSO

Top

Test::Data::Scalar, Test::Data::Array, Test::Data::Hash, Test::Data::Function, Test::Builder

SOURCE AVAILABILITY

Top

This source is in Github:

	http://github.com/briandfoy/test-data/tree/master

AUTHOR

Top

brian d foy, <bdfoy@cpan.org>

COPYRIGHT AND LICENSE

Top


Test-Data documentation Contained in the Test-Data distribution.
# $Id$
package Test::Data;
use strict;

use vars qw($VERSION);

use Carp qw(carp);

use Test::Builder;

my $Test = Test::Builder->new();

$VERSION = '1.22';

$Exporter::Verbose = 0;

sub import 
	{
    my $self   = shift;
    my $caller = caller;

	foreach my $package ( @_ )
		{
		my $full_package = "Test::Data::$package";
		eval{ eval "require $full_package" };
		if( $@ )
			{
			carp "Could not require Test::Data::$package: $@";
			}

		$full_package->export($caller);
		}

	}

sub VERSION { return $VERSION }

"Now is the time for all good men to come to the aid of their country";