# # spec file for package perl-Hash-AutoHash (Version 1.12) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # 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 http://bugs.opensuse.org/ # # norootforbuild Name: perl-Hash-AutoHash %define cpan_name Hash-AutoHash Summary: Object-oriented access to real and tied hashes Version: 1.12 Release: 1 License: GPL+ or Artistic Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/Hash-AutoHash/ #Source: http://www.cpan.org/modules/by-module/Hash/Hash-AutoHash-%{version}.tar.gz Source: %{cpan_name}-%{version}.tar.bz2 Patch0: %{cpan_name}-1.12_Build_n_Test.patch BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl(Module::Build) BuildRequires: perl-macros %if 0%{?suse_version} > 1120 BuildRequires: perl(Test::More) >= 0.88 %endif BuildRequires: perl(Carp) BuildRequires: perl(Exporter) BuildRequires: perl(List::MoreUtils) >= 0.09 BuildRequires: perl(Scalar::Util) >= 1.01 BuildRequires: perl(Test::Deep) BuildRequires: perl(Tie::Hash) >= 1 BuildRequires: perl(Tie::Hash::MultiValue) BuildRequires: perl(Tie::ToObject) %{perl_requires} Requires: perl(Carp) Requires: perl(List::MoreUtils) >= 0.09 Requires: perl(Scalar::Util) >= 1.01 Requires: perl(Tie::Hash) >= 1 Requires: perl(Tie::ToObject) %description This is yet another module that lets you access or change the elements of a hash using methods with the same name as the element's key. It follows in the footsteps of Hash::AsObject, Hash::Inflator, Data::OpenStruct::Deep, Object::AutoAccessor, and probably others. The main difference between this module and its forebears is that it supports tied hashes, in addition to regular hashes. This allows a modular division of labor: this class is generic and treats all hashes the same; any special semantics come from the tied hash. Authors: -------- Nat Goodman %prep %setup -q -n %{cpan_name}-%{version} %if 0%{?suse_version} <= 1120 %patch0 -p1 %endif %build %{__perl} Build.PL installdirs=vendor ./Build %check ./Build test %install ./Build install destdir=$RPM_BUILD_ROOT create_packlist=0 %perl_gen_filelist %clean %{__rm} -rf $RPM_BUILD_ROOT %files -f %{name}.files %defattr(-,root,root,-) %doc Changes README %changelog