io pipe producer
IO::Pipe::Producer 1.5
IO::Pipe::Producer is a Perl module that provides two modules getSubroutineProducer and getSystemProducer. more>>
SYNOPSIS
# Module which provides 2 methods: getSubroutineProducer
# and getSystemProducer. They take a subroutine reference
# (with associated arguments) and a system call
# respectively and return (blessed) handles on their
# streaming standard output and standard error output.
# EXAMPLES of usage
use IO::Pipe::Producer;
$obj = new IO::Pipe::Producer();
$stdout_fh =
$obj->getSubroutineProducer($subroutine_reference,
@subroutine_parameters);
# OR
use IO::Pipe::Producer;
$obj = new IO::Pipe::Producer();
($stdout_fh,$stderr_fh) =
$obj->getSubroutineProducer($subroutine_reference,
@subroutine_parameters);
# OR
use IO::Pipe::Producer;
$stdout_fh = new IO::Pipe::Producer($subroutine_reference,
@subroutine_parameters);
# OR
use IO::Pipe::Producer;
($stdout_fh,$stderr_fh) =
new IO::Pipe::Producer($subroutine_reference,
@subroutine_parameters);
# Then you can read the returned handles like any other
# file handle...
while()
{print "STDOUT From Producer: $_"}
while()
{print "STDERR From Producer: $_"}
# You can also do the same thing with system calls using
# the getSystemProducer subroutine. However, this feature
# is not accessible via the new constructor
use IO::Pipe::Producer;
$obj = new IO::Pipe::Producer();
$stdout_fh =
$obj->getSystemProducer("echo "Hello World!"");
use IO::Pipe::Producer;
$obj = new IO::Pipe::Producer();
($stdout_fh,$stderr_fh) =
$obj->getSystemProducer("echo "Hello World!"");
# However, this is exactly the same as:
use IO::Pipe::Producer;
$stdout_fh = new Producer(sub{system(@_)},
"echo "Hello World!"");
# OR
use IO::Pipe::Producer;
($stdout_fh,$stderr_fh) =
new IO::Pipe::Producer(sub{system(@_)},
"echo "Hello World!"");
Pipe Viewer 1.0.1
Pipe Viewer is a pipeline data transfer meter. more>>
It can be inserted into any normal pipeline between two processes to give a visual indication of how quickly data is passing through, how long it has taken, how near to completion it is, and an estimate of how long it will be until completion.
pv is now considered to be stable code: it appears to work reliably on systems it has been tested on.
Pipepanic 0.1.3
Pipepanic is a pipe connecting game using libSDL. more>>
Comes with built-in help, is primarily mouse/stylus driven and can be played in different resolutions and orientations.
libCoroutine 0.9
libCoroutine is a simple stackfull coroutine implementation, largely based on ucontext and fibers. more>>
This library is built from the coroutine implementation of the Io programming language project.
LiON Library 2.1
LiON Library is a full nonblocking, single thread library with an API that is portable and easy to use. more>>
LiON Library has full network support, files, and pipes (for spawning children, or processes to communicate with). All types can also be rate (KB/s) limited, and full SSL support is included.
Main features:
- Nonblocking Networking.
- Nonblocking File I/O.
- Nonblocking pipe/system and fork commands for spawning helper programs.
- Event driven, event passback for all situations.
- SSL incorporated, with auto-detection.
- Portable (Already confirmed NetBSD, Solaris, Linux, OsX and Win32)
- Single process / thread library.
- Numerous Sample programs included.
- Support both in-library sleep/CPU-release, or in Application.
- Full buffering control, and flow control.
- CPS (KB/s) rate limits on _any_ I/O type. (Socket, File & Pipe)
- Adoptable foreign file-descriptors API.
- Clean API with documentation, although man-page comming.
- Direct, or event driven, failure modes supported.
- Exclusive File I/O locking optional, across all platforms.
- Internal compression optional.
- Very simple to use for line-by-line protocols, or binary chunk data transfers.
- Full UDP support
- Encrypted File IO support (blowfish, dependent on SSL)
- contrib/ sources include Directory listings library for all platforms.
- Python support! Using SWIG there now is an easy way to do async SSL in Python
- Timers! Callback timers in relative or absolute time. One-shot or repeat.
Enhancements:
- SSL connections could stall based on buffer size, so this has been fixed.
- Minor autoconf changes were made.
- Missing Win32 files were added to the dist-gzip file again.
mod_auth_pipe 1.0
mod-auth-pipe is a module of authentication written for Apache 1 (it hasnt been tested with Apache 2, but it may work). more>>
Actually, this module is just mod-auth-shadow with a few modifications in order to accept any program as a pipe, letting this one validate both users andr groups.
mod_auth_pipe contents the module itself and an example pipe.
mod-auth-pipe can be configured independantly for whole server, for any VirtualHost or just per Location/Directory. It has very few configuration variables and its format is very simple. In order to configure apache to authenticate, for example, access to the administrative interface of oscommerce you can type this on your httpd.conf:
< Directory /var/www/oscommerce/catalog/admin >
AuthType Basic
AuthName osCommerce admin site
AuthPipe on
AuthPipeProgram /usr/local/bin/auth-pipe
require group oscommerce-admins
< /Location >
This way, and with a well-made auth-pipe program you can be sure that only those within the group oscommerce-admins could enter that section of your web.
Pipe-Sem 1.0
This is a pipe based semaphore implementation for developing ASYNC applications. more>>
Pipe-Sem 1.0 is a good utility which might help you a lot in developing ASYNC applications. Many synchronization primitives are available for Unix systems, but any of them expose a pollable interface to the user. In these cases, if the caller execute a down operation on a blocking semaphore, the application will sleep and whole ASYNC loop will starve because of the wait.
To cope with this problem in ASYNC software, the publisher developed a pipe based semaphore implementation, called Pipe-Sem. The implementation is trivially simple and it uses the pipe internal mechanisms to expose a pollable wait interface.
Besides the standard semaphore operations, the function psem_down_fd() can be used to retrieve a files descriptor that can be dropped inside a Unix pollable API like select(2), poll(2) or epoll(2). The caller will have to wait for input events (POLLIN), and when receiving the event itself, the caller should invoke the psem_try_down() function to try to acquire the semaphore.
Please note that receiving an event from the pollable interface, does not mean that we acquired to semaphore, and the function psem_try_down() will have to be called (and tested for zero return code) to correctly complete the down operation.
<<lessIO::Multiplex 1.08
IO::Multiplex is a Perl module that can manage IO on many file handles. more>>
SYNOPSIS
use IO::Multiplex;
my $mux = new IO::Multiplex;
$mux->add($fh1);
$mux->add(*FH2);
$mux->set_callback_object(...);
$mux->listen($server_socket);
$mux->loop;
sub mux_input {
...
}
IO::Multiplex is designed to take the effort out of managing multiple file handles. It is essentially a really fancy front end to the select system call. In addition to maintaining the select loop, it buffers all input and output to/from the file handles. It can also accept incoming connections on one or more listen sockets.
It is object oriented in design, and will notify you of significant events by calling methods on an object that you supply. If you are not using objects, you can simply supply __PACKAGE__ instead of an object reference.
You may have one callback object registered for each file handle, or one global one. Possibly both -- the per-file handle callback object will be used instead of the global one.
Each file handle may also have a timer associated with it. A callback function is called when the timer expires.
Simple UDP proxy/pipe 0.3
Simple UDP proxy/pipe is an advanced UDP proxy/datapipe/packets forwarder and modifier with multiple functions. more>>
Multiple clients allowed (you can connect many clients you want to this proxy), creation of ACP files (tcpdump capture files, just like a sniffer), packets forwarding (chat style, each packet is forwarded to all the other clients and server connected), packets injection (the tool opens a specific UDP port where you can send your customized packets which will be sent to the server), hexadecimal visualization and plugins support for the modification and visualization of the packets with some example plugins already included (Zdaemon huffman, Doom huffman, Half-life decoding and one for the replacement of the text strings).
Plugins (which work on both Windows and Linux) are very basic to create and use, just take a look at example_sudp.c for more informations.
pipebench 0.40
pipebench is a utility that shows the status and a benchmark of piped commands. more>>
Pipebench measures the speed of a pipe, by sitting in the middle passing the data along to the next process. Works on at least Linux, OpenBSD, NetBSD, Solaris and x86, Alpha, HPPA, Sparc and Sparc64.
Compiling
Just type make to compile.
Type make install to have pipebench be installed in /usr/local/bin
xmms-pipe 0.5.5
xmmspipe is a plugin for XMMS that enables it to be controlled by sending strings to a named pipe (FIFO). more>>
echo play_pause > ~/.xmms/inpipe
will cause XMMS to pause or play.
Since version 0.5.0, it is possible to setup an output pipe, and query XMMS for information. For example, sending "report title" to the input pipe will cause the current songs title to be printed on the output pipe.
Included is a demo program called "fade", that shows how to use the plugin to fade the current song and advance to the next one. It requires the output pipe to be be enabled (via the Config window).
The Infopipe plugin does output pipes a little differently.
When I first wrote this plugin, I didnt know about other programs that I couldve used to control XMMS with shell scripts, such as xmmsctrl or xmms-shell. However, Ive kept xmmspipe alive because pipes may be preferable in some situations:
The pipe automatically inherits the security features of the underlying filesystem (e.g. you could change its permissions so that only users of a particular group can control XMMS).
In many programming languages, writing to a pipe is easier than executing programs, making it easier to build programs to control XMMS.
The plugin can call internal XMMS functions which means it can have more functionality than programs relying on the xmms_remote_* functions alone. For example, XMMSPipe can load/save playlists.
Sometimes I think XMMS itself should just be an MP3-playing daemon that interfaces with the outside world exclusively through pipes (one for input, at least one for output). This would allow a lot more flexibility, e.g. the GUI could be arbitrary and playlists could be managed by an external program. (It would work in the same way gkrellm works with files in /proc.) Also, the code would be simpler because it only has to worry about reading various audio formats and playing them. It wouldnt have to deal with window managers, X, etc.
Enhancements:
- Added playlist_move command due to Graeme Yeo
SQL::Translator::Producer::GraphViz 0.07
SQL::Translator::Producer::GraphViz is a GraphViz producer for SQL::Translator. more>>
SYNOPSIS
use SQL::Translator;
my $trans = new SQL::Translator(
from => MySQL, # or your db of choice
to => GraphViz,
producer_args => {
out_file => schema.png,
add_color => 1,
show_constraints => 1,
show_datatypes => 1,
show_col_sizes => 1
}
) or die SQL::Translator->error;
$trans->translate or die $trans->error;
Creates a graph of a schema using the amazing graphviz (see http://www.graphviz.org/) application (via the GraphViz module). Its nifty--you should try it!
Bio::Phylo::IO 0.17 RC6
Bio::Phylo::IO Perl module contains input and output of phylogenetic data. more>>
SYNOPSIS
use Bio::Phylo::IO;
# parsing a tree from a newick string
my $tree_string = (((A,B),C),D);;
my $tree = Bio::Phylo::IO->parse(
-string => $tree_string,
# old parser, always adds node labels
-format => newick,
)->first;
# note: newick parsers return
# Bio::Phylo::Forest! Call
# ->first to retrieve the first
# tree of the forest.
# prints Bio::Phylo::Forest::Tree
print ref $tree, "n";
# parsing a table
my $table_string = qq(A,1,2|B,1,2|C,2,2|D,2,1);
my $matrix = Bio::Phylo::IO->parse(
-string => $table_string,
-format => table,
# Data type, see Bio::Phylo::Parsers::Table
-type => STANDARD,
# field separator
-fieldsep => ,,
# line separator
-linesep => |
);
# prints Bio::Phylo::Matrices::Matrix
print ref $matrix, "n";
# parsing a list of taxa
my $taxa_string = A:B:C:D;
my $taxa = Bio::Phylo::IO->parse(
-string => $taxa_string,
-format => taxlist,
-fieldsep => :
);
# prints Bio::Phylo::Taxa
print ref $taxa, "n";
# matches taxon names in tree to $taxa object
$tree->cross_reference($taxa);
# likewise for matrix
$matrix->cross_reference($taxa);
print Bio::Phylo::IO->unparse(
# pass the tree object,
# crossreferenced to taxa, which
# are crossreferenced to the matrix
-phylo => $tree,
-format => pagel
);
# prints a pagel data file:
#4 2
#A,n1,0.000000,1,2
#B,n1,0.000000,1,2
#n1,n2,0.000000
#C,n2,0.000000,2,2
#n2,n3,0.000000
#D,n3,0.000000,2,1
PAIP 0.2.4
PAIP (pipe) is a universal filter application. more>>
You will need:
gcc & GNU make
GNU sed
GNU install
libdl
libpthread
In three steps you can install it:
1) ./configure
Enter the destination path on prompt.
Just pressing will set the default path /usr/local.
2) make
3) make install
Enhancements:
- fixed Makefiles
- extended plugin socket (connections-switch)
- new using-plugin jpg2bmp
- new using-plugin gif2bmp
IO::Prompt 0.99.4
IO::Prompt is a Perl module to interactively prompt for user input. more>>
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 input, and returns an object that represents the user input.
You may specify various flags to the function to affect its behaviour; most notably, it defaults to automatically chomp the input, unless the -line flag is specified.
Two other functions are exported at request: hand_print, which simulates hand-typing to the console; and get_input, which is the lower-level function that actually prompts the user for a suitable input.
Note that this is an interim re-release. A full release with better documentation will follow in the near future. Meanwhile, please consult the examples directory from this modules CPAN distribution to better understand how to make use of this module.