Modern Perl programs use several modules to enable additional features of Perl
and of the CPAN.
This module provides the capability to parse a string at runtime as
Perl source code, so that the resulting compiled code can be later
executed. This is part of the job of the string form of the eval
operator, but in this module it is separated out from the other jobs
of eval. Parsing of Perl code is generally influenced by its lexical
context, and this module provides some explicit control over this
process, by reifying lexical environments as Perl objects.
Perl6::Subs is a source filter that adds a very useful subset of Perl
6 subroutine syntax to Perl 5. Given a subroutine defined with a Perl
6 prototype, the code generated by Perl6::Subs will, at runtime,
declare the formal parameters, assign them their values, and validate
their contents according to both built-in and user-given rules.
This module is an implementation of the "Promise/A+" pattern for
asynchronous programming. Promises are meant to be a way to
better deal with the resulting callback spaghetti that can often
result in asynchronous programs.
The Quantum::Superpositions module adds two new operators to Perl: any and
all.
Each of these operators takes a list of values (states) and superimposes
them into a single scalar value (a superposition), which can then be
stored in a standard scalar variable.
The any and all operators produce two distinct kinds of superposition. The
any operator produces a disjunctive superposition, which may (notionally)
be in any one of its states at any time, according to the needs of the
algorithm that uses it.
In contrast, the all operator creates a conjunctive superposition, which
is always in every one of its states simultaneously.
Superpositions are scalar values and hence can participate in arithmetic
and logical operations just like any other type of scalar. However, when
an operation is applied to a superposition, it is applied (notionally) in
parallel to each of the states in that superposition.
Switch.pm provides the syntax and semantics for an explicit case
mechanism for Perl. The syntax is minimal, introducing only the
keywords switch and case and conforming to the general pattern of
existing Perl control structures. The semantics are particularly
rich, allowing any one (or more) of nearly 30 forms of matching to
be used when comparing a switch value with its various cases.
-Anton
<tobez@FreeBSD.org>
The Tcl extension module gives access to the Tcl library with functionality and
interface similar to the C functions of Tcl. In other words, you can:
- Create Tcl interpreters
The Tcl interpreters so created are Perl objects whose destructors delete the
interpreters cleanly when appropriate.
- Execute Tcl code in an interpreter
The code can come from strings, files or Perl filehandles.
- Bind in new Tcl procedures
The new procedures can be either C code (with addresses presumably obtained
using dl_open and dl_find_symbol) or Perl subroutines (by name, reference or
as anonymous subs). The (optional) deleteProc callback in the latter case is
another perl subroutine which is called when the command is explicitly
deleted by name or else when the destructor for the interpreter object is
explicitly or implicitly called.
- Manipulate the result field of a Tcl interpreter
- Set and get values of variables in a Tcl interpreter
- Tie perl variables to variables in a Tcl interpreter
The variables can be either scalars or hashes.
Github repository is at https://github.com/gisle/tcl.pm
This library's module, Test::XPath, provides an interface for testing the
content and structure of XML and HTML documents using XPath query expressions.
This will be most useful for those who need to write TAP-emitting unit tests
for HTML or XML output.
This module provides bare bones try/catch statements that are designed
to minimize common mistakes done with eval blocks (for instance assuming
that $@ is set to a true value on error, or clobbering previous values
of $@, and NOTHING else.
____ _
___| _ \ ___ _ __| |
/ _ \ |_) / _ \ '__| |
| __/ __/ __/ | | |
\___|_| \___|_| |_|
ePerl -- Embedded Perl 5 Language
ePerl interprets an ASCII file bristled with Perl 5 program statements by
evaluating the Perl 5 code while passing through the plain ASCII data. It
can operate in various ways: As a stand-alone Unix filter or integrated Perl
5 module for general file generation tasks and as a powerful Webserver
scripting language for dynamic HTML page programming.