From cb24a095d7bac2c58ce37ed730b31582d295019c45b7f58ad5d147fea99d38a8 Mon Sep 17 00:00:00 2001 From: Dirk Stoecker Date: Sat, 9 Dec 2023 13:22:34 +0000 Subject: [PATCH] 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 --- Time-Out-0.11.tar.gz | 3 -- Time-Out-0.24.tar.gz | 3 ++ perl-Time-Out.changes | 6 ++++ perl-Time-Out.spec | 64 +++++++++++++++++++++++++++++++------------ 4 files changed, 56 insertions(+), 20 deletions(-) delete mode 100644 Time-Out-0.11.tar.gz create mode 100644 Time-Out-0.24.tar.gz diff --git a/Time-Out-0.11.tar.gz b/Time-Out-0.11.tar.gz deleted file mode 100644 index 066833a..0000000 --- a/Time-Out-0.11.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9396da698fd452d9ce60d642cda2108f11f20ed76c8961779ae11b897ae815d2 -size 3647 diff --git a/Time-Out-0.24.tar.gz b/Time-Out-0.24.tar.gz new file mode 100644 index 0000000..3ca010a --- /dev/null +++ b/Time-Out-0.24.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28393baeb943236132595ba1b8793a7c6acddea44c553133447bb6e34cd265cd +size 15965 diff --git a/perl-Time-Out.changes b/perl-Time-Out.changes index 5233238..b6e79bc 100644 --- a/perl-Time-Out.changes +++ b/perl-Time-Out.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Nov 28 03:10:08 UTC 2023 - Tina Müller + +- updated to 0.24 + see /usr/share/doc/packages/perl-Time-Out/Changes + ------------------------------------------------------------------- Tue Mar 18 10:53:18 UTC 2014 - coolo@suse.com diff --git a/perl-Time-Out.spec b/perl-Time-Out.spec index cc5a51f..f40189e 100644 --- a/perl-Time-Out.spec +++ b/perl-Time-Out.spec @@ -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