Subject: | [FR] Method is_not_deeply |
Hi,
I suggest to add a method, which will return true if two complex
structures are not equal.
Currently, we may find difference between the deep structures in this way:
ok( eq_hash($a, $b), 'Hashes are equal');
ok( ! eq_hash($a, $c), 'Hashes are NOT equal, and it is correct');
But as you said in the pod, eq_* methods may be deprecated, and using of
is_deeply() is better way.
By-turn, is_deeply() isn't just a boolean function; it produce output in
TAP format, so I cannot use it like not_ok(is_deeply(...)) or whatever.
So, I need a function is_not_deeply(), which fails if structures are equal.
Why is it necessary: for example, we test a method like clone(), which
must duplicate an object fully, but must not leave references to some
underlying data. Then, we make a cloned object, call some methods on it
and must make sure that methods works with them own copy of data, not
with parts of previous object. Method is_not_deeply() can be very useful
for this purpose.
Could you consider a possibility of this feature implementation, please?
Thanks!
--
Oleg Alistratov