The `IO::Tee' constructor, given a list of output handles,
returns a tied handle that can be written to but not read from.
When written to (using print or printf), it multiplexes the
output to the list of handles originally passed to the
constructor. As a shortcut, you can also directly pass a string
or an array reference to the constructor, in which case
`IO::File::new' is called for you with the specified argument or
arguments.
Normally if a part of a pipe fails, depending on the location, it won't
be detected. This breaks down a command involving pipes and runs each
command separately.
It uses open3 to run each chunk of the pipe.
use IO::MultiPipe;
my $pipes = IO::MultiPipe->new();
#This sets the pipe that will be run.
$pipes->set('sed s/-// | sed s/123/abc/ | sed s/ABC/abc/');
if ($pipes->{error}){
print "Error!\n";
}
#'123-ABCxyz' through the command set above.
my $returned=$pipes->run('123-ABCxyz');
use Module::Versions::Report;
...and any code you want...
This will run all your code normally, but then as the Perl interpreter
is about to exit, it will print something like:
Perl v5.6.1 under MSWin32.
Modules in memory:
attributes;
AutoLoader v5.58;
Carp;
Config;
DynaLoader v1.04;
Exporter v5.562;
Module::Versions::Report v1.01;
HTML::Entities v1.22;
HTML::HeadParser v2.15;
HTML::Parser v3.25;
[... and whatever other modules were loaded that session...]
A lot of Perl code ends up with scalars having either a single scalar value
or a reference to an array of scalar values. In order to handle the two
conditions, one must check for what is in the scalar value before getting on
with one's task. Ie:
$text_scalar = 'text';
$aref_scalar = [ 1.. 5 ];
print ref($text_scalar) ? (join ':', @$text_scalar) : $text_scalar;
And this module is designed to address just that!
Devel::TraceFuncs provides utilities to trace the
execution of a program. It can print traces that look
something like:
+-> global: '0'
| +-> main::fo(4, 5) (in ./t.pm:32): 'now then'
| | +-> main::fp(4, 5) (in ./t.pm:19)
| | | +-> main::fq() (in ./t.pm:13)
| | | | que pee doll (in ./t.pm:8)
| | | +-< main::fq() (in ./t.pm:13)
| | | cee dee (in ./t.pm:14)
| | +-< main::fp(4, 5) (in ./t.pm:19)
| | ha
| | hs (in ./t.pm:20)
| +-< main::fo(4, 5) (in ./t.pm:32): 'now then'
| done (in ./t.pm:34)
+-< global: '0'
** If you are unfamiliar with testing read Test::Tutorial first! **
This is a simple, basic module for checking whether a class is a Singleton. A
Singleton describes an object class that can have only one instance in any
system. An example of a Singleton might be a print spooler or system registry,
or any kind of central dispatcher.
For a description and discussion of the Singleton class, see "Design Patterns",
Gamma et al, Addison-Wesley, 1995, ISBN 0-201-63361-2.
autobox::CORE defines methods for core operations such as join,
print, most everything in perlfunc, some things from Scalar::Util
and List::Util, and some Perl 5 versions of methods taken from
Perl6.
These methods expose as methods the built-in functions for
minipulating numbers, strings, arrays, hashes, and code references.
It can be handy to use built-in functions as methods to avoid messy
dereferencing syntaxes and parentheses pile ups.
GNU barcode is a tool to convert text strings to printed bars. It
supports a variety of standard codes to represent the textual strings
and creates postscript output.
Main features of GNU Barcode:
* Available as both a library and an executable program
* Supports UPC, EAN, ISBN, CODE39 and other encoding standards
* Postscript and Encapsulated Postscript output
* Accepts sizes and positions as inches, centimeters, millimeters
* Can create tables of barcodes (to print labels on sticker pages)
Prn prints out a text file to a postscript printer by converting to
postscript. If the file has kanji code such as 7-bit JIS, MS-kanji
(shifted-JIS) or EUC, it can print out by using a kanji code converter
whose name is kcc. If the file is code of C, C++, FORTRAN, pascal,
... , printing out by prn with a option '-c' can emphasize keywords
and comments.
Beginners always want to write this:
print "The sum of three and four is: 3+4";
And they want the 3+4 part to be evaluated, so that it prints this:
The sum of three and four is: 7
Of course, it's a double-quoted string, so it's not evaluated. The only
things that are evaluated in double-quoted strings are variable
references.
There are solutions to this, but most of them are ugly. This module is
less ugly.