|Scalar::Properties objects||This has been moved into a plugin, although functionality remains the same as with the previous version. Full documentation is in Data::Compare::Plugins::Scalar::Properties.|
|Compiled regular expressions, eg qr/foo/||
These are stringified before comparison, so the following will match:
and the following wont, despite them matching *exactly* the same text:
Sorry, thats the best we can do.
|CODE and GLOB references||These are assumed not to match unless the references are identical - ie, both are references to the same thing.|
|ignore_hash_keys||an arrayref of strings. When comparing two hashes, any keys mentioned in this list will be ignored.|
Comparing a circular structure to itself returns true:
$x = \$y; $y = \$x; Compare([$x, $y], [$x, $y]);
And on a sort-of-related note, if you try to compare insanely deeply nested structures, the module will spit a warning. For this to affect you, you need to go around a hundred levels deep though, and if you do that you have bigger problems which I cant help you with ;-)
The module takes plug-ins so you can provide specialised routines for comparing your own objects and data-types. For details see Data::Compare::Plugins.
Plugins are *not* available when running in taint mode. You may also make it not load plugins by providing an empty list as the argument to import() - ie, by doing this:
use Data::Compare ();
A couple of functions are provided to examine what goodies have been made available through plugins:
plugins Returns a structure (a hash ref) describing all the comparisons made available through plugins. This function is *not* exported, so should be called as Data::Compare::plugins(). It takes no parameters. plugins_printable Returns formatted text
For historical reasons, the Compare() function is exported. If you dont want this, then pass an empty list to import() as explained under PLUGINS. If you want no export but do want plugins, then pass the empty list, and then call the register_plugins class method:
use Data::Compare (); Data::Compare->register_plugins;
or you could call it as a function if that floats your boat.
Plugin support is not quite finished (see the TODO file for details) but is usable. The missing bits are bells and whistles rather than core functionality.
Plugins are unavailable if you cant change to the current directory. This might happen if you started your process as a priveleged user and then dropped priveleges. This is due to how we check for Taintedness. If this affects you, please supply a portable patch.
Please report any other bugs either by email to David Cantrell (see below for address) or using rt.cpan.org:
Fabien Tassin <email@example.com>
Portions by David Cantrell <firstname.lastname@example.org>
Copyright (c) 1999-2001 Fabien Tassin. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Some parts copyright 2003 - 2010 David Cantrell.
Seeing that Fabien seems to have disappeared, David Cantrell has become a co-maintainer so he can apply needed patches. The licence, of course, remains the same. As the perl licence is Artistic or GPL, your choice, you can find them as the files ARTISTIC.txt and GPL2.txt in the distribution.
|perl v5.20.3||DATA::COMPARE (3)||2010-02-12|