# # spec file for package perl-Data-Compare # # Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define cpan_name Data-Compare Name: perl-Data-Compare Version: 1.290.0 Release: 1.2 # 1.29 -> normalize -> 1.290.0 %define cpan_version 1.29 #Upstream: Artistic-1.0 or GPL-1.0-or-later License: Artistic-1.0 OR GPL-1.0-or-later Summary: Compare perl data structures URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/D/DC/DCANTRELL/%{cpan_name}-%{cpan_version}.tar.gz Source1: cpanspec.yml BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(Clone) >= 0.430 BuildRequires: perl(ExtUtils::MakeMaker) >= 6.48 BuildRequires: perl(File::Find::Rule) >= 0.100 BuildRequires: perl(Test::More) >= 0.88 Requires: perl(Clone) >= 0.430 Requires: perl(File::Find::Rule) >= 0.100 Requires: perl(Test::More) >= 0.88 Provides: perl(Data::Compare) = %{version} Provides: perl(Data::Compare::Plugins::Scalar::Properties) = 1.250.0 %undefine __perllib_provides %{perl_requires} %description Compare two perl data structures recursively. Returns 0 if the structures differ, else returns 1. A few data types are treated as special cases: * 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: $r = qr/abc/i; $s = qr/abc/i; Compare($r, $s); and the following won't, despite them matching *exactly* the same text: $r = qr/abc/i; $s = qr/[aA][bB][cC]/; Compare($r, $s); Sorry, that's 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. You may also customise how we compare structures by supplying options in a hashref as a third parameter to the 'Compare()' function. This is not yet available through the OO-ish interface. These options will be in force for the *whole* of your comparison, so will apply to structures that are lurking deep down in your data as well as at the top level, so beware! * ignore_hash_keys an arrayref of strings. When comparing two hashes, any keys mentioned in this list will be ignored. %prep %autosetup -n %{cpan_name}-%{cpan_version} -p1 find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644 %build perl Makefile.PL INSTALLDIRS=vendor %make_build %check make test %install %perl_make_install %perl_process_packlist %perl_gen_filelist %files -f %{name}.files %doc CHANGELOG MAINTAINERS-NOTE NOTES README %license ARTISTIC.txt GPL2.txt %changelog * Sat May 24 2025 Tina Müller - Normalize CPAN version See https://github.com/openSUSE/cpanspec/issues/47 for details * Sat Apr 22 2023 Tina Müller - updated to 1.29 see /usr/share/doc/packages/perl-Data-Compare/CHANGELOG 1.29 2023-04-21 - Skip taint-mode tests if perl was built without taint support * Wed Mar 15 2023 Tina Müller - updated to 1.28 see /usr/share/doc/packages/perl-Data-Compare/CHANGELOG 1.28 2023-03-14 - Bug fix: DCANTRELL: undef values in hashes were treated incorrectly, need to check for existence, not definedness before comparing. See https://github.com/DrHyde/perl-modules-Data-Compare/issues/21 * Fri Nov 15 2019 - Add manual license Artistic-1.0 OR GPL-1.0-or-later to cpanspec.yml https://github.com/DrHyde/perl-modules-Data-Compare/issues/15 * Wed Nov 6 2019 - updated to 1.27 see /usr/share/doc/packages/perl-Data-Compare/CHANGELOG 1.27 2019-11-05 DCANTRELL Fix bug when options are passed as a persistent hash from calling code and not an anonyhash (Sam Kington) * Thu Sep 19 2019 - updated to 1.26 see /usr/share/doc/packages/perl-Data-Compare/CHANGELOG 1.26 2019-09-18 DCANTRELL Minor code quality improvements from Alberto Simõe; Reinstate check for cwd being inaccessible (Daniel Collins) * Thu Apr 16 2015 coolo@suse.com - updated to 1.25 see /usr/share/doc/packages/perl-Data-Compare/CHANGELOG 1.25 2013-04-15 DCANTRELL Add Gianni Ceccarelli's tests and patch to Use refaddr & reftype to "do the right thing" when comparing objects that overload numification and stringification * Mon Sep 15 2014 coolo@suse.com - updated to 1.24 Bump the required JSON.pm version for tests - something's a bit broken around about v 2.53 * Fri Oct 4 2013 coolo@suse.com - updated to 1.23 Add David Muir Sharnoff's tests for really big data structures (but not yet working); Check for taint-mode less insanely * Fri Jan 21 2011 coolo@novell.com - initial package 1.22 * created by cpanspec 1.78.03