This module provides a single testing function, 'identical'. It asserts that a given reference is as expected; that is, it either refers to the same object or is 'undef'. It is similar to 'Test::More::is' except that it uses 'refaddr', ensuring that it behaves correctly even if the references under test are objects that overload stringification or numification.
It also provides better diagnostics if the test fails:
$ perl -MTest::More=tests,1 -MTest::Identity -e'identical [], {}' 1..1 not ok 1
$ perl -MTest::More=tests,1 -MTest::Identity -e'identical [], []' 1..1 not ok 1
Package Version | Update ID | Released | Package Hub Version | Platforms | Subpackages |
---|---|---|---|---|---|
0.01-bp156.3.1 info | GA Release | 2023-07-22 | 15 SP6 |
|
|
0.01-bp155.2.10 info | GA Release | 2023-05-17 | 15 SP5 |
|
|
0.01-bp154.1.23 info | GA Release | 2022-05-09 | 15 SP4 |
|
|
0.01-bp153.1.15 info | GA Release | 2021-03-06 | 15 SP3 |
|
|
0.01-bp152.3.16 info | GA Release | 2020-04-16 | 15 SP2 |
|
|
0.01-bp151.3.1 info | GA Release | 2019-07-16 | 15 SP1 |
|
|
0.01-bp151.2.14 info | GA Release | 2019-05-18 | 15 SP1 |
|
|
0.01-bp150.2.4 info | GA Release | 2018-07-30 | 15 |
|
|