NAME
Test::Data::Scalar -- test functions for scalar variables
SYNOPSIS
use Test::Data qw(Scalar);
DESCRIPTION
This modules provides a collection of test utilities for scalar variables. Load the module through Test::Data.
FUNCTIONS
- blessed_ok( SCALAR )
-
Ok if the SCALAR is a blessed reference.
- defined_ok( SCALAR )
-
Ok if the SCALAR is defined.
- undef_ok( SCALAR )
-
Ok if the SCALAR is undefined.
- dualvar_ok( SCALAR )
-
Ok if the scalar is a dualvar.
- greater_than( SCALAR, BOUND )
-
Ok if the SCALAR is numerically greater than BOUND.
- length_ok( SCALAR, LENGTH )
-
Ok if the length of SCALAR is LENGTH.
- less_than( SCALAR, BOUND )
-
Ok if the SCALAR is numerically less than BOUND.
- maxlength_ok( SCALAR, LENGTH )
-
Ok is the length of SCALAR is less than or equal to LENGTH.
- minlength_ok( SCALAR, LENGTH )
-
Ok is the length of SCALAR is greater than or equal to LENGTH.
- number_ok( SCALAR )
-
Ok if the SCALAR is a number ( or a string that represents a number ).
At the moment, a number is just a string of digits. This needs work.
- readonly_ok( SCALAR )
-
Ok is the SCALAR is read-only.
- ref_ok( SCALAR )
-
Ok if the SCALAR is a reference.
- ref_type_ok( REF1, REF2 )
-
Ok if REF1 is the same reference type as REF2.
- strong_ok( SCALAR )
-
Ok is the SCALAR is not a weak reference.
- tainted_ok( SCALAR )
-
Ok is the SCALAR is tainted.
(Tainted values may seem like a not-Ok thing, but remember, when you use taint checking, you want Perl to taint data, so you should have a test to make sure it happens.)
- untainted_ok( SCALAR )
-
Ok if the SCALAR is not tainted.
- weak_ok( SCALAR )
-
Ok if the SCALAR is a weak reference.
SEE ALSO
Scalar::Util, Test::Data, Test::Data::Array, Test::Data::Hash, Test::Builder
AUTHOR
brian d foy, <bdfoy@cpan.org>
COPYRIGHT
Copyright 2002, brian d foy, All Rights Reserved
You may use, modify, and distribute this under the same terms as Perl itself.