From 07ca6141fbc14fd129dfc2aa4f7fc9b9a5d03030 Mon Sep 17 00:00:00 2001 From: Karen Etheridge Date: Fri, 25 Jul 2025 15:13:21 -0700 Subject: [PATCH] add missing documentation for reftype --- Changes | 1 + lib/Test/Deep.pm | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/Changes b/Changes index 2c4a4de..cc004be 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,7 @@ Revision history for Test-Deep {{$NEXT}} + - add documentation for reftype() (Karen Etheridge) 1.205 2025-04-01 11:01:50-04:00 America/New_York - add "use v5.12" to Test::Deep, just for clarity diff --git a/lib/Test/Deep.pm b/lib/Test/Deep.pm index 2ecbd50..258c9aa 100644 --- a/lib/Test/Deep.pm +++ b/lib/Test/Deep.pm @@ -1281,6 +1281,13 @@ to patch over the fact that C is exported by default. This test accepts only objects that are instances of C<$class> or a subclass. Unlike the C test, this test will never accept class names. +=head3 reftype + + cmp_deeply( $got, reftype('CODE') ); + +This test only accepts values that are of the reftype passed to the subroutine, +for example C, C, C, C or C. + =head3 array_each cmp_deeply( \@got, array_each($thing) );