---
name: "Test::Data::Hash"
section: "3pm"
platform: "linux"
package: "libtest-data-perl"
version: "1.248-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Test::Data::Hash"
---

# Test::Data::Hash(3pm)

## NAME

Test::Data::Hash -- test functions for hash variables

## SYNOPSIS

```
        use Test::Data qw(Hash);
```

## DESCRIPTION

This modules provides a collection of test utilities for hash variables.  Load the module through Test::Data.

### Functions

- exists\_ok( KEY, HASH \[, NAME\] )

  Ok if the value for KEY in HASH exists.  The function does not create KEY in HASH.

- not\_exists\_ok( KEY, HASH \[, NAME\] )

  Ok if the value for KEY in HASH does not exist.  The function does not create KEY in HASH.

- hash\_value\_defined\_ok( KEY, HASH \[, NAME\] )

  Ok if the value for KEY in HASH is defined.  The function does not create KEY in HASH.

- hash\_value\_undef\_ok( KEY, HASH \[, NAME\] )

  Ok if the value for KEY in HASH is undefined.  The function does not create KEY in HASH.

- hash\_value\_true\_ok( KEY, HASH \[, NAME\] )

  Ok if the value for KEY in HASH is true.  The function does not create KEY in HASH.

- hash\_value\_false\_ok( KEY, HASH \[, NAME\] )

  Ok if the value for KEY in HASH is false.  The function does not create KEY in HASH.

## SEE ALSO

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

## SOURCE AVAILABILITY

This source is in Github:

```
        https://github.com/briandfoy/test-data
```

## AUTHOR

brian d foy, `"<briandfoy@pobox.com>"`

## COPYRIGHT AND LICENSE

Copyright © 2002-2025, brian d foy \<briandfoy@pobox.com\>. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0.
