Data::Structure::Compare : Compare the structure of two Hash reference
Version 0.02
use Data::Structure::Compare qw(structure_compare); my $data1 = { key1 => 1, key2 => 2, key3 => { key4 => 3, key5 => { key6 => 4, }, }, }; my $data1 = { key1 => 11, key2 => 12, key3 => { key4 => 13, key5 => { key6 => 14, }, }, }; if (structure_compare($data1, $data2) == 1) { print '$data1 and $data2 have same structure'; } ...
structure_compare : compare two Hash reference, Only compare the key name In default, This module could compare the max depth is 100. It would not compare the value with Array reference.
Micheal Song, <perlvim at gmail.com>
<perlvim at gmail.com>
Please report any bugs or feature requests to bug-data-structure-compare at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Data-Structure-Compare. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-data-structure-compare at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Data::Structure::Compare
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Data-Structure-Compare
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Data-Structure-Compare
CPAN Ratings
http://cpanratings.perl.org/d/Data-Structure-Compare
Search CPAN
http://search.cpan.org/dist/Data-Structure-Compare/
Copyright 2012 Micheal Song.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Data::Structure::Compare, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Structure::Compare
CPAN shell
perl -MCPAN -e shell install Data::Structure::Compare
For more information on module installation, please visit the detailed CPAN module installation guide.