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.
This module is a wrapper around Getopt::Long that extends the value of
the original Getopt::Long module to:
1) add a simple graphical user interface option screen if no arguments
are passed to the program.
2) provide an auto-help mechanism such that -h and --help are handled
automatically.
It's designed to make the creation of graphical shells trivial without the
programmer having to think about it much as well as providing automatic
good-looking usage output without the programmer needing to write usage()
functions.
This also can turn normal command line programs into web CGI scripts as
well (automatically). If the Getopt::GUI::Long program is installed as a
CGI script then it will automatically prompt the user for the same
variables.
File::ShareDir::PAR provides the same functionality as File::ShareDir but tries
hard to be compatible with PAR packaged applications.
The problem is, that the concept of having a distribution or module specific
share directory becomes a little hazy when you're loading everything from
a single file. PAR uses an @INC hook to intercept any attempt to load a module.
File::ShareDir uses the directory structure that is typically found in the
directories that are listed in @INC for storing the shared data. In a PAR
enviroment, this is not necessarily possible.
WARNING:
This module contains highly experimental code. If you want to load
modules from .par files using PAR and then access their shared directory
using File::ShareDir, you probably have no choice but to use it.
Module Getopt::Long implements an extended getopt function called
GetOptions(). This function implements the POSIX standard for command
line options, with GNU extensions, while still capable of handling the
traditional one-letter options.
In general, this means that command line options can have long names
instead of single letters, and are introduced with a double dash `--'.
Optionally, Getopt::Long can support the traditional bundling of
single-letter command line options.
File::ShareDir::PathClass is just a wrapper around File::ShareDir
functions, transforming their return value to Path::Class objects.
This allows for easier usage of the value.
Simple set-and-forget using of a '/share' directory in your projects
root.
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.
File::Slurp::Tree provides functions for slurping and emitting trees of files
and directories.
# an example of use in a test suite
use Test::More tests => 1;
use File::Slurp::Tree;
is_deeply( slurp_tree( "t/some_path" ), { foo => {}, bar => "sample\n" },
"some_path contains a directory called foo, and a file bar" );
The tree data structure is a hash of hashes. The keys of each hash are names of
directories or files. Directories have hash references as their value, files
have a scalar which holds the contents of the file.
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.