Commit 888a27e1 authored by Niko Tyni's avatar Niko Tyni

Imported Upstream version 5.6.1

parents

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

This diff is collapsed.
The "Artistic License"
Preamble
The intent of this document is to state the conditions under which a
Package may be copied, such that the Copyright Holder maintains some
semblance of artistic control over the development of the package,
while giving the users of the package the right to use and distribute
the Package in a more-or-less customary fashion, plus the right to make
reasonable modifications.
Definitions:
"Package" refers to the collection of files distributed by the
Copyright Holder, and derivatives of that collection of files
created through textual modification.
"Standard Version" refers to such a Package if it has not been
modified, or has been modified in accordance with the wishes
of the Copyright Holder as specified below.
"Copyright Holder" is whoever is named in the copyright or
copyrights for the package.
"You" is you, if you're thinking about copying or distributing
this Package.
"Reasonable copying fee" is whatever you can justify on the
basis of media cost, duplication charges, time of people involved,
and so on. (You will not be required to justify it to the
Copyright Holder, but only to the computing community at large
as a market that must bear the fee.)
"Freely Available" means that no fee is charged for the item
itself, though there may be fees involved in handling the item.
It also means that recipients of the item may redistribute it
under the same conditions they received it.
1. You may make and give away verbatim copies of the source form of the
Standard Version of this Package without restriction, provided that you
duplicate all of the original copyright notices and associated disclaimers.
2. You may apply bug fixes, portability fixes and other modifications
derived from the Public Domain or from the Copyright Holder. A Package
modified in such a way shall still be considered the Standard Version.
3. You may otherwise modify your copy of this Package in any way, provided
that you insert a prominent notice in each changed file stating how and
when you changed that file, and provided that you do at least ONE of the
following:
a) place your modifications in the Public Domain or otherwise make them
Freely Available, such as by posting said modifications to Usenet or
an equivalent medium, or placing the modifications on a major archive
site such as uunet.uu.net, or by allowing the Copyright Holder to include
your modifications in the Standard Version of the Package.
b) use the modified Package only within your corporation or organization.
c) rename any non-standard executables so the names do not conflict
with standard executables, which must also be provided, and provide
a separate manual page for each non-standard executable that clearly
documents how it differs from the Standard Version.
d) make other distribution arrangements with the Copyright Holder.
4. You may distribute the programs of this Package in object code or
executable form, provided that you do at least ONE of the following:
a) distribute a Standard Version of the executables and library files,
together with instructions (in the manual page or equivalent) on where
to get the Standard Version.
b) accompany the distribution with the machine-readable source of
the Package with your modifications.
c) give non-standard executables non-standard names, and clearly
document the differences in manual pages (or equivalent), together
with instructions on where to get the Standard Version.
d) make other distribution arrangements with the Copyright Holder.
5. You may charge a reasonable copying fee for any distribution of this
Package. You may charge any fee you choose for support of this
Package. You may not charge a fee for this Package itself. However,
you may distribute this Package in aggregate with other (possibly
commercial) programs as part of a larger (possibly commercial) software
distribution provided that you do not advertise this Package as a
product of your own. You may embed this Package's interpreter within
an executable of yours (by linking); this shall be construed as a mere
form of aggregation, provided that the complete Standard Version of the
interpreter is so embedded.
6. The scripts and library files supplied as input to or produced as
output from the programs of this Package do not automatically fall
under the copyright of this Package, but belong to whoever generated
them, and may be sold commercially, and may be aggregated with this
Package. If such scripts or library files are aggregated with this
Package via the so-called "undump" or "unexec" methods of producing a
binary executable image, then distribution of such an image shall
neither be construed as a distribution of this Package nor shall it
fall under the restrictions of Paragraphs 3 and 4, provided that you do
not represent such an executable image as a Standard Version of this
Package.
7. C subroutines (or comparably compiled subroutines in other
languages) supplied by you and linked into this Package in order to
emulate subroutines and variables of the language defined by this
Package shall not be considered part of this Package, but are the
equivalent of input as in Paragraph 6, provided these subroutines do
not change the language in any way that would cause it to fail the
regression tests for the language.
8. Aggregation of this Package with a commercial distribution is always
permitted provided that the use of this Package is embedded; that is,
when no overt attempt is made to make this Package's interfaces visible
to the end user of the commercial distribution. Such use shall not be
construed as a distribution of this Package.
9. The name of the Copyright Holder may not be used to endorse or promote
products derived from this software without specific prior written permission.
10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
The End
This diff is collapsed.
-------------
Version 5.000
-------------
New things
----------
The -w switch is much more informative.
References. See t/op/ref.t for examples. All entities in Perl 5 are
reference counted so that it knows when each item should be destroyed.
Objects. See t/op/ref.t for examples.
=> is now a synonym for comma. This is useful as documentation for
arguments that come in pairs, such as initializers for associative arrays,
or named arguments to a subroutine.
All functions have been turned into list operators or unary operators,
meaning the parens are optional. Even subroutines may be called as
list operators if they've already been declared.
More embeddible. See main.c and embed_h.sh. Multiple interpreters
in the same process are supported (though not with interleaved
execution yet).
The interpreter is now flattened out. Compare Perl 4's eval.c with
the perl 5's pp.c. Compare Perl 4's 900 line interpreter loop in cmd.c
with Perl 5's 1 line interpreter loop in run.c. Eventually we'll make
everything non-blocking so we can interface nicely with a scheduler.
eval is now treated more like a subroutine call. Among other things,
this means you can return from it.
Format value lists may be spread over multiple lines by enclosing in
a do {} block.
You may now define BEGIN and END subroutines for each package. The BEGIN
subroutine executes the moment it's parsed. The END subroutine executes
just before exiting.
Flags on the #! line are interpreted even if the script wasn't
executed directly. (And even if the script was located by "perl -x"!)
The ?: operator is now legal as an lvalue.
List context now propagates to the right side of && and ||, as well
as the 2nd and 3rd arguments to ?:.
The "defined" function can now take a general expression.
Lexical scoping available via "my". eval can see the current lexical
variables.
The preferred package delimiter is now :: rather than '.
tie/untie are now preferred to dbmopen/dbmclose. Multiple DBM
implementations are allowed in the same executable, so you can
write scripts to interchange data among different formats.
New "and" and "or" operators work just like && and || but with
a precedence lower than comma, so they work better with list operators.
New functions include: abs(), chr(), uc(), ucfirst(), lc(), lcfirst(),
chomp(), glob()
require with a number checks to see that the version of Perl that is
currently running is at least that number.
Dynamic loading of external modules is now supported.
There is a new quote form qw//, which is equivalent to split(' ', q//).
Assignment of a reference to a glob value now just replaces the
single element of the glob corresponding to the reference type:
*foo = \$bar, *foo = \&bletch;
Filehandle methods are now supported:
output_autoflush STDOUT 1;
There is now an "English" module that provides human readable translations
for cryptic variable names.
Autoload stubs can now call the replacement subroutine with goto &realsub.
Subroutines can be defined lazily in any package by declaring an AUTOLOAD
routine, which will be called if a non-existent subroutine is called in
that package.
Several previously added features have been subsumed under the new
keywords "use" and "no". Saying "use Module LIST" is short for
BEGIN { require Module; import Module LIST; }
The "no" keyword is identical except that it calls "unimport" instead.
The earlier pragma mechanism now uses this mechanism, and two new
modules have been added to the library to implement "use integer"
and variations of "use strict vars, refs, subs".
Variables may now be interpolated literally into a pattern by prefixing
them with \Q, which works just like \U, but backwhacks non-alphanumerics
instead. There is also a corresponding quotemeta function.
Any quantifier in a regular expression may now be followed by a ? to
indicate that the pattern is supposed to match as little as possible.
Pattern matches may now be followed by an m or s modifier to explicitly
request multiline or singleline semantics. An s modifier makes . match
newline.
Patterns may now contain \A to match only at the beginning of the string,
and \Z to match only at the end. These differ from ^ and $ in that
they ignore multiline semantics. In addition, \G matches where the
last interation of m//g or s///g left off.
Non-backreference-producing parens of various sorts may now be
indicated by placing a ? directly after the opening parenthesis,
followed by a character that indicates the purpose of the parens.
An :, for instance, indicates simple grouping. (?:a|b|c) will
match any of a, b or c without producing a backreference. It does
"eat" the input. There are also assertions which do not eat the
input but do lookahead for you. (?=stuff) indicates that the next
thing must be "stuff". (?!nonsense) indicates that the next thing
must not be "nonsense".
The negation operator now treats non-numeric strings specially.
A -"text" is turned into "-text", so that -bareword is the same
as "-bareword". If the string already begins with a + or -, it
is flipped to the other sign.
Incompatibilities
-----------------
@ now always interpolates an array in double-quotish strings. Some programs
may now need to use backslash to protect any @ that shouldn't interpolate.
Ordinary variables starting with underscore are no longer forced into
package main.
s'$lhs'$rhs' now does no interpolation on either side. It used to
interplolate $lhs but not $rhs.
The second and third arguments of splice are now evaluated in scalar
context (like the book says) rather than list context.
Saying "shift @foo + 20" is now a semantic error because of precedence.
"open FOO || die" is now incorrect. You need parens around the filehandle.
The elements of argument lists for formats are now evaluated in list
context. This means you can interpolate list values now.
You can't do a goto into a block that is optimized away. Darn.
It is no longer syntactically legal to use whitespace as the name
of a variable, or as a delimiter for any kind of quote construct.
Some error messages will be different.
The caller function now returns a false value in a scalar context if there
is no caller. This lets library files determine if they're being required.
m//g now attaches its state to the searched string rather than the
regular expression.
"reverse" is no longer allowed as the name of a sort subroutine.
taintperl is no longer a separate executable. There is now a -T
switch to turn on tainting when it isn't turned on automatically.
Symbols starting with _ are no longer forced into package main, except
for $_ itself (and @_, etc.).