Subject: | eq_or_diff should also find differences in CODE references |
The following test script would (incorrectly) pass:
#!perl
use strict;
use Test::More 'no_plan';
use Test::Differences;
# $Data::Dumper::Deparse = 1;
my $x = sub { 1 };
my $y = sub { 2 };
eq_or_diff $x, $y;
__END__
However, if one knows that Test::Differences is using Data::Dumper behind the scenes and sets $Data::Dumper::Deparse to a true value to enable serialization of CODE references, then the difference would be shown. I think it would be nice if Deparse is always enabled in Test::Differences.
Regards,
Slaven