1Test2::Compare::Ref(3)User Contributed Perl DocumentationTest2::Compare::Ref(3)
2
3
4
6 Test2::Compare::Ref - Ref comparison
7
9 Used to compare two refs in a deep comparison.
10
12 my $ref = {};
13 my $check = Test2::Compare::Ref->new(input => $ref);
14
15 # Passes
16 is( [$ref], [$check], "The array contains the exact ref we want" );
17
18 # Fails, they both may be empty hashes, but we are looking for a specific
19 # reference.
20 is( [{}], [$check], "This will fail");
21
23 The source code repository for Test2-Suite can be found at
24 https://github.com/Test-More/Test2-Suite/.
25
27 Chad Granum <exodist@cpan.org>
28
30 Chad Granum <exodist@cpan.org>
31
33 Copyright 2018 Chad Granum <exodist@cpan.org>.
34
35 This program is free software; you can redistribute it and/or modify it
36 under the same terms as Perl itself.
37
38 See http://dev.perl.org/licenses/
39
40
41
42perl v5.32.1 2021-01-27 Test2::Compare::Ref(3)