Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Tomcat42
perl-Devel-Autoflush
perl-Devel-Autoflush.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File perl-Devel-Autoflush.spec of Package perl-Devel-Autoflush
# # spec file for package perl-Devel-Autoflush # # Copyright (c) 2015 SUSE LINUX 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-Devel-Autoflush Version: 0.06 Release: 0 %define cpan_name Devel-Autoflush Summary: Set autoflush from the command line License: Apache-2.0 Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/Devel-Autoflush/ Source0: http://www.cpan.org/authors/id/D/DA/DAGOLDEN/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(IO::CaptureOutput) >= 1.08 BuildRequires: perl(version) %{perl_requires} %description This module is a hack to set autoflush for STDOUT and STDERR from the command line or from 'PERL5OPT' for code that needs it but doesn't have it. This often happens when prompting: # guess.pl print "Guess a number: "; my $n = <STDIN>; As long as the output is going to a terminal, the prompt is flushed when STDIN is read. However, if the output is being piped, the print statement will not automatically be flushed, no prompt will be seen and the program will silently appear to hang while waiting for input. This might happen with 'tee': $ perl guess.pl | tee capture.out Use Devel::Autoflush to work around this: $ perl -MDevel::Autoflush guess.pl | tee capture.out Or set it in 'PERL5OPT': $ export PERL5OPT=-MDevel::Autoflush $ perl guess.pl | tee capture.out = SEE ALSO * * the CPANPLUS::Internals::Utils::Autoflush manpage -- same idea but STDOUT only and only available as part of the full CPANPLUS distribution %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 %files -f %{name}.files %defattr(-,root,root,755) %doc Changes CONTRIBUTING LICENSE README Todo %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