Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Tomcat42
perl-Prompt-Timeout
perl-Prompt-Timeout.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File perl-Prompt-Timeout.spec of Package perl-Prompt-Timeout
# # spec file for package perl-Prompt-Timeout # # 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-Prompt-Timeout Version: 1.03 Release: 1 License: GPL+ or Artistic %define cpan_name Prompt-Timeout Summary: prompt() with auto-selecting default value in case of inactivity Url: http://search.cpan.org/dist/Prompt-Timeout/ Group: Development/Libraries/Perl #Source: http://www.cpan.org/authors/id/S/ST/STRO/Prompt-Timeout-%{version}.tar.gz Source: %{cpan_name}-%{version}.tar.gz BuildRequires: perl(Term::ReadKey) BuildRequires: perl BuildRequires: perl-macros Requires: perl(Term::ReadKey) BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %{perl_requires} %description This module provides only one function, prompt(), and it's exported by default. prompt my $res = prompt ( $question, $default, $timeout ); Prints a $question and waits for the input. If no keys are pressed during $timeout seconds, $default is assumed. When pressing just Enter key, $default is assumed. If prompt() detects that it is not running interactively, $default will be used without prompting too. If you want to disable inactivity timer if any key is pressed during prompt(), you can invoke it with another optional parameter: my $res = prompt ( $question, $default, $timeout, 1 ); Once a key is pressed, inactivity timer is disabled. When $timeout value is omitted, it assumes 60 seconds. %prep %setup -q -n %{cpan_name}-%{version} %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(644,root,root,755) %doc CHANGES README %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor