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

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

Serving Software Downloads in 976 Categories, Downloaded 29.647.679 Times

IO::Interactive 0.0.3

  Date Added: February 14, 2010  |  Visits: 883

IO::Interactive

Report Broken Link
Printer Friendly Version


Product Homepage
Download (72 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  
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  
Libraries  -  dtRdr::Annotation::IO::YAML 0.0.11
dtRdr::Annotation::IO::YAML is a Perl module to read/write annotations from/to yml files. Methods init $io->init; items_for Return the hashrefs for a given book. @items = $io->items_for($book); insert $io->insert($object, %args);...
2.8 MB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
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  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  wolfSSL 3.11.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...
2.73 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