| 
									
										
										
										
											2014-03-18 10:53:21 +00:00
										 |  |  | #
 | 
					
						
							|  |  |  | # spec file for package perl-Time-Out
 | 
					
						
							|  |  |  | #
 | 
					
						
							| 
									
										
										
										
											2024-03-08 23:06:45 +00:00
										 |  |  | # Copyright (c) 2024 SUSE LLC
 | 
					
						
							| 
									
										
										
										
											2014-03-18 10:53:21 +00:00
										 |  |  | #
 | 
					
						
							|  |  |  | # 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.
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-12-09 13:22:34 +00:00
										 |  |  | # Please submit bugfixes or comments via https://bugs.opensuse.org/
 | 
					
						
							| 
									
										
										
										
											2014-03-18 10:53:21 +00:00
										 |  |  | #
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-12-09 13:22:34 +00:00
										 |  |  | %define cpan_name Time-Out
 | 
					
						
							| 
									
										
										
										
											2014-03-18 10:53:21 +00:00
										 |  |  | Name:           perl-Time-Out
 | 
					
						
							| 
									
										
										
										
											2025-01-09 16:22:46 +00:00
										 |  |  | Version:        1.0.0
 | 
					
						
							| 
									
										
										
										
											2014-03-18 10:53:21 +00:00
										 |  |  | Release:        0
 | 
					
						
							| 
									
										
										
										
											2023-12-09 13:22:34 +00:00
										 |  |  | License:        Artistic-1.0 OR GPL-1.0-or-later
 | 
					
						
							| 
									
										
										
										
											2014-03-18 10:53:21 +00:00
										 |  |  | Summary:        Easily timeout long running operations
 | 
					
						
							| 
									
										
										
										
											2023-12-09 13:22:34 +00:00
										 |  |  | URL:            https://metacpan.org/release/%{cpan_name}
 | 
					
						
							| 
									
										
										
										
											2025-01-09 16:22:46 +00:00
										 |  |  | Source0:        https://cpan.metacpan.org/authors/id/S/SV/SVW/%{cpan_name}-%{version}.tar.gz
 | 
					
						
							| 
									
										
										
										
											2025-08-12 18:18:14 +02:00
										 |  |  | Source100:      README.md
 | 
					
						
							| 
									
										
										
										
											2014-03-18 10:53:21 +00:00
										 |  |  | BuildArch:      noarch
 | 
					
						
							|  |  |  | BuildRequires:  perl
 | 
					
						
							|  |  |  | BuildRequires:  perl-macros
 | 
					
						
							| 
									
										
										
										
											2025-01-09 16:22:46 +00:00
										 |  |  | BuildRequires:  perl(Carp) >= 1.32
 | 
					
						
							|  |  |  | BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.76
 | 
					
						
							| 
									
										
										
										
											2023-12-09 13:22:34 +00:00
										 |  |  | BuildRequires:  perl(ExtUtils::MakeMaker::CPANfile) >= 0.09
 | 
					
						
							|  |  |  | BuildRequires:  perl(Test::Fatal)
 | 
					
						
							| 
									
										
										
										
											2025-01-09 16:22:46 +00:00
										 |  |  | BuildRequires:  perl(Test::Harness) >= 3.50
 | 
					
						
							|  |  |  | BuildRequires:  perl(Test::More) >= 1.001005
 | 
					
						
							| 
									
										
										
										
											2023-12-09 13:22:34 +00:00
										 |  |  | BuildRequires:  perl(Test::Needs)
 | 
					
						
							|  |  |  | BuildRequires:  perl(Try::Tiny)
 | 
					
						
							| 
									
										
										
										
											2025-01-09 16:22:46 +00:00
										 |  |  | BuildRequires:  perl(version) >= 0.9915
 | 
					
						
							|  |  |  | Requires:       perl(Carp) >= 1.32
 | 
					
						
							| 
									
										
										
										
											2023-12-09 13:22:34 +00:00
										 |  |  | Requires:       perl(Try::Tiny)
 | 
					
						
							| 
									
										
										
										
											2025-01-09 16:22:46 +00:00
										 |  |  | Requires:       perl(version) >= 0.9915
 | 
					
						
							|  |  |  | Recommends:     perl(Time::HiRes) >= 1.9726
 | 
					
						
							| 
									
										
										
										
											2014-03-18 10:53:21 +00:00
										 |  |  | %{perl_requires}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | %description
 | 
					
						
							| 
									
										
										
										
											2023-12-09 13:22:34 +00:00
										 |  |  | 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 {
 | 
					
						
							|  |  |  |     # ...
 | 
					
						
							|  |  |  |   };
 | 
					
						
							| 
									
										
										
										
											2014-03-18 10:53:21 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | %prep
 | 
					
						
							| 
									
										
										
										
											2025-01-09 16:22:46 +00:00
										 |  |  | %autosetup  -n %{cpan_name}-%{version}
 | 
					
						
							| 
									
										
										
										
											2014-03-18 10:53:21 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | %build
 | 
					
						
							| 
									
										
										
										
											2023-12-09 13:22:34 +00:00
										 |  |  | perl Makefile.PL INSTALLDIRS=vendor
 | 
					
						
							|  |  |  | %make_build
 | 
					
						
							| 
									
										
										
										
											2014-03-18 10:53:21 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | %check
 | 
					
						
							| 
									
										
										
										
											2023-12-09 13:22:34 +00:00
										 |  |  | make test
 | 
					
						
							| 
									
										
										
										
											2014-03-18 10:53:21 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | %install
 | 
					
						
							|  |  |  | %perl_make_install
 | 
					
						
							|  |  |  | %perl_process_packlist
 | 
					
						
							|  |  |  | %perl_gen_filelist
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | %files -f %{name}.files
 | 
					
						
							|  |  |  | %doc Changes README
 | 
					
						
							| 
									
										
										
										
											2023-12-09 13:22:34 +00:00
										 |  |  | %license LICENSE
 | 
					
						
							| 
									
										
										
										
											2014-03-18 10:53:21 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | %changelog
 |