File perl-Tie-Hash-DBD.spec of Package perl-Tie-Hash-DBD
#
# spec file for package perl-Tie-Hash-DBD
#
# Copyright (c) 2011 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/
#
Name: perl-Tie-Hash-DBD
Version: 0.07
Release: 1
License: GPL+ or Artistic
%define cpan_name Tie-Hash-DBD
Summary: Tie plain hashes to DBI interface
Url: http://search.cpan.org/dist/Tie-Hash-DBD/
Group: Development/Libraries/Perl
#Source: http://www.cpan.org/authors/id/H/HM/HMBRAND/Tie-Hash-DBD-%{version}.tgz
Source: %{cpan_name}-%{version}.tgz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(Test::Harness)
%if 0%{?suse_version} >= 1120
BuildRequires: perl(Test::More) >= 0.88
%endif
BuildRequires: perl(Time::HiRes)
#
BuildRequires: perl(Carp)
BuildRequires: perl(DBI) >= 1.613
BuildRequires: perl(Storable)
Requires: perl(Carp)
Requires: perl(DBI) >= 1.613
Requires: perl(Storable)
%{perl_requires}
%if 0%{?suse_version} > 1010
Recommends: perl(DBD::SQLite)
%endif
%description
This module has been created to act as a drop-in replacement for modules
that tie straight perl hashes to disk, like 'DB_File'. When the running
system does not have enough memory to hold large hashes, and disk-tieing
won't work because there is not enough space, it works quite well to tie
the hash to a database, which preferable runs on a different server.
This module ties a hash to a database table using *only* a 'key' and a
'value' field. If no tables specification is passed, this will create a
temporary table with 'h_key' for the key field and a 'h_value' for the
value field.
I think it would make sense to merge the functionality that this module
provides into 'Tie::DBI'.
%prep
%setup -q -n %{cpan_name}-%{version}
%if 0%{?suse_version} < 1120 || 0%{?rhel_version} || 0%{?centos_version}
%{__perl} -p -i -e 's|(done_testing.*)|#\1|' t/*.t
%{__perl} -p -i -e 's|(use Test::More);|\1 qw(no_plan);|' t/10_load.t
%endif
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}
%check
%{__make} test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%clean
%{__rm} -rf %{buildroot}
%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes README
%changelog