Subject: | Data::Dumper inconsistent over varying versions |
Hi,
eq_or_diff uses Data::Dumper to do its thing. However your
Makefile/Build doesn't specify a minimum Data::Dumper version, which
means that some testers/installers which have an older version of DD
will output numerical values as string, which causes eq_or_diff to
complain, since 42 != '42'
This was a change in DD:
http://search.cpan.org/~smueller/Data-Dumper-2.126/Changes if you look
down to release 2.11 you will see that release and all newer ones dump
numerical values correctly.
I think this should be easy for you to fix by just requiring a minimum
version in your build script. It really should just be:
requires => {
'Test::More' => 0,
'Text::Diff' => 0.35,
+ 'Data::Dumper' => 2.126,
},
in your Build.PL, so that going forward everyone that installs the
module will get consistent comparisons of numerical information, as
opposed to now, where you get either numerical or strings depending on
what version of DD you happen to have installed.
I tested this change myself and seems to run your test suite fine.
However I understand this change may effect darkcpan in unknowable ways.
Your thoughts appreciated, and am willing to help in any way you think
useful.
Just so you know my stake, this inconsistent behavior is the number one
cause of bug reports on one of my modules,
http://search.cpan.org/perldoc?Test::DBIx::Class
John