The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Test2::Compare::Type - Use a type to validate values in a deep comparison.

DESCRIPTION

This allows you to validate a value's type in a deep comparison. Sometimes a value just needs to look right, it may not need to be exact. An example is that you care that your code always returns an integer, but you don't care whether it is 192 or 3.

CAVEATS

The definitions of Boolean, integer and number are exactly the same as those in Scalar::Type, which this is a thin wrapper around.

SEE ALSO

Scalar::Type

Test2::Tools::Type

Test2

BUGS

If you find any bugs please report them on Github, preferably with a test case.

FEEDBACK

I welcome feedback about my code, especially constructive criticism.

AUTHOR, COPYRIGHT and LICENCE

Mostly cargo-culted from Test2::Compare::Pattern. Differences from that are Copyright 2024 David Cantrell <david@cantrell.org.uk>

This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively.

CONSPIRACY

This module is also free-as-in-mason software.