forked from pool/perl-Time-Out
Accepting request 1130069 from devel:languages:perl:autoupdate
- updated to 0.24 see /usr/share/doc/packages/perl-Time-Out/Changes OBS-URL: https://build.opensuse.org/request/show/1130069 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Time-Out?expand=0&rev=3
This commit is contained in:
parent
09a8fe9615
commit
cb24a095d7
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9396da698fd452d9ce60d642cda2108f11f20ed76c8961779ae11b897ae815d2
|
||||
size 3647
|
3
Time-Out-0.24.tar.gz
Normal file
3
Time-Out-0.24.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:28393baeb943236132595ba1b8793a7c6acddea44c553133447bb6e34cd265cd
|
||||
size 15965
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 28 03:10:08 UTC 2023 - Tina Müller <timueller+perl@suse.de>
|
||||
|
||||
- updated to 0.24
|
||||
see /usr/share/doc/packages/perl-Time-Out/Changes
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 18 10:53:18 UTC 2014 - coolo@suse.com
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package perl-Time-Out
|
||||
#
|
||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -12,38 +12,68 @@
|
||||
# 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/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: perl-Time-Out
|
||||
Version: 0.11
|
||||
Release: 0
|
||||
%define cpan_name Time-Out
|
||||
Name: perl-Time-Out
|
||||
Version: 0.240.0
|
||||
Release: 0
|
||||
%define cpan_version 0.24
|
||||
License: Artistic-1.0 OR GPL-1.0-or-later
|
||||
Summary: Easily timeout long running operations
|
||||
License: GPL-1.0+ or Artistic-1.0
|
||||
Group: Development/Libraries/Perl
|
||||
Url: http://search.cpan.org/dist/Time-Out/
|
||||
Source: http://www.cpan.org/authors/id/P/PA/PATL/%{cpan_name}-%{version}.tar.gz
|
||||
URL: https://metacpan.org/release/%{cpan_name}
|
||||
Source0: https://cpan.metacpan.org/authors/id/S/SV/SVW/%{cpan_name}-%{cpan_version}.tar.gz
|
||||
BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: perl
|
||||
BuildRequires: perl-macros
|
||||
BuildRequires: perl(App::cpanminus) >= 1.7046
|
||||
BuildRequires: perl(ExtUtils::MakeMaker::CPANfile) >= 0.09
|
||||
BuildRequires: perl(Test::Fatal)
|
||||
BuildRequires: perl(Test::Needs)
|
||||
BuildRequires: perl(Try::Tiny)
|
||||
Requires: perl(Try::Tiny)
|
||||
Provides: perl(Time::Out) = %{version}
|
||||
Provides: perl(Time::Out::Exception) = %{version}
|
||||
Provides: perl(Time::Out::ParamConstraints) = %{version}
|
||||
%define __perllib_provides /bin/true
|
||||
Recommends: perl(Time::HiRes) >= 1.972.600
|
||||
%{perl_requires}
|
||||
|
||||
%description
|
||||
'Time::Out' provides an easy interface to _alarm(2)_ based timeouts. Nested
|
||||
timeouts are supported.
|
||||
The 'Time::Out' module provides an easy interface to alarm(2) based
|
||||
timeouts. Nested timeouts are supported. The module exports the 'timeout()'
|
||||
function by default. The function returns whatever the code placed inside
|
||||
the subroutine reference returns:
|
||||
|
||||
use Time::Out qw( timeout );
|
||||
|
||||
my $result = timeout 5 => sub {
|
||||
return 7;
|
||||
};
|
||||
# $result == 7
|
||||
|
||||
If 'Time::Out' sees that Time::HiRes has been loaded, it will use that
|
||||
'alarm()' function (if available) instead of the default one, allowing
|
||||
float timeout values to be used effectively:
|
||||
|
||||
use Time::HiRes qw();
|
||||
use Time::Out qw( timeout );
|
||||
|
||||
timeout 3.1416 => sub {
|
||||
# ...
|
||||
};
|
||||
|
||||
%prep
|
||||
%setup -q -n %{cpan_name}-%{version}
|
||||
%autosetup -n %{cpan_name}-%{cpan_version}
|
||||
|
||||
%build
|
||||
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
||||
%{__make} %{?_smp_mflags}
|
||||
perl Makefile.PL INSTALLDIRS=vendor
|
||||
%make_build
|
||||
|
||||
%check
|
||||
%{__make} test
|
||||
make test
|
||||
|
||||
%install
|
||||
%perl_make_install
|
||||
@ -51,7 +81,7 @@ timeouts are supported.
|
||||
%perl_gen_filelist
|
||||
|
||||
%files -f %{name}.files
|
||||
%defattr(-,root,root,755)
|
||||
%doc Changes README
|
||||
%license LICENSE
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user