"Perl Programmers Reference Guide (англ.) (программ.) /19.12.1998/ " - читать интересную книгу автора


PERL(1) Perl Programmers Reference Guide PERL(1)


+o Lexical scoping
Perl variables may now be declared within a lexical
scope, like "auto" variables in C. Not only is this
more efficient, but it contributes to better privacy
for "programming in the large". Anonymous
subroutines exhibit deep binding of lexical variables
(closures).

+o Arbitrarily nested data structures
Any scalar value, including any array element, may
now contain a reference to any other variable or
subroutine. You can easily create anonymous
variables and subroutines. Perl manages your
reference counts for you.

+o Modularity and reusability
The Perl library is now defined in terms of modules
which can be easily shared among various packages. A
package may choose to import all or a portion of a
module's published interface. Pragmas (that is,
compiler directives) are defined and used by the same
mechanism.

+o Object-oriented programming
A package can function as a class. Dynamic multiple
inheritance and virtual methods are supported in a
straightforward manner and with very little new
syntax. Filehandles may now be treated as objects.

+o Embeddable and Extensible
Perl may now be embedded easily in your C or C++
application, and can either call or be called by your
routines through a documented interface. The XS
preprocessor is provided to make it easy to glue your
C or C++ routines into Perl. Dynamic loading of
modules is supported, and Perl itself can be made
into a dynamic library.

+o POSIX compliant
A major new module is the POSIX module, which
provides access to all available POSIX routines and
definitions, via object classes where appropriate.

+o Package constructors and destructors
The new BEGIN and END blocks provide means to capture
control as a package is being compiled, and after the