Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.287.243 Times

IO::Interactive 0.0.3

  Date Added: February 14, 2010  |  Visits: 1.157

IO::Interactive

Report Broken Link
Printer Friendly Version


Product Homepage
Download (88 downloads)



IO::Interactive is a Perl module with utilities for interactive I/O. SYNOPSIS use IO::Interactive qw(is_interactive interactive busy); if ( is_interactive() ) { print "Running interactivelyn"; } # or... print {interactive} "Running interactivelyn"; $fh = busy { do_noninteractive_stuff(); } This module provides three utility subroutines that make it easier to develop interactive applications... is_interactive() This subroutine returns true if *ARGV and *STDOUT are connected to the terminal. The test is considerably more sophisticated than: -t *ARGV && -t *STDOUT as it takes into account the magic behaviour of *ARGV. You can also pass is_interactive a writable filehandle, in which case it requires that filehandle be connected to a terminal (instead of *STDOUT). The usual suspect here is *STDERR: if ( is_interactive(*STDERR) ) { carp $warning; } interactive() This subroutine returns *STDOUT if is_interactive is true. If is_interactive() is false, interactive returns a filehandle that does not print. This makes it easy to create applications that print out only when the application is interactive: print {interactive} "Please enter a value: "; my $value = <>; You can also pass interactive a writable filehandle, in which case it writes to that filehandle if it is connected to a terminal (instead of writinbg to *STDOUT). Once again, the usual suspect is *STDERR: print {interactive(*STDERR)} $warning; busy {...} This subroutine takes a block as its single argument and executes that block. Whilst the block is executed, *ARGV is temporarily replaced by a closed filehandle. That is, no input from *ARGV is possible in a busy block. Furthermore, any attempts to send input into the busy block through *ARGV is intercepted and a warning message is printed to *STDERR. The busy call returns a filehandle that contains the intercepted input. A busy block is therefore useful to prevent attempts at input when the program is busy at some non-interactive task..

Requirements: No special requirements
Platforms: Linux
Keyword: Argv Block Busy Filehandle Interactive Io Iointeractive Libraries Module Perl Module Print Programming Stderr Stdout
Users rating: 0/10

License: Freeware Size: 5.12 KB
USER REVIEWS
More Reviews or Write Review


IO::INTERACTIVE RELATED
Libraries  -  PDL::IO::Misc 2.4.3
PDL::IO::Misc is a Perl module with misc IO routines for PDL. rcols() Read ASCII whitespaced cols from a file into piddles and perl arrays (also see "rgrep()"). There are two calling conventions - the old version, where a pattern can be...
2.1 MB  
Libraries  -  IO::InSitu 0.0.2
IO::InSitu is a Perl module to avoid clobbering files opened for both input and output. SYNOPSIS use IO::InSitu; my ($in, $out) = open_rw($infile_name, $outfile_name); for my $line ( ) { $line =~ s/foo/bar/g; print {$out} $line; }...
6.14 KB  
Libraries  -  CAD::Drawing::IO::Tk 0.04
CAD::Drawing::IO::Tk is a Perl module with GUI I/O methods for CAD::Drawing. This module is considered extremely pre-ALPHA and its use is probably deprecated by the time you read this. Methods There is no constructor for this class, its...
8.19 KB  
Programming  -  IO::Unread for Linux 1.03
IO::Unread is a Perl module that exports one function, unread, which will push data back onto a filehandle. Any amount of data can be pushed: if your perl is built with PerlIO layers, the data is stored in a special :pending layer; if not, the...
61.44 KB  
Libraries  -  IO::Prompt 0.99.4
IO::Prompt is a Perl module to interactively prompt for user input. SYNOPSIS use IO::Prompt; while( prompt "next: " ) { print "You said $_n"; } By default, this module exports a single function prompt. It prompts the user to enter some...
14.34 KB  
Libraries  -  CAD::Drawing::IO::Image 0.02
CAD::Drawing::IO::Image is a Perl module with output methods for images. Requisite Plug-in Functions See CAD::Drawing::IO for a description of the plug-in architecture. check_type Returns true if $type is "img" or $filename matches one of...
5.12 KB  
Libraries  -  CAD::Drawing::IO::PostScript 0.03
CAD::Drawing::IO::PostScript is a Perl module with PostScript output methods. I would like this module to both load and save PostScript vector graphics, but I have not yet found a suitable PostScript parsing package. This module should be...
8.19 KB  
Libraries  -  CAD::Drawing::IO::PgDB 0.03
CAD::Drawing::IO::PgDB is a Perl module with PostgreSQL save / load methods. This module is considered pre-ALPHA and under-documented. Its use is strongly discouraged except under experimental conditions. Particularly susceptible to change will...
8.19 KB  
Libraries  -  CAD::Drawing::IO::Compressed 0.26
CAD::Drawing::IO::Compressed is a Perl module to load and save compressed data. Requisite Plug-in Functions See CAD::Drawing::IO for a description of the plug-in architecture. check_type Returns true if $type is "compressed" or $filename...
39.94 KB  
Libraries  -  CAD::Drawing::IO::Split 0.26
CAD::Drawing::IO::Split is a Perl module that allows fast distributed text file methods. Requisite Plug-in Functions See CAD::Drawing::IO for a description of the plug-in architecture. check_type Returns true if $type is "split" or...
39.94 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB