GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  DEVEL::AUTOFLUSH (3)

.ds Aq ’

NAME

Devel::Autoflush - Set autoflush from the command line

CONTENTS

VERSION

version 0.06

SYNOPSIS



 perl -MDevel::Autoflush Makefile.PL



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
o CPANPLUS::Internals::Utils::Autoflush — same idea but STDOUT only and

only available as part of the full CPANPLUS distribution

SUPPORT

    Bugs / Feature Requests

Please report any bugs or feature requests through the issue tracker at <https://github.com/dagolden/Devel-Autoflush/issues>. You will be notified automatically of any progress on your issue.

    Source Code

This is open source software. The code repository is available for public review and contribution under the terms of the license.

<https://github.com/dagolden/Devel-Autoflush>



  git clone https://github.com/dagolden/Devel-Autoflush.git



AUTHOR

David Golden <dagolden@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2014 by David Golden.

This is free software, licensed under:



  The Apache License, Version 2.0, January 2004



Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 DEVEL::AUTOFLUSH (3) 2014-02-27

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.