This module simplifies the routine job of selecting a random file. (As you
can find at CGI scripts). It's done, because it's boring (and
error prone), always to write something like
my @files = (<*.*>);
my $randf = $files[rand @files];
or
opendir DIR, " ... " or die " ... ";
my @files = grep {-f ...} (readdir DIR);
closedir DIR;
my $randf = $files[rand @files];
It also becomes very boring and very dangerous to write randomly selection
for subdirectory searching with special check-routines. The simple
standard job of selecting a random line from a file is implemented, too.
This module reads a file backwards line by line. It is simple to use,
memory efficient and fast. It supports both an object and a tied handle
interface.
It is intended for processing log and other similar text files which
typically have their newest entries appended to them. By default files
are assumed to be plain text and have a line ending appropriate to the
OS. But you can set the input record separator string on a per file
basis.
This module provides the ability to search a path-like environment variable
for a file (that does not necessarily have to be an executable).
This module provides an attribute wrapper around Getopt::Long. Instead of
declaring the options in a hash with references to the variables and subroutines
affected by the options, you can use the Getopt attribute on the variables and
subroutines directly.
As you can see from the Synopsis, the attribute takes an argument of the same
format as you would give as the hash key for Getopt::Long. See the Getopt::Long
manpage for details.
Getopt::Declare is yet another command-line argument parser, one which
is specifically designed to be powerful but exceptionally easy to use.
To parse the command-line in @ARGV, one simply creates a Getopt::Declare
object, by passing Getopt::Declare::new() a specification of the various
parameters that may be encountered.
The specification is a single string, in which the syntax of each
parameter is declared, along with a description and (optionally) one or
more actions to be performed when the parameter is encountered. The
specification string may also include other usage formatting information
(such as group headings or separators) as well as standard Perl comments
(which are ignored).
Getopt::Euclid uses your program's own documentation to create a
command-line argument parser. This ensures that your program's documented
interface and its actual interface always agree.
The intent of File::ShareDir is to provide a companion to
Class::Inspector and File::HomeDir, modules that take a process that is
well-known by advanced Perl developers but gets a little tricky, and
make it more available to the larger Perl community.
Quite often you want or need your Perl module (CPAN or otherwise) to
have access to a large amount of read-only data that is stored on the
file-system at run-time.
On a Linux-like system, this would be in a place such as /usr/share,
however Perl runs on a wide variety of different systems, and so the use
of any one location is unreliable.
Perl provides a little-known method for doing this, but almost nobody is
aware that it exists. As a result, module authors often go through some
very strange ways to make the data available to their code.
Perl filehandles are streams, but sometimes they just aren't powerful
enough. This module offers to have streams from filehandles searched with
regexes and allows the global input record separator variable to contain
regexes.
Thus, readline() and the <> operator can now return records delimited by
regular expression matches.
File::Tempdir is a Perl5 module which provides an object interface to
tempdir() from File::Temp. This allow to destroy the temporary directory
as soon you don't need it anymore using the magic DESTROY() function
automatically call be perl when the object is no longer reference.
File::Touch - update access and modification timestamps, creating nonexistent
files where necessary.