Initial Commit

This commit is contained in:
Riley Schneider
2025-12-03 16:38:10 +01:00
parent c5e26bf594
commit b732d8d4b5
17680 changed files with 5977495 additions and 2 deletions

View File

@@ -0,0 +1,443 @@
=head1 NAME
perl - The Perl 5 language interpreter
=head1 SYNOPSIS
B<perl> S<[ B<-sTtuUWX> ]>
S<[ B<-hv> ] [ B<-V>[:I<configvar>] ]>
S<[ B<-cw> ] [ B<-d>[B<t>][:I<debugger>] ] [ B<-D>[I<number/list>] ]>
S<[ B<-pna> ] [ B<-F>I<pattern> ] [ B<-l>[I<octal>] ] [ B<-0>[I<octal/hexadecimal>] ]>
S<[ B<-I>I<dir> ] [ B<-m>[B<->]I<module> ] [ B<-M>[B<->]I<'module...'> ] [ B<-f> ]>
S<[ B<-C [I<number/list>] >]>
S<[ B<-S> ]>
S<[ B<-x>[I<dir>] ]>
S<[ B<-i>[I<extension>] ]>
S<[ [B<-e>|B<-E>] I<'command'> ] [ B<--> ] [ I<programfile> ] [ I<argument> ]...>
For more information on these options, you can run C<perldoc perlrun>.
=head1 GETTING HELP
The F<perldoc> program gives you access to all the documentation that comes
with Perl. You can get more documentation, tutorials and community support
online at L<https://www.perl.org/>.
If you're new to Perl, you should start by running C<perldoc perlintro>,
which is a general intro for beginners and provides some background to help
you navigate the rest of Perl's extensive documentation. Run C<perldoc
perldoc> to learn more things you can do with F<perldoc>.
For ease of access, the Perl manual has been split up into several sections.
=begin buildtoc
# This section is parsed by Porting/pod_lib.pl for use by pod/buildtoc etc
flag =g perluniprops perlmodlib perlapi perlintern
flag =go perltoc
flag =ro perlcn perljp perlko perltw
flag = perlvms
path perlfaq.* cpan/perlfaq/lib/
path perlglossary cpan/perlfaq/lib/
path perlxs(?:tut|typemap)? dist/ExtUtils-ParseXS/lib/
path perldoc cpan/Pod-Perldoc/
aux h2ph h2xs perlbug pl2pm pod2html pod2man splain xsubpp
=end buildtoc
=head2 Overview
perl Perl overview (this section)
perlintro Perl introduction for beginners
perlrun Perl execution and options
perltoc Perl documentation table of contents
=head2 Tutorials
perlreftut Perl references short introduction
perldsc Perl data structures intro
perllol Perl data structures: arrays of arrays
perlrequick Perl regular expressions quick start
perlretut Perl regular expressions tutorial
perlootut Perl OO tutorial for beginners
perlperf Perl Performance and Optimization Techniques
perlstyle Perl style guide
perlcheat Perl cheat sheet
perltrap Perl traps for the unwary
perldebtut Perl debugging tutorial
perlfaq Perl frequently asked questions
perlfaq1 General Questions About Perl
perlfaq2 Obtaining and Learning about Perl
perlfaq3 Programming Tools
perlfaq4 Data Manipulation
perlfaq5 Files and Formats
perlfaq6 Regexes
perlfaq7 Perl Language Issues
perlfaq8 System Interaction
perlfaq9 Networking
=head2 Reference Manual
perlsyn Perl syntax
perldata Perl data structures
perlop Perl operators and precedence
perlsub Perl subroutines
perlfunc Perl built-in functions
perlopentut Perl open() tutorial
perlpacktut Perl pack() and unpack() tutorial
perlpod Perl plain old documentation
perlpodspec Perl plain old documentation format specification
perlpodstyle Perl POD style guide
perldiag Perl diagnostic messages
perldeprecation Perl deprecations
perllexwarn Perl warnings and their control
perldebug Perl debugging
perlvar Perl predefined variables
perlre Perl regular expressions, the rest of the story
perlrebackslash Perl regular expression backslash sequences
perlrecharclass Perl regular expression character classes
perlreref Perl regular expressions quick reference
perlref Perl references, the rest of the story
perlform Perl formats
perlobj Perl objects
perltie Perl objects hidden behind simple variables
perldbmfilter Perl DBM filters
perlipc Perl interprocess communication
perlfork Perl fork() information
perlnumber Perl number semantics
perlthrtut Perl threads tutorial
perlport Perl portability guide
perllocale Perl locale support
perluniintro Perl Unicode introduction
perlunicode Perl Unicode support
perlunicook Perl Unicode cookbook
perlunifaq Perl Unicode FAQ
perluniprops Index of Unicode properties in Perl
perlunitut Perl Unicode tutorial
perlebcdic Considerations for running Perl on EBCDIC platforms
perlsec Perl security
perlsecpolicy Perl security report handling policy
perlmod Perl modules: how they work
perlmodlib Perl modules: how to write and use
perlmodstyle Perl modules: how to write modules with style
perlmodinstall Perl modules: how to install from CPAN
perlnewmod Perl modules: preparing a new module for distribution
perlpragma Perl modules: writing a user pragma
perlutil utilities packaged with the Perl distribution
perlfilter Perl source filters
perldtrace Perl's support for DTrace
perlglossary Perl Glossary
=head2 Internals and C Language Interface
perlembed Perl ways to embed perl in your C or C++ application
perldebguts Perl debugging guts and tips
perlxstut Perl XS tutorial
perlxs Perl XS application programming interface
perlxstypemap Perl XS C/Perl type conversion tools
perlclib Internal replacements for standard C library functions
perlguts Perl internal functions for those doing extensions
perlcall Perl calling conventions from C
perlmroapi Perl method resolution plugin interface
perlreapi Perl regular expression plugin interface
perlreguts Perl regular expression engine internals
perlapi Perl API listing (autogenerated)
perlintern Perl internal functions (autogenerated)
perliol C API for Perl's implementation of IO in Layers
perlapio Perl internal IO abstraction interface
perlhack Perl hackers guide
perlsource Guide to the Perl source tree
perlinterp Overview of the Perl interpreter source and how it works
perlhacktut Walk through the creation of a simple C code patch
perlhacktips Tips for Perl core C code hacking
perlpolicy Perl development policies
perlgov Perl Rules of Governance
perlgit Using git with the Perl repository
=head2 Miscellaneous
perlbook Perl book information
perlcommunity Perl community information
perldoc Look up Perl documentation in Pod format
perlhist Perl history records
perldelta Perl changes since previous version
perl5320delta Perl changes in version 5.32.0
perl5303delta Perl changes in version 5.30.3
perl5302delta Perl changes in version 5.30.2
perl5301delta Perl changes in version 5.30.1
perl5300delta Perl changes in version 5.30.0
perl5283delta Perl changes in version 5.28.3
perl5282delta Perl changes in version 5.28.2
perl5281delta Perl changes in version 5.28.1
perl5280delta Perl changes in version 5.28.0
perl5263delta Perl changes in version 5.26.3
perl5262delta Perl changes in version 5.26.2
perl5261delta Perl changes in version 5.26.1
perl5260delta Perl changes in version 5.26.0
perl5244delta Perl changes in version 5.24.4
perl5243delta Perl changes in version 5.24.3
perl5242delta Perl changes in version 5.24.2
perl5241delta Perl changes in version 5.24.1
perl5240delta Perl changes in version 5.24.0
perl5224delta Perl changes in version 5.22.4
perl5223delta Perl changes in version 5.22.3
perl5222delta Perl changes in version 5.22.2
perl5221delta Perl changes in version 5.22.1
perl5220delta Perl changes in version 5.22.0
perl5203delta Perl changes in version 5.20.3
perl5202delta Perl changes in version 5.20.2
perl5201delta Perl changes in version 5.20.1
perl5200delta Perl changes in version 5.20.0
perl5184delta Perl changes in version 5.18.4
perl5182delta Perl changes in version 5.18.2
perl5181delta Perl changes in version 5.18.1
perl5180delta Perl changes in version 5.18.0
perl5163delta Perl changes in version 5.16.3
perl5162delta Perl changes in version 5.16.2
perl5161delta Perl changes in version 5.16.1
perl5160delta Perl changes in version 5.16.0
perl5144delta Perl changes in version 5.14.4
perl5143delta Perl changes in version 5.14.3
perl5142delta Perl changes in version 5.14.2
perl5141delta Perl changes in version 5.14.1
perl5140delta Perl changes in version 5.14.0
perl5125delta Perl changes in version 5.12.5
perl5124delta Perl changes in version 5.12.4
perl5123delta Perl changes in version 5.12.3
perl5122delta Perl changes in version 5.12.2
perl5121delta Perl changes in version 5.12.1
perl5120delta Perl changes in version 5.12.0
perl5101delta Perl changes in version 5.10.1
perl5100delta Perl changes in version 5.10.0
perl589delta Perl changes in version 5.8.9
perl588delta Perl changes in version 5.8.8
perl587delta Perl changes in version 5.8.7
perl586delta Perl changes in version 5.8.6
perl585delta Perl changes in version 5.8.5
perl584delta Perl changes in version 5.8.4
perl583delta Perl changes in version 5.8.3
perl582delta Perl changes in version 5.8.2
perl581delta Perl changes in version 5.8.1
perl58delta Perl changes in version 5.8.0
perl561delta Perl changes in version 5.6.1
perl56delta Perl changes in version 5.6
perl5005delta Perl changes in version 5.005
perl5004delta Perl changes in version 5.004
perlexperiment A listing of experimental features in Perl
perlartistic Perl Artistic License
perlgpl GNU General Public License
=head2 Language-Specific
=for buildtoc flag +r
perlcn Perl for Simplified Chinese (in EUC-CN)
perljp Perl for Japanese (in EUC-JP)
perlko Perl for Korean (in EUC-KR)
perltw Perl for Traditional Chinese (in Big5)
=head2 Platform-Specific
perlaix Perl notes for AIX
perlamiga Perl notes for AmigaOS
perlandroid Perl notes for Android
perlbs2000 Perl notes for POSIX-BC BS2000
perlcygwin Perl notes for Cygwin
perldos Perl notes for DOS
perlfreebsd Perl notes for FreeBSD
perlhaiku Perl notes for Haiku
perlhpux Perl notes for HP-UX
perlhurd Perl notes for Hurd
perlirix Perl notes for Irix
perllinux Perl notes for Linux
perlmacos Perl notes for Mac OS (Classic)
perlmacosx Perl notes for Mac OS X
perlnetware Perl notes for NetWare
perlopenbsd Perl notes for OpenBSD
perlos2 Perl notes for OS/2
perlos390 Perl notes for OS/390
perlos400 Perl notes for OS/400
perlplan9 Perl notes for Plan 9
perlqnx Perl notes for QNX
perlriscos Perl notes for RISC OS
perlsolaris Perl notes for Solaris
perlsymbian Perl notes for Symbian
perlsynology Perl notes for Synology
perltru64 Perl notes for Tru64
perlvms Perl notes for VMS
perlvos Perl notes for Stratus VOS
perlwin32 Perl notes for Windows
=for buildtoc flag -r
=head2 Stubs for Deleted Documents
perlboot
perlbot
perlrepository
perltodo
perltooc
perltoot
=for buildtoc __END__
On a Unix-like system, these documentation files will usually also be
available as manpages for use with the F<man> program.
Some documentation is not available as man pages, so if a
cross-reference is not found by man, try it with L<perldoc>. Perldoc can
also take you directly to documentation for functions (with the B<-f>
switch). See C<perldoc --help> (or C<perldoc perldoc> or C<man perldoc>)
for other helpful options L<perldoc> has to offer.
In general, if something strange has gone wrong with your program and you're
not sure where you should look for help, try making your code comply with
B<use strict> and B<use warnings>. These will often point out exactly
where the trouble is.
=head1 DESCRIPTION
Perl officially stands for Practical Extraction and Report Language,
except when it doesn't.
Perl was originally a language optimized for scanning arbitrary
text files, extracting information from those text files, and printing
reports based on that information. It quickly became a good language
for many system management tasks. Over the years, Perl has grown into
a general-purpose programming language. It's widely used for everything
from quick "one-liners" to full-scale application development.
The language is intended to be practical (easy to use, efficient,
complete) rather than beautiful (tiny, elegant, minimal). It combines
(in the author's opinion, anyway) some of the best features of B<sed>,
B<awk>, and B<sh>, making it familiar and easy to use for Unix users to
whip up quick solutions to annoying problems. Its general-purpose
programming facilities support procedural, functional, and
object-oriented programming paradigms, making Perl a comfortable
language for the long haul on major projects, whatever your bent.
Perl's roots in text processing haven't been forgotten over the years.
It still boasts some of the most powerful regular expressions to be
found anywhere, and its support for Unicode text is world-class. It
handles all kinds of structured text, too, through an extensive
collection of extensions. Those libraries, collected in the CPAN,
provide ready-made solutions to an astounding array of problems. When
they haven't set the standard themselves, they steal from the best
-- just like Perl itself.
=head1 AVAILABILITY
Perl is available for most operating systems, including virtually
all Unix-like platforms. See L<perlport/"Supported Platforms">
for a listing.
=head1 ENVIRONMENT
See L<perlrun/ENVIRONMENT>.
=head1 AUTHOR
Larry Wall <larry@wall.org>, with the help of oodles of other folks.
If your Perl success stories and testimonials may be of help to others
who wish to advocate the use of Perl in their applications,
or if you wish to simply express your gratitude to Larry and the
Perl developers, please write to perl-thanks@perl.org .
=head1 FILES
"@INC" locations of perl libraries
"@INC" above is a reference to the built-in variable of the same name;
see L<perlvar> for more information.
=head1 SEE ALSO
https://www.perl.org/ the Perl homepage
https://www.perl.com/ Perl articles
https://www.cpan.org/ the Comprehensive Perl Archive
https://www.pm.org/ the Perl Mongers
=head1 DIAGNOSTICS
Using the C<use strict> pragma ensures that all variables are properly
declared and prevents other misuses of legacy Perl features.
The C<use warnings> pragma produces some lovely diagnostics. One can
also use the B<-w> flag, but its use is normally discouraged, because
it gets applied to all executed Perl code, including that not under
your control.
See L<perldiag> for explanations of all Perl's diagnostics. The C<use
diagnostics> pragma automatically turns Perl's normally terse warnings
and errors into these longer forms.
Compilation errors will tell you the line number of the error, with an
indication of the next token or token type that was to be examined.
(In a script passed to Perl via B<-e> switches, each
B<-e> is counted as one line.)
Setuid scripts have additional constraints that can produce error
messages such as "Insecure dependency". See L<perlsec>.
Did we mention that you should definitely consider using the B<use warnings>
pragma?
=head1 BUGS
The behavior implied by the B<use warnings> pragma is not mandatory.
Perl is at the mercy of your machine's definitions of various
operations such as type casting, atof(), and floating-point
output with sprintf().
If your stdio requires a seek or eof between reads and writes on a
particular stream, so does Perl. (This doesn't apply to sysread()
and syswrite().)
While none of the built-in data types have any arbitrary size limits
(apart from memory size), there are still a few arbitrary limits: a
given variable name may not be longer than 251 characters. Line numbers
displayed by diagnostics are internally stored as short integers,
so they are limited to a maximum of 65535 (higher numbers usually being
affected by wraparound).
You may submit your bug reports (be sure to include full configuration
information as output by the myconfig program in the perl source
tree, or by C<perl -V>) to L<https://github.com/Perl/perl5/issues>.
Perl actually stands for Pathologically Eclectic Rubbish Lister, but
don't tell anyone I said that.
=head1 NOTES
The Perl motto is "There's more than one way to do it." Divining
how many more is left as an exercise to the reader.
The three principal virtues of a programmer are Laziness,
Impatience, and Hubris. See the Camel Book for why.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,993 @@
=head1 NAME
perl5005delta - what's new for perl5.005
=head1 DESCRIPTION
This document describes differences between the 5.004 release and this one.
=head1 About the new versioning system
Perl is now developed on two tracks: a maintenance track that makes
small, safe updates to released production versions with emphasis on
compatibility; and a development track that pursues more aggressive
evolution. Maintenance releases (which should be considered production
quality) have subversion numbers that run from C<1> to C<49>, and
development releases (which should be considered "alpha" quality) run
from C<50> to C<99>.
Perl 5.005 is the combined product of the new dual-track development
scheme.
=head1 Incompatible Changes
=head2 WARNING: This version is not binary compatible with Perl 5.004.
Starting with Perl 5.004_50 there were many deep and far-reaching changes
to the language internals. If you have dynamically loaded extensions
that you built under perl 5.003 or 5.004, you can continue to use them
with 5.004, but you will need to rebuild and reinstall those extensions
to use them 5.005. See F<INSTALL> for detailed instructions on how to
upgrade.
=head2 Default installation structure has changed
The new Configure defaults are designed to allow a smooth upgrade from
5.004 to 5.005, but you should read F<INSTALL> for a detailed
discussion of the changes in order to adapt them to your system.
=head2 Perl Source Compatibility
When none of the experimental features are enabled, there should be
very few user-visible Perl source compatibility issues.
If threads are enabled, then some caveats apply. C<@_> and C<$_> become
lexical variables. The effect of this should be largely transparent to
the user, but there are some boundary conditions under which user will
need to be aware of the issues. For example, C<local(@_)> results in
a "Can't localize lexical variable @_ ..." message. This may be enabled
in a future version.
Some new keywords have been introduced. These are generally expected to
have very little impact on compatibility. See L<New C<INIT> keyword>,
L<New C<lock> keyword>, and L<New C<qrE<sol>E<sol>> operator>.
Certain barewords are now reserved. Use of these will provoke a warning
if you have asked for them with the C<-w> switch.
See L<C<our> is now a reserved word>.
=head2 C Source Compatibility
There have been a large number of changes in the internals to support
the new features in this release.
=over 4
=item *
Core sources now require ANSI C compiler
An ANSI C compiler is now B<required> to build perl. See F<INSTALL>.
=item *
All Perl global variables must now be referenced with an explicit prefix
All Perl global variables that are visible for use by extensions now
have a C<PL_> prefix. New extensions should C<not> refer to perl globals
by their unqualified names. To preserve sanity, we provide limited
backward compatibility for globals that are being widely used like
C<sv_undef> and C<na> (which should now be written as C<PL_sv_undef>,
C<PL_na> etc.)
If you find that your XS extension does not compile anymore because a
perl global is not visible, try adding a C<PL_> prefix to the global
and rebuild.
It is strongly recommended that all functions in the Perl API that don't
begin with C<perl> be referenced with a C<Perl_> prefix. The bare function
names without the C<Perl_> prefix are supported with macros, but this
support may cease in a future release.
See L<perlapi>.
=item *
Enabling threads has source compatibility issues
Perl built with threading enabled requires extensions to use the new
C<dTHR> macro to initialize the handle to access per-thread data.
If you see a compiler error that talks about the variable C<thr> not
being declared (when building a module that has XS code), you need
to add C<dTHR;> at the beginning of the block that elicited the error.
The API function C<perl_get_sv("@",GV_ADD)> should be used instead of
directly accessing perl globals as C<GvSV(errgv)>. The API call is
backward compatible with existing perls and provides source compatibility
with threading is enabled.
See L</"C Source Compatibility"> for more information.
=back
=head2 Binary Compatibility
This version is NOT binary compatible with older versions. All extensions
will need to be recompiled. Further binaries built with threads enabled
are incompatible with binaries built without. This should largely be
transparent to the user, as all binary incompatible configurations have
their own unique architecture name, and extension binaries get installed at
unique locations. This allows coexistence of several configurations in
the same directory hierarchy. See F<INSTALL>.
=head2 Security fixes may affect compatibility
A few taint leaks and taint omissions have been corrected. This may lead
to "failure" of scripts that used to work with older versions. Compiling
with -DINCOMPLETE_TAINTS provides a perl with minimal amounts of changes
to the tainting behavior. But note that the resulting perl will have
known insecurities.
Oneliners with the C<-e> switch do not create temporary files anymore.
=head2 Relaxed new mandatory warnings introduced in 5.004
Many new warnings that were introduced in 5.004 have been made
optional. Some of these warnings are still present, but perl's new
features make them less often a problem. See L</New Diagnostics>.
=head2 Licensing
Perl has a new Social Contract for contributors. See F<Porting/Contract>.
The license included in much of the Perl documentation has changed.
Most of the Perl documentation was previously under the implicit GNU
General Public License or the Artistic License (at the user's choice).
Now much of the documentation unambiguously states the terms under which
it may be distributed. Those terms are in general much less restrictive
than the GNU GPL. See L<perl> and the individual perl manpages listed
therein.
=head1 Core Changes
=head2 Threads
WARNING: Threading is considered an B<experimental> feature. Details of the
implementation may change without notice. There are known limitations
and some bugs. These are expected to be fixed in future versions.
See F<README.threads>.
=head2 Compiler
WARNING: The Compiler and related tools are considered B<experimental>.
Features may change without notice, and there are known limitations
and bugs. Since the compiler is fully external to perl, the default
configuration will build and install it.
The Compiler produces three different types of transformations of a
perl program. The C backend generates C code that captures perl's state
just before execution begins. It eliminates the compile-time overheads
of the regular perl interpreter, but the run-time performance remains
comparatively the same. The CC backend generates optimized C code
equivalent to the code path at run-time. The CC backend has greater
potential for big optimizations, but only a few optimizations are
implemented currently. The Bytecode backend generates a platform
independent bytecode representation of the interpreter's state
just before execution. Thus, the Bytecode back end also eliminates
much of the compilation overhead of the interpreter.
The compiler comes with several valuable utilities.
C<B::Lint> is an experimental module to detect and warn about suspicious
code, especially the cases that the C<-w> switch does not detect.
C<B::Deparse> can be used to demystify perl code, and understand
how perl optimizes certain constructs.
C<B::Xref> generates cross reference reports of all definition and use
of variables, subroutines and formats in a program.
C<B::Showlex> show the lexical variables used by a subroutine or file
at a glance.
C<perlcc> is a simple frontend for compiling perl.
See C<ext/B/README>, L<B>, and the respective compiler modules.
=head2 Regular Expressions
Perl's regular expression engine has been seriously overhauled, and
many new constructs are supported. Several bugs have been fixed.
Here is an itemized summary:
=over 4
=item Many new and improved optimizations
Changes in the RE engine:
Unneeded nodes removed;
Substrings merged together;
New types of nodes to process (SUBEXPR)* and similar expressions
quickly, used if the SUBEXPR has no side effects and matches
strings of the same length;
Better optimizations by lookup for constant substrings;
Better search for constants substrings anchored by $ ;
Changes in Perl code using RE engine:
More optimizations to s/longer/short/;
study() was not working;
/blah/ may be optimized to an analogue of index() if $& $` $' not seen;
Unneeded copying of matched-against string removed;
Only matched part of the string is copying if $` $' were not seen;
=item Many bug fixes
Note that only the major bug fixes are listed here. See F<Changes> for others.
Backtracking might not restore start of $3.
No feedback if max count for * or + on "complex" subexpression
was reached, similarly (but at compile time) for {3,34567}
Primitive restrictions on max count introduced to decrease a
possibility of a segfault;
(ZERO-LENGTH)* could segfault;
(ZERO-LENGTH)* was prohibited;
Long REs were not allowed;
/RE/g could skip matches at the same position after a
zero-length match;
=item New regular expression constructs
The following new syntax elements are supported:
(?<=RE)
(?<!RE)
(?{ CODE })
(?i-x)
(?i:RE)
(?(COND)YES_RE|NO_RE)
(?>RE)
\z
=item New operator for precompiled regular expressions
See L<New C<qrE<sol>E<sol>> operator>.
=item Other improvements
Better debugging output (possibly with colors),
even from non-debugging Perl;
RE engine code now looks like C, not like assembler;
Behaviour of RE modifiable by `use re' directive;
Improved documentation;
Test suite significantly extended;
Syntax [:^upper:] etc., reserved inside character classes;
=item Incompatible changes
(?i) localized inside enclosing group;
$( is not interpolated into RE any more;
/RE/g may match at the same position (with non-zero length)
after a zero-length match (bug fix).
=back
See L<perlre> and L<perlop>.
=head2 Improved malloc()
See banner at the beginning of C<malloc.c> for details.
=head2 Quicksort is internally implemented
Perl now contains its own highly optimized qsort() routine. The new qsort()
is resistant to inconsistent comparison functions, so Perl's C<sort()> will
not provoke coredumps any more when given poorly written sort subroutines.
(Some C library C<qsort()>s that were being used before used to have this
problem.) In our testing, the new C<qsort()> required the minimal number
of pair-wise compares on average, among all known C<qsort()> implementations.
See C<perlfunc/sort>.
=head2 Reliable signals
Perl's signal handling is susceptible to random crashes, because signals
arrive asynchronously, and the Perl runtime is not reentrant at arbitrary
times.
However, one experimental implementation of reliable signals is available
when threads are enabled. See C<Thread::Signal>. Also see F<INSTALL> for
how to build a Perl capable of threads.
=head2 Reliable stack pointers
The internals now reallocate the perl stack only at predictable times.
In particular, magic calls never trigger reallocations of the stack,
because all reentrancy of the runtime is handled using a "stack of stacks".
This should improve reliability of cached stack pointers in the internals
and in XSUBs.
=head2 More generous treatment of carriage returns
Perl used to complain if it encountered literal carriage returns in
scripts. Now they are mostly treated like whitespace within program text.
Inside string literals and here documents, literal carriage returns are
ignored if they occur paired with linefeeds, or get interpreted as whitespace
if they stand alone. This behavior means that literal carriage returns
in files should be avoided. You can get the older, more compatible (but
less generous) behavior by defining the preprocessor symbol
C<PERL_STRICT_CR> when building perl. Of course, all this has nothing
whatever to do with how escapes like C<\r> are handled within strings.
Note that this doesn't somehow magically allow you to keep all text files
in DOS format. The generous treatment only applies to files that perl
itself parses. If your C compiler doesn't allow carriage returns in
files, you may still be unable to build modules that need a C compiler.
=head2 Memory leaks
C<substr>, C<pos> and C<vec> don't leak memory anymore when used in lvalue
context. Many small leaks that impacted applications that embed multiple
interpreters have been fixed.
=head2 Better support for multiple interpreters
The build-time option C<-DMULTIPLICITY> has had many of the details
reworked. Some previously global variables that should have been
per-interpreter now are. With care, this allows interpreters to call
each other. See the C<PerlInterp> extension on CPAN.
=head2 Behavior of local() on array and hash elements is now well-defined
See L<perlsub/"Temporary Values via local()">.
=head2 C<%!> is transparently tied to the L<Errno> module
See L<perlvar>, and L<Errno>.
=head2 Pseudo-hashes are supported
See L<perlref>.
=head2 C<EXPR foreach EXPR> is supported
See L<perlsyn>.
=head2 Keywords can be globally overridden
See L<perlsub>.
=head2 C<$^E> is meaningful on Win32
See L<perlvar>.
=head2 C<foreach (1..1000000)> optimized
C<foreach (1..1000000)> is now optimized into a counting loop. It does
not try to allocate a 1000000-size list anymore.
=head2 C<Foo::> can be used as implicitly quoted package name
Barewords caused unintuitive behavior when a subroutine with the same
name as a package happened to be defined. Thus, C<new Foo @args>,
use the result of the call to C<Foo()> instead of C<Foo> being treated
as a literal. The recommended way to write barewords in the indirect
object slot is C<new Foo:: @args>. Note that the method C<new()> is
called with a first argument of C<Foo>, not C<Foo::> when you do that.
=head2 C<exists $Foo::{Bar::}> tests existence of a package
It was impossible to test for the existence of a package without
actually creating it before. Now C<exists $Foo::{Bar::}> can be
used to test if the C<Foo::Bar> namespace has been created.
=head2 Better locale support
See L<perllocale>.
=head2 Experimental support for 64-bit platforms
Perl5 has always had 64-bit support on systems with 64-bit longs.
Starting with 5.005, the beginnings of experimental support for systems
with 32-bit long and 64-bit 'long long' integers has been added.
If you add -DUSE_LONG_LONG to your ccflags in config.sh (or manually
define it in perl.h) then perl will be built with 'long long' support.
There will be many compiler warnings, and the resultant perl may not
work on all systems. There are many other issues related to
third-party extensions and libraries. This option exists to allow
people to work on those issues.
=head2 prototype() returns useful results on builtins
See L<perlfunc/prototype>.
=head2 Extended support for exception handling
C<die()> now accepts a reference value, and C<$@> gets set to that
value in exception traps. This makes it possible to propagate
exception objects. This is an undocumented B<experimental> feature.
=head2 Re-blessing in DESTROY() supported for chaining DESTROY() methods
See L<perlobj/Destructors>.
=head2 All C<printf> format conversions are handled internally
See L<perlfunc/printf>.
=head2 New C<INIT> keyword
C<INIT> subs are like C<BEGIN> and C<END>, but they get run just before
the perl runtime begins execution. e.g., the Perl Compiler makes use of
C<INIT> blocks to initialize and resolve pointers to XSUBs.
=head2 New C<lock> keyword
The C<lock> keyword is the fundamental synchronization primitive
in threaded perl. When threads are not enabled, it is currently a noop.
To minimize impact on source compatibility this keyword is "weak", i.e., any
user-defined subroutine of the same name overrides it, unless a C<use Thread>
has been seen.
=head2 New C<qr//> operator
The C<qr//> operator, which is syntactically similar to the other quote-like
operators, is used to create precompiled regular expressions. This compiled
form can now be explicitly passed around in variables, and interpolated in
other regular expressions. See L<perlop>.
=head2 C<our> is now a reserved word
Calling a subroutine with the name C<our> will now provoke a warning when
using the C<-w> switch.
=head2 Tied arrays are now fully supported
See L<Tie::Array>.
=head2 Tied handles support is better
Several missing hooks have been added. There is also a new base class for
TIEARRAY implementations. See L<Tie::Array>.
=head2 4th argument to substr
substr() can now both return and replace in one operation. The optional
4th argument is the replacement string. See L<perlfunc/substr>.
=head2 Negative LENGTH argument to splice
splice() with a negative LENGTH argument now work similar to what the
LENGTH did for substr(). Previously a negative LENGTH was treated as
0. See L<perlfunc/splice>.
=head2 Magic lvalues are now more magical
When you say something like C<substr($x, 5) = "hi">, the scalar returned
by substr() is special, in that any modifications to it affect $x.
(This is called a 'magic lvalue' because an 'lvalue' is something on
the left side of an assignment.) Normally, this is exactly what you
would expect to happen, but Perl uses the same magic if you use substr(),
pos(), or vec() in a context where they might be modified, like taking
a reference with C<\> or as an argument to a sub that modifies C<@_>.
In previous versions, this 'magic' only went one way, but now changes
to the scalar the magic refers to ($x in the above example) affect the
magic lvalue too. For instance, this code now acts differently:
$x = "hello";
sub printit {
$x = "g'bye";
print $_[0], "\n";
}
printit(substr($x, 0, 5));
In previous versions, this would print "hello", but it now prints "g'bye".
=head2 <> now reads in records
If C<$/> is a reference to an integer, or a scalar that holds an integer,
<> will read in records instead of lines. For more info, see
L<perlvar/$E<sol>>.
=head1 Supported Platforms
Configure has many incremental improvements. Site-wide policy for building
perl can now be made persistent, via Policy.sh. Configure also records
the command-line arguments used in F<config.sh>.
=head2 New Platforms
BeOS is now supported. See F<README.beos>.
DOS is now supported under the DJGPP tools. See F<README.dos> (installed
as L<perldos> on some systems).
MiNT is now supported. See F<README.mint>.
MPE/iX is now supported. See README.mpeix.
MVS (aka OS390, aka Open Edition) is now supported. See F<README.os390>
(installed as L<perlos390> on some systems).
Stratus VOS is now supported. See F<README.vos>.
=head2 Changes in existing support
Win32 support has been vastly enhanced. Support for Perl Object, a C++
encapsulation of Perl. GCC and EGCS are now supported on Win32.
See F<README.win32>, aka L<perlwin32>.
VMS configuration system has been rewritten. See F<README.vms> (installed
as F<README_vms> on some systems).
The hints files for most Unix platforms have seen incremental improvements.
=head1 Modules and Pragmata
=head2 New Modules
=over 4
=item B
Perl compiler and tools. See L<B>.
=item Data::Dumper
A module to pretty print Perl data. See L<Data::Dumper>.
=item Dumpvalue
A module to dump perl values to the screen. See L<Dumpvalue>.
=item Errno
A module to look up errors more conveniently. See L<Errno>.
=item File::Spec
A portable API for file operations.
=item ExtUtils::Installed
Query and manage installed modules.
=item ExtUtils::Packlist
Manipulate .packlist files.
=item Fatal
Make functions/builtins succeed or die.
=item IPC::SysV
Constants and other support infrastructure for System V IPC operations
in perl.
=item Test
A framework for writing test suites.
=item Tie::Array
Base class for tied arrays.
=item Tie::Handle
Base class for tied handles.
=item Thread
Perl thread creation, manipulation, and support.
=item attrs
Set subroutine attributes.
=item fields
Compile-time class fields.
=item re
Various pragmata to control behavior of regular expressions.
=back
=head2 Changes in existing modules
=over 4
=item Benchmark
You can now run tests for I<x> seconds instead of guessing the right
number of tests to run.
Keeps better time.
=item Carp
Carp has a new function cluck(). cluck() warns, like carp(), but also adds
a stack backtrace to the error message, like confess().
=item CGI
CGI has been updated to version 2.42.
=item Fcntl
More Fcntl constants added: F_SETLK64, F_SETLKW64, O_LARGEFILE for
large (more than 4G) file access (the 64-bit support is not yet
working, though, so no need to get overly excited), Free/Net/OpenBSD
locking behaviour flags F_FLOCK, F_POSIX, Linux F_SHLCK, and
O_ACCMODE: the mask of O_RDONLY, O_WRONLY, and O_RDWR.
=item Math::Complex
The accessors methods Re, Im, arg, abs, rho, theta, methods can
($z->Re()) now also act as mutators ($z->Re(3)).
=item Math::Trig
A little bit of radial trigonometry (cylindrical and spherical) added,
for example the great circle distance.
=item POSIX
POSIX now has its own platform-specific hints files.
=item DB_File
DB_File supports version 2.x of Berkeley DB. See C<ext/DB_File/Changes>.
=item MakeMaker
MakeMaker now supports writing empty makefiles, provides a way to
specify that site umask() policy should be honored. There is also
better support for manipulation of .packlist files, and getting
information about installed modules.
Extensions that have both architecture-dependent and
architecture-independent files are now always installed completely in
the architecture-dependent locations. Previously, the shareable parts
were shared both across architectures and across perl versions and were
therefore liable to be overwritten with newer versions that might have
subtle incompatibilities.
=item CPAN
See L<perlmodinstall> and L<CPAN>.
=item Cwd
Cwd::cwd is faster on most platforms.
=back
=head1 Utility Changes
C<h2ph> and related utilities have been vastly overhauled.
C<perlcc>, a new experimental front end for the compiler is available.
The crude GNU C<configure> emulator is now called C<configure.gnu> to
avoid trampling on C<Configure> under case-insensitive filesystems.
C<perldoc> used to be rather slow. The slower features are now optional.
In particular, case-insensitive searches need the C<-i> switch, and
recursive searches need C<-r>. You can set these switches in the
C<PERLDOC> environment variable to get the old behavior.
=head1 Documentation Changes
Config.pm now has a glossary of variables.
F<Porting/patching.pod> has detailed instructions on how to create and
submit patches for perl.
L<perlport> specifies guidelines on how to write portably.
L<perlmodinstall> describes how to fetch and install modules from C<CPAN>
sites.
Some more Perl traps are documented now. See L<perltrap>.
L<perlopentut> gives a tutorial on using open().
L<perlreftut> gives a tutorial on references.
L<perlthrtut> gives a tutorial on threads.
=head1 New Diagnostics
=over 4
=item Ambiguous call resolved as CORE::%s(), qualify as such or use &
(W) A subroutine you have declared has the same name as a Perl keyword,
and you have used the name without qualification for calling one or the
other. Perl decided to call the builtin because the subroutine is
not imported.
To force interpretation as a subroutine call, either put an ampersand
before the subroutine name, or qualify the name with its package.
Alternatively, you can import the subroutine (or pretend that it's
imported with the C<use subs> pragma).
To silently interpret it as the Perl operator, use the C<CORE::> prefix
on the operator (e.g. C<CORE::log($x)>) or by declaring the subroutine
to be an object method (see L</attrs>).
=item Bad index while coercing array into hash
(F) The index looked up in the hash found as the 0'th element of a
pseudo-hash is not legal. Index values must be at 1 or greater.
See L<perlref>.
=item Bareword "%s" refers to nonexistent package
(W) You used a qualified bareword of the form C<Foo::>, but
the compiler saw no other uses of that namespace before that point.
Perhaps you need to predeclare a package?
=item Can't call method "%s" on an undefined value
(F) You used the syntax of a method call, but the slot filled by the
object reference or package name contains an undefined value.
Something like this will reproduce the error:
$BADREF = 42;
process $BADREF 1,2,3;
$BADREF->process(1,2,3);
=item Can't check filesystem of script "%s" for nosuid
(P) For some reason you can't check the filesystem of the script for nosuid.
=item Can't coerce array into hash
(F) You used an array where a hash was expected, but the array has no
information on how to map from keys to array indices. You can do that
only with arrays that have a hash reference at index 0.
=item Can't goto subroutine from an eval-string
(F) The "goto subroutine" call can't be used to jump out of an eval "string".
(You can use it to jump out of an eval {BLOCK}, but you probably don't want to.)
=item Can't localize pseudo-hash element
(F) You said something like C<< local $ar->{'key'} >>, where $ar is
a reference to a pseudo-hash. That hasn't been implemented yet, but
you can get a similar effect by localizing the corresponding array
element directly: C<< local $ar->[$ar->[0]{'key'}] >>.
=item Can't use %%! because Errno.pm is not available
(F) The first time the %! hash is used, perl automatically loads the
Errno.pm module. The Errno module is expected to tie the %! hash to
provide symbolic names for C<$!> errno values.
=item Cannot find an opnumber for "%s"
(F) A string of a form C<CORE::word> was given to prototype(), but
there is no builtin with the name C<word>.
=item Character class syntax [. .] is reserved for future extensions
(W) Within regular expression character classes ([]) the syntax beginning
with "[." and ending with ".]" is reserved for future extensions.
If you need to represent those character sequences inside a regular
expression character class, just quote the square brackets with the
backslash: "\[." and ".\]".
=item Character class syntax [: :] is reserved for future extensions
(W) Within regular expression character classes ([]) the syntax beginning
with "[:" and ending with ":]" is reserved for future extensions.
If you need to represent those character sequences inside a regular
expression character class, just quote the square brackets with the
backslash: "\[:" and ":\]".
=item Character class syntax [= =] is reserved for future extensions
(W) Within regular expression character classes ([]) the syntax
beginning with "[=" and ending with "=]" is reserved for future extensions.
If you need to represent those character sequences inside a regular
expression character class, just quote the square brackets with the
backslash: "\[=" and "=\]".
=item %s: Eval-group in insecure regular expression
(F) Perl detected tainted data when trying to compile a regular expression
that contains the C<(?{ ... })> zero-width assertion, which is unsafe.
See L<perlre/(?{ code })>, and L<perlsec>.
=item %s: Eval-group not allowed, use re 'eval'
(F) A regular expression contained the C<(?{ ... })> zero-width assertion,
but that construct is only allowed when the C<use re 'eval'> pragma is
in effect. See L<perlre/(?{ code })>.
=item %s: Eval-group not allowed at run time
(F) Perl tried to compile a regular expression containing the C<(?{ ... })>
zero-width assertion at run time, as it would when the pattern contains
interpolated values. Since that is a security risk, it is not allowed.
If you insist, you may still do this by explicitly building the pattern
from an interpolated string at run time and using that in an eval().
See L<perlre/(?{ code })>.
=item Explicit blessing to '' (assuming package main)
(W) You are blessing a reference to a zero length string. This has
the effect of blessing the reference into the package main. This is
usually not what you want. Consider providing a default target
package, e.g. bless($ref, $p || 'MyPackage');
=item Illegal hex digit ignored
(W) You may have tried to use a character other than 0 - 9 or A - F in a
hexadecimal number. Interpretation of the hexadecimal number stopped
before the illegal character.
=item No such array field
(F) You tried to access an array as a hash, but the field name used is
not defined. The hash at index 0 should map all valid field names to
array indices for that to work.
=item No such field "%s" in variable %s of type %s
(F) You tried to access a field of a typed variable where the type
does not know about the field name. The field names are looked up in
the %FIELDS hash in the type package at compile time. The %FIELDS hash
is usually set up with the 'fields' pragma.
=item Out of memory during ridiculously large request
(F) You can't allocate more than 2^31+"small amount" bytes. This error
is most likely to be caused by a typo in the Perl program. e.g., C<$arr[time]>
instead of C<$arr[$time]>.
=item Range iterator outside integer range
(F) One (or both) of the numeric arguments to the range operator ".."
are outside the range which can be represented by integers internally.
One possible workaround is to force Perl to use magical string
increment by prepending "0" to your numbers.
=item Recursive inheritance detected while looking for method '%s' %s
(F) More than 100 levels of inheritance were encountered while invoking a
method. Probably indicates an unintended loop in your inheritance hierarchy.
=item Reference found where even-sized list expected
(W) You gave a single reference where Perl was expecting a list with
an even number of elements (for assignment to a hash). This
usually means that you used the anon hash constructor when you meant
to use parens. In any case, a hash requires key/value B<pairs>.
%hash = { one => 1, two => 2, }; # WRONG
%hash = [ qw/ an anon array / ]; # WRONG
%hash = ( one => 1, two => 2, ); # right
%hash = qw( one 1 two 2 ); # also fine
=item Undefined value assigned to typeglob
(W) An undefined value was assigned to a typeglob, a la C<*foo = undef>.
This does nothing. It's possible that you really mean C<undef *foo>.
=item Use of reserved word "%s" is deprecated
(D) The indicated bareword is a reserved word. Future versions of perl
may use it as a keyword, so you're better off either explicitly quoting
the word in a manner appropriate for its context of use, or using a
different name altogether. The warning can be suppressed for subroutine
names by either adding a C<&> prefix, or using a package qualifier,
e.g. C<&our()>, or C<Foo::our()>.
=item perl: warning: Setting locale failed.
(S) The whole warning message will look something like:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LC_ALL = "En_US",
LANG = (unset)
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Exactly what were the failed locale settings varies. In the above the
settings were that the LC_ALL was "En_US" and the LANG had no value.
This error means that Perl detected that you and/or your system
administrator have set up the so-called variable system but Perl could
not use those settings. This was not dead serious, fortunately: there
is a "default locale" called "C" that Perl can and will use, the
script will be run. Before you really fix the problem, however, you
will get the same error message each time you run Perl. How to really
fix the problem can be found in L<perllocale/"LOCALE PROBLEMS">.
=back
=head1 Obsolete Diagnostics
=over 4
=item Can't mktemp()
(F) The mktemp() routine failed for some reason while trying to process
a B<-e> switch. Maybe your /tmp partition is full, or clobbered.
Removed because B<-e> doesn't use temporary files any more.
=item Can't write to temp file for B<-e>: %s
(F) The write routine failed for some reason while trying to process
a B<-e> switch. Maybe your /tmp partition is full, or clobbered.
Removed because B<-e> doesn't use temporary files any more.
=item Cannot open temporary file
(F) The create routine failed for some reason while trying to process
a B<-e> switch. Maybe your /tmp partition is full, or clobbered.
Removed because B<-e> doesn't use temporary files any more.
=item regexp too big
(F) The current implementation of regular expressions uses shorts as
address offsets within a string. Unfortunately this means that if
the regular expression compiles to longer than 32767, it'll blow up.
Usually when you want a regular expression this big, there is a better
way to do it with multiple statements. See L<perlre>.
=back
=head1 Configuration Changes
You can use "Configure -Uinstallusrbinperl" which causes installperl
to skip installing perl also as /usr/bin/perl. This is useful if you
prefer not to modify /usr/bin for some reason or another but harmful
because many scripts assume to find Perl in /usr/bin/perl.
=head1 BUGS
If you find what you think is a bug, you might check the headers of
recently posted articles in the comp.lang.perl.misc newsgroup.
There may also be information at http://www.perl.com/perl/ , the Perl
Home Page.
If you believe you have an unreported bug, please run the B<perlbug>
program included with your release. Make sure you trim your bug down
to a tiny but sufficient test case. Your bug report, along with the
output of C<perl -V>, will be sent off to <F<perlbug@perl.com>> to be
analysed by the Perl porting team.
=head1 SEE ALSO
The F<Changes> file for exhaustive details on what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=head1 HISTORY
Written by Gurusamy Sarathy <F<gsar@activestate.com>>, with many contributions
from The Perl Porters.
Send omissions or corrections to <F<perlbug@perl.com>>.
=cut

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,411 @@
=encoding utf8
=head1 NAME
perl5121delta - what is new for perl v5.12.1
=head1 DESCRIPTION
This document describes differences between the 5.12.0 release and
the 5.12.1 release.
If you are upgrading from an earlier release such as 5.10.1, first read
L<perl5120delta>, which describes differences between 5.10.1 and
5.12.0.
=head1 Incompatible Changes
There are no changes intentionally incompatible with 5.12.0. If any
incompatibilities with 5.12.0 exist, they are bugs. Please report them.
=head1 Core Enhancements
Other than the bug fixes listed below, there should be no user-visible
changes to the core language in this release.
=head1 Modules and Pragmata
=head2 Pragmata Changes
=over
=item *
We fixed exporting of C<is_strict> and C<is_lax> from L<version>.
These were being exported with a wrapper that treated them as method
calls, which caused them to fail. They are just functions, are
documented as such, and should never be subclassed, so this patch
just exports them directly as functions without the wrapper.
=back
=head2 Updated Modules
=over
=item *
We upgraded L<CGI.pm> to version 3.49 to incorporate fixes for regressions
introduced in the release we shipped with Perl 5.12.0.
=item *
We upgraded L<Pod::Simple> to version 3.14 to get an improvement to \C\<\< \>\>
parsing.
=item *
We made a small fix to the L<CPANPLUS> test suite to fix an occasional spurious test failure.
=item *
We upgraded L<Safe> to version 2.27 to wrap coderefs returned by C<reval()> and C<rdo()>.
=back
=head1 Changes to Existing Documentation
=over
=item *
We added the new maintenance release policy to L<perlpolicy.pod>
=item *
We've clarified the multiple-angle-bracket construct in the spec for POD
in L<perlpodspec>
=item *
We added a missing explanation for a warning about C<:=> to L<perldiag.pod>
=item *
We removed a false claim in L<perlunitut> that all text strings are Unicode strings in Perl.
=item *
We updated the GitHub mirror link in L<perlrepository> to mirrors/perl, not github/perl
=item *
We fixed a minor error in L<perl5114delta.pod>.
=item *
We replaced a mention of the now-obsolete L<Switch.pm> with F<given>/F<when>.
=item *
We improved documentation about F<$sitelibexp/sitecustomize.pl> in L<perlrun>.
=item *
We corrected L<perlmodlib.pod> which had unintentionally omitted a number of modules.
=item *
We updated the documentation for 'require' in L<perlfunc.pod> relating to putting Perl code in @INC.
=item *
We reinstated some erroneously-removed documentation about quotemeta in L<perlfunc>.
=item *
We fixed an F<a2p> example in L<perlutil.pod>.
=item *
We filled in a blank in L<perlport.pod> with the release date of Perl 5.12.
=item *
We fixed broken links in a number of perldelta files.
=item *
The documentation for L<Carp.pm> incorrectly stated that the $Carp::Verbose
variable makes cluck generate stack backtraces.
=item *
We fixed a number of typos in L<Pod::Functions>
=item *
We improved documentation of case-changing functions in L<perlfunc.pod>
=item *
We corrected L<perlgpl.pod> to contain the correct version of the GNU
General Public License.
=back
=head1 Testing
=head2 Testing Improvements
=over
=item *
F<t/op/sselect.t> is now less prone to clock jitter during timing checks
on Windows.
sleep() time on Win32 may be rounded down to multiple of
the clock tick interval.
=item *
F<lib/blib.t> and F<lib/locale.t>: Fixes for test failures on Darwin/PPC
=item *
F<perl5db.t>: Fix for test failures when C<Term::ReadLine::Gnu> is installed.
=back
=head1 Installation and Configuration Improvements
=head2 Configuration improvements
=over
=item *
We updated F<INSTALL> with notes about how to deal with broken F<dbm.h>
on OpenSUSE (and possibly other platforms)
=back
=head1 Bug Fixes
=over 4
=item *
A bug in how we process filetest operations could cause a segfault.
Filetests don't always expect an op on the stack, so we now use
TOPs only if we're sure that we're not stat'ing the _ filehandle.
This is indicated by OPf_KIDS (as checked in ck_ftst).
See also: L<http://rt.perl.org/rt3/Public/Bug/Display.html?id=74542>
=item *
When deparsing a nextstate op that has both a change of package (relative
to the previous nextstate) and a label, the package declaration is now
emitted first, because it is syntactically impermissible for a label to
prefix a package declaration.
=item *
XSUB.h now correctly redefines fgets under PERL_IMPLICIT_SYS
See also: L<http://rt.cpan.org/Public/Bug/Display.html?id=55049>
=item *
utf8::is_utf8 now respects GMAGIC (e.g. $1)
=item *
XS code using C<fputc()> or C<fputs()>: on Windows could cause an error
due to their arguments being swapped.
See also: L<http://rt.perl.org/rt3/Public/Bug/Display.html?id=72704>
=item *
We fixed a small bug in lex_stuff_pvn() that caused spurious syntax errors
in an obscure situation. It happened when stuffing was performed on the
last line of a file and the line ended with a statement that lacked a
terminating semicolon.
See also: L<http://rt.perl.org/rt3/Public/Bug/Display.html?id=74006>
=item *
We fixed a bug that could cause \N{} constructs followed by a single . to
be parsed incorrectly.
See also: L<http://rt.perl.org/rt3/Public/Bug/Display.html?id=74978>
=item *
We fixed a bug that caused when(scalar) without an argument not to be
treated as a syntax error.
See also: L<http://rt.perl.org/rt3/Public/Bug/Display.html?id=74114>
=item *
We fixed a regression in the handling of labels immediately before string
evals that was introduced in Perl 5.12.0.
See also: L<http://rt.perl.org/rt3/Public/Bug/Display.html?id=74290>
=item *
We fixed a regression in case-insensitive matching of folded characters
in regular expressions introduced in Perl 5.10.1.
See also: L<http://rt.perl.org/rt3/Public/Bug/Display.html?id=72998>
=back
=head1 Platform Specific Notes
=head2 HP-UX
=over
=item *
Perl now allows -Duse64bitint without promoting to use64bitall on HP-UX
=back
=head2 AIX
=over
=item *
Perl now builds on AIX 4.2
The changes required work around AIX 4.2s' lack of support for IPv6,
and limited support for POSIX C<sigaction()>.
=back
=head2 FreeBSD 7
=over
=item *
FreeBSD 7 no longer contains F</usr/bin/objformat>. At build time,
Perl now skips the F<objformat> check for versions 7 and higher and
assumes ELF.
=back
=head2 VMS
=over
=item *
It's now possible to build extensions on older (pre 7.3-2) VMS systems.
DCL symbol length was limited to 1K up until about seven years or
so ago, but there was no particularly deep reason to prevent those
older systems from configuring and building Perl.
=item *
We fixed the previously-broken C<-Uuseperlio> build on VMS.
We were checking a variable that doesn't exist in the non-default
case of disabling perlio. Now we only look at it when it exists.
=item *
We fixed the -Uuseperlio command-line option in configure.com.
Formerly it only worked if you went through all the questions
interactively and explicitly answered no.
=back
=head1 Known Problems
=over
=item *
C<List::Util::first> misbehaves in the presence of a lexical C<$_>
(typically introduced by C<my $_> or implicitly by C<given>). The variable
which gets set for each iteration is the package variable C<$_>, not the
lexical C<$_>.
A similar issue may occur in other modules that provide functions which
take a block as their first argument, like
foo { ... $_ ...} list
See also: L<http://rt.perl.org/rt3/Public/Bug/Display.html?id=67694>
=item *
C<Module::Load::Conditional> and C<version> have an unfortunate
interaction which can cause C<CPANPLUS> to crash when it encounters
an unparseable version string. Upgrading to C<CPANPLUS> 0.9004 or
C<Module::Load::Conditional> 0.38 from CPAN will resolve this issue.
=back
=head1 Acknowledgements
Perl 5.12.1 represents approximately four weeks of development since
Perl 5.12.0 and contains approximately 4,000 lines of changes
across 142 files from 28 authors.
Perl continues to flourish into its third decade thanks to a vibrant
community of users and developers. The following people are known to
have contributed the improvements that became Perl 5.12.1:
Ævar Arnfjörð Bjarmason, Chris Williams, chromatic, Craig A. Berry,
David Golden, Father Chrysostomos, Florian Ragwitz, Frank Wiegand,
Gene Sullivan, Goro Fuji, H.Merijn Brand, James E Keenan, Jan Dubois,
Jesse Vincent, Josh ben Jore, Karl Williamson, Leon Brocard, Michael
Schwern, Nga Tang Chan, Nicholas Clark, Niko Tyni, Philippe Bruhat,
Rafael Garcia-Suarez, Ricardo Signes, Steffen Mueller, Todd Rinaldo,
Vincent Pit and Zefram.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles
recently posted to the comp.lang.perl.misc newsgroup and the perl
bug database at http://rt.perl.org/perlbug/ . There may also be
information at http://www.perl.org/ , the Perl Home Page.
If you believe you have an unreported bug, please run the B<perlbug>
program included with your release. Be sure to trim your bug down
to a tiny but sufficient test case. Your bug report, along with the
output of C<perl -V>, will be sent off to perlbug@perl.org to be
analysed by the Perl porting team.
If the bug you are reporting has security implications, which make it
inappropriate to send to a publicly archived mailing list, then please send
it to perl5-security-report@perl.org. This points to a closed subscription
unarchived mailing list, which includes
all the core committers, who will be able
to help assess the impact of issues, figure out a resolution, and help
co-ordinate the release of patches to mitigate or fix the problem across all
platforms on which Perl is supported. Please only use this address for
security issues in the Perl core, not for modules independently
distributed on CPAN.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details
on what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,347 @@
=encoding utf8
=head1 NAME
perl5122delta - what is new for perl v5.12.2
=head1 DESCRIPTION
This document describes differences between the 5.12.1 release and
the 5.12.2 release.
If you are upgrading from an earlier major version, such as 5.10.1,
first read L<perl5120delta>, which describes differences between 5.10.1
and 5.12.0, as well as L<perl5121delta>, which describes earlier changes
in the 5.12 stable release series.
=head1 Incompatible Changes
There are no changes intentionally incompatible with 5.12.1. If any exist, they
are bugs and reports are welcome.
=head1 Core Enhancements
Other than the bug fixes listed below, there should be no user-visible
changes to the core language in this release.
=head1 Modules and Pragmata
=head2 New Modules and Pragmata
This release does not introduce any new modules or pragmata.
=head2 Pragmata Changes
In the previous release, C<no I<VERSION>;> statements triggered a bug
which could cause L<feature> bundles to be loaded and L<strict> mode to
be enabled unintentionally.
=head2 Updated Modules
=over 4
=item C<Carp>
Upgraded from version 1.16 to 1.17.
L<Carp> now detects incomplete L<caller()|perlfunc/"caller EXPR">
overrides and avoids using bogus C<@DB::args>. To provide backtraces, Carp
relies on particular behaviour of the caller built-in. Carp now detects
if other code has overridden this with an incomplete implementation, and
modifies its backtrace accordingly. Previously incomplete overrides would
cause incorrect values in backtraces (best case), or obscure fatal errors
(worst case)
This fixes certain cases of C<Bizarre copy of ARRAY> caused by modules
overriding C<caller()> incorrectly.
=item C<CPANPLUS>
A patch to F<cpanp-run-perl> has been backported from CPANPLUS C<0.9004>. This
resolves L<RT #55964|http://rt.cpan.org/Public/Bug/Display.html?id=55964>
and L<RT #57106|http://rt.cpan.org/Public/Bug/Display.html?id=57106>, both
of which related to failures to install distributions that use
C<Module::Install::DSL>.
=item C<File::Glob>
A regression which caused a failure to find C<CORE::GLOBAL::glob> after
loading C<File::Glob> to crash has been fixed. Now, it correctly falls back
to external globbing via C<pp_glob>.
=item C<File::Copy>
C<File::Copy::copy(FILE, DIR)> is now documented.
=item C<File::Spec>
Upgraded from version 3.31 to 3.31_01.
Several portability fixes were made in C<File::Spec::VMS>: a colon is now
recognized as a delimiter in native filespecs; caret-escaped delimiters are
recognized for better handling of extended filespecs; C<catpath()> returns
an empty directory rather than the current directory if the input directory
name is empty; C<abs2rel()> properly handles Unix-style input.
=back
=head1 Utility Changes
=over
=item *
F<perlbug> now always gives the reporter a chance to change the email address it
guesses for them.
=item *
F<perlbug> should no longer warn about uninitialized values when using the C<-d>
and C<-v> options.
=back
=head1 Changes to Existing Documentation
=over
=item *
The existing policy on backward-compatibility and deprecation has
been added to L<perlpolicy>, along with definitions of terms like
I<deprecation>.
=item *
L<perlfunc/srand>'s usage has been clarified.
=item *
The entry for L<perlfunc/die> was reorganized to emphasize its
role in the exception mechanism.
=item *
Perl's L<INSTALL> file has been clarified to explicitly state that Perl
requires a C89 compliant ANSI C Compiler.
=item *
L<IO::Socket>'s C<getsockopt()> and C<setsockopt()> have been documented.
=item *
F<alarm()>'s inability to interrupt blocking IO on Windows has been documented.
=item *
L<Math::TrulyRandom> hasn't been updated since 1996 and has been removed
as a recommended solution for random number generation.
=item *
L<perlrun> has been updated to clarify the behaviour of octal flags to F<perl>.
=item *
To ease user confusion, C<$#> and C<$*>, two special variables that were
removed in earlier versions of Perl have been documented.
=item *
The version of L<perlfaq> shipped with the Perl core has been updated from the
official FAQ version, which is now maintained in the C<briandfoy/perlfaq>
branch of the Perl repository at L<git://perl5.git.perl.org/perl.git>.
=back
=head1 Installation and Configuration Improvements
=head2 Configuration improvements
=over
=item *
The C<d_u32align> configuration probe on ARM has been fixed.
=back
=head2 Compilation improvements
=over
=item *
An "C<incompatible operand types>" error in ternary expressions when building
with C<clang> has been fixed.
=item *
Perl now skips setuid C<File::Copy> tests on partitions it detects to be mounted
as C<nosuid>.
=back
=head1 Selected Bug Fixes
=over 4
=item *
A possible segfault in the C<T_PRTOBJ> default typemap has been fixed.
=item *
A possible memory leak when using L<caller()|perlfunc/"caller EXPR"> to set
C<@DB::args> has been fixed.
=item *
Several memory leaks when loading XS modules were fixed.
=item *
C<unpack()> now handles scalar context correctly for C<%32H> and C<%32u>,
fixing a potential crash. C<split()> would crash because the third item
on the stack wasn't the regular expression it expected. C<unpack("%2H",
...)> would return both the unpacked result and the checksum on the stack,
as would C<unpack("%2u", ...)>.
L<[perl #73814]|http://rt.perl.org/rt3/Ticket/Display.html?id=73814>
=item *
Perl now avoids using memory after calling C<free()> in F<pp_require>
when there are CODEREFs in C<@INC>.
=item *
A bug that could cause "C<Unknown error>" messages when
"C<call_sv(code, G_EVAL)>" is called from an XS destructor has been fixed.
=item *
The implementation of the C<open $fh, 'E<gt>' \$buffer> feature
now supports get/set magic and thus tied buffers correctly.
=item *
The C<pp_getc>, C<pp_tell>, and C<pp_eof> opcodes now make room on the
stack for their return values in cases where no argument was passed in.
=item *
When matching unicode strings under some conditions inappropriate backtracking would
result in a C<Malformed UTF-8 character (fatal)> error. This should no longer occur.
See L<[perl #75680]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75680>
=back
=head1 Platform Specific Notes
=head2 AIX
=over
=item *
F<README.aix> has been updated with information about the XL C/C++ V11 compiler
suite.
=back
=head2 Windows
=over
=item *
When building Perl with the mingw64 x64 cross-compiler C<incpath>,
C<libpth>, C<ldflags>, C<lddlflags> and C<ldflags_nolargefiles> values
in F<Config.pm> and F<Config_heavy.pl> were not previously being set
correctly because, with that compiler, the include and lib directories
are not immediately below C<$(CCHOME)>.
=back
=head2 VMS
=over
=item *
F<git_version.h> is now installed on VMS. This was an oversight in v5.12.0 which
caused some extensions to fail to build.
=item *
Several memory leaks in L<stat()|perlfunc/"stat FILEHANDLE"> have been fixed.
=item *
A memory leak in C<Perl_rename()> due to a double allocation has been
fixed.
=item *
A memory leak in C<vms_fid_to_name()> (used by C<realpath()> and
C<realname()>) has been fixed.
=back
=head1 Acknowledgements
Perl 5.12.2 represents approximately three months of development since
Perl 5.12.1 and contains approximately 2,000 lines of changes across
100 files from 36 authors.
Perl continues to flourish into its third decade thanks to a vibrant
community of users and developers. The following people are known to
have contributed the improvements that became Perl 5.12.2:
Abigail, Ævar Arnfjörð Bjarmason, Ben Morrow, brian d foy, Brian
Phillips, Chas. Owens, Chris 'BinGOs' Williams, Chris Williams,
Craig A. Berry, Curtis Jewell, Dan Dascalescu, David Golden, David
Mitchell, Father Chrysostomos, Florian Ragwitz, George Greer, H.Merijn
Brand, Jan Dubois, Jesse Vincent, Jim Cromie, Karl Williamson, Lars
Dɪ 迪拉斯, Leon Brocard, Maik Hentsche, Matt S Trout,
Nicholas Clark, Rafael Garcia-Suarez, Rainer Tammer, Ricardo Signes,
Salvador Ortiz Garcia, Sisyphus, Slaven Rezic, Steffen Mueller, Tony Cook,
Vincent Pit and Yves Orton.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles
recently posted to the comp.lang.perl.misc newsgroup and the perl
bug database at http://rt.perl.org/perlbug/ . There may also be
information at http://www.perl.org/ , the Perl Home Page.
If you believe you have an unreported bug, please run the B<perlbug>
program included with your release. Be sure to trim your bug down
to a tiny but sufficient test case. Your bug report, along with the
output of C<perl -V>, will be sent off to perlbug@perl.org to be
analysed by the Perl porting team.
If the bug you are reporting has security implications, which make it
inappropriate to send to a publicly archived mailing list, then please send
it to perl5-security-report@perl.org. This points to a closed subscription
unarchived mailing list, which includes
all the core committers, who will be able
to help assess the impact of issues, figure out a resolution, and help
co-ordinate the release of patches to mitigate or fix the problem across all
platforms on which Perl is supported. Please only use this address for
security issues in the Perl core, not for modules independently
distributed on CPAN.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details
on what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,118 @@
=encoding utf8
=head1 NAME
perl5123delta - what is new for perl v5.12.3
=head1 DESCRIPTION
This document describes differences between the 5.12.2 release and
the 5.12.3 release.
If you are upgrading from an earlier release such as 5.12.1, first read
L<perl5122delta>, which describes differences between 5.12.1 and
5.12.2. The major changes made in 5.12.0 are described in L<perl5120delta>.
=head1 Incompatible Changes
There are no changes intentionally incompatible with 5.12.2. If any
exist, they are bugs and reports are welcome.
=head1 Core Enhancements
=head2 C<keys>, C<values> work on arrays
You can now use the C<keys>, C<values>, C<each> builtin functions on arrays
(previously you could only use them on hashes). See L<perlfunc> for details.
This is actually a change introduced in perl 5.12.0, but it was missed from
that release's perldelta.
=head1 Bug Fixes
"no VERSION" will now correctly deparse with B::Deparse, as will certain
constant expressions.
Module::Build should be more reliably pass its tests under cygwin.
Lvalue subroutines are again able to return copy-on-write scalars. This
had been broken since version 5.10.0.
=head1 Platform Specific Notes
=over 4
=item Solaris
A separate DTrace is now build for miniperl, which means that perl can be
compiled with -Dusedtrace on Solaris again.
=item VMS
A number of regressions on VMS have been fixed. In addition to minor cleanup
of questionable expressions in F<vms.c>, file permissions should no longer be
garbled by the PerlIO layer, and spurious record boundaries should no longer be
introduced by the PerlIO layer during output.
For more details and discussion on the latter, see:
http://www.nntp.perl.org/group/perl.vmsperl/2010/11/msg15419.html
=item VOS
A few very small changes were made to the build process on VOS to better
support the platform. Longer-than-32-character filenames are now supported on
OpenVOS, and build properly without IPv6 support.
=back
=head1 Acknowledgements
Perl 5.12.3 represents approximately four months of development since
Perl 5.12.2 and contains approximately 2500 lines of changes across
54 files from 16 authors.
Perl continues to flourish into its third decade thanks to a vibrant
community of users and developers. The following people are known to
have contributed the improvements that became Perl 5.12.3:
Craig A. Berry, David Golden, David Leadbeater, Father Chrysostomos, Florian
Ragwitz, Jesse Vincent, Karl Williamson, Nick Johnston, Nicolas Kaiser, Paul
Green, Rafael Garcia-Suarez, Rainer Tammer, Ricardo Signes, Steffen Mueller,
Zsbán Ambrus, Ævar Arnfjörð Bjarmason
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles
recently posted to the comp.lang.perl.misc newsgroup and the perl
bug database at http://rt.perl.org/perlbug/ . There may also be
information at http://www.perl.org/ , the Perl Home Page.
If you believe you have an unreported bug, please run the B<perlbug>
program included with your release. Be sure to trim your bug down
to a tiny but sufficient test case. Your bug report, along with the
output of C<perl -V>, will be sent off to perlbug@perl.org to be
analysed by the Perl porting team.
If the bug you are reporting has security implications, which make it
inappropriate to send to a publicly archived mailing list, then please send
it to perl5-security-report@perl.org. This points to a closed subscription
unarchived mailing list, which includes
all the core committers, who will be able
to help assess the impact of issues, figure out a resolution, and help
co-ordinate the release of patches to mitigate or fix the problem across all
platforms on which Perl is supported. Please only use this address for
security issues in the Perl core, not for modules independently
distributed on CPAN.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details
on what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,108 @@
=encoding utf8
=head1 NAME
perl5124delta - what is new for perl v5.12.4
=head1 DESCRIPTION
This document describes differences between the 5.12.3 release and
the 5.12.4 release.
If you are upgrading from an earlier release such as 5.12.2, first read
L<perl5123delta>, which describes differences between 5.12.2
and 5.12.3. The major changes made in 5.12.0 are described in L<perl5120delta>.
=head1 Incompatible Changes
There are no changes intentionally incompatible with 5.12.3. If any
exist, they are bugs and reports are welcome.
=head1 Selected Bug Fixes
When strict "refs" mode is off, C<%{...}> in rvalue context returns
C<undef> if its argument is undefined. An optimisation introduced in Perl
5.12.0 to make C<keys %{...}> faster when used as a boolean did not take
this into account, causing C<keys %{+undef}> (and C<keys %$foo> when
C<$foo> is undefined) to be an error, which it should be so in strict
mode only [perl #81750].
C<lc>, C<uc>, C<lcfirst>, and C<ucfirst> no longer return untainted strings
when the argument is tainted. This has been broken since perl 5.8.9
[perl #87336].
Fixed a case where it was possible that a freed buffer may have been read
from when parsing a here document.
=head1 Modules and Pragmata
L<Module::CoreList> has been upgraded from version 2.43 to 2.50.
=head1 Testing
The F<cpan/CGI/t/http.t> test script has been fixed to work when the
environment has HTTPS_* environment variables, such as HTTPS_PROXY.
=head1 Documentation
Updated the documentation for rand() in L<perlfunc> to note that it is not
cryptographically secure.
=head1 Platform Specific Notes
=over 4
=item Linux
Support Ubuntu 11.04's new multi-arch library layout.
=back
=head1 Acknowledgements
Perl 5.12.4 represents approximately 5 months of development since
Perl 5.12.3 and contains approximately 200 lines of changes across
11 files from 8 authors.
Perl continues to flourish into its third decade thanks to a vibrant
community of users and developers. The following people are known to
have contributed the improvements that became Perl 5.12.4:
Andy Dougherty, David Golden, David Leadbeater, Father Chrysostomos,
Florian Ragwitz, Jesse Vincent, Leon Brocard, Zsbán Ambrus.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles
recently posted to the comp.lang.perl.misc newsgroup and the perl
bug database at http://rt.perl.org/perlbug/ . There may also be
information at http://www.perl.org/ , the Perl Home Page.
If you believe you have an unreported bug, please run the B<perlbug>
program included with your release. Be sure to trim your bug down
to a tiny but sufficient test case. Your bug report, along with the
output of C<perl -V>, will be sent off to perlbug@perl.org to be
analysed by the Perl porting team.
If the bug you are reporting has security implications, which make it
inappropriate to send to a publicly archived mailing list, then please send
it to perl5-security-report@perl.org. This points to a closed subscription
unarchived mailing list, which includes all the core committers, who be able
to help assess the impact of issues, figure out a resolution, and help
co-ordinate the release of patches to mitigate or fix the problem across all
platforms on which Perl is supported. Please only use this address for
security issues in the Perl core, not for modules independently
distributed on CPAN.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details
on what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,241 @@
=encoding utf8
=head1 NAME
perl5125delta - what is new for perl v5.12.5
=head1 DESCRIPTION
This document describes differences between the 5.12.4 release and
the 5.12.5 release.
If you are upgrading from an earlier release such as 5.12.3, first read
L<perl5124delta>, which describes differences between 5.12.3 and
5.12.4.
=head1 Security
=head2 C<Encode> decode_xs n-byte heap-overflow (CVE-2011-2939)
A bug in C<Encode> could, on certain inputs, cause the heap to overflow.
This problem has been corrected. Bug reported by Robert Zacek.
=head2 C<File::Glob::bsd_glob()> memory error with GLOB_ALTDIRFUNC (CVE-2011-2728).
Calling C<File::Glob::bsd_glob> with the unsupported flag GLOB_ALTDIRFUNC would
cause an access violation / segfault. A Perl program that accepts a flags value from
an external source could expose itself to denial of service or arbitrary code
execution attacks. There are no known exploits in the wild. The problem has been
corrected by explicitly disabling all unsupported flags and setting unused function
pointers to null. Bug reported by Clément Lecigne.
=head2 Heap buffer overrun in 'x' string repeat operator (CVE-2012-5195)
Poorly written perl code that allows an attacker to specify the count to
perl's 'x' string repeat operator can already cause a memory exhaustion
denial-of-service attack. A flaw in versions of perl before 5.15.5 can
escalate that into a heap buffer overrun; coupled with versions of glibc
before 2.16, it possibly allows the execution of arbitrary code.
This problem has been fixed.
=head1 Incompatible Changes
There are no changes intentionally incompatible with 5.12.4. If any
exist, they are bugs and reports are welcome.
=head1 Modules and Pragmata
=head2 Updated Modules
=head3 L<B::Concise>
L<B::Concise> no longer produces mangled output with the B<-tree> option
[perl #80632].
=head3 L<charnames>
A regression introduced in Perl 5.8.8 has been fixed, that caused
C<charnames::viacode(0)> to return C<undef> instead of the string "NULL"
[perl #72624].
=head3 L<Encode> has been upgraded from version 2.39 to version 2.39_01.
See L</Security>.
=head3 L<File::Glob> has been upgraded from version 1.07 to version 1.07_01.
See L</Security>.
=head3 L<Unicode::UCD>
The documentation for the C<upper> function now actually says "upper", not
"lower".
=head3 L<Module::CoreList>
L<Module::CoreList> has been updated to version 2.50_02 to add data for
this release.
=head1 Changes to Existing Documentation
=head2 L<perlebcdic>
The L<perlebcdic> document contains a helpful table to use in C<tr///> to
convert between EBCDIC and Latin1/ASCII. Unfortunately, the table was the
inverse of the one it describes. This has been corrected.
=head2 L<perlunicode>
The section on
L<User-Defined Case Mappings|perlunicode/User-Defined Case Mappings> had
some bad markup and unclear sentences, making parts of it unreadable. This
has been rectified.
=head2 L<perluniprops>
This document has been corrected to take non-ASCII platforms into account.
=head1 Installation and Configuration Improvements
=head2 Platform Specific Changes
=over 4
=item Mac OS X
There have been configuration and test fixes to make Perl build cleanly on
Lion and Mountain Lion.
=item NetBSD
The NetBSD hints file was corrected to be compatible with NetBSD 6.*
=back
=head1 Selected Bug Fixes
=over 4
=item *
C<chop> now correctly handles characters above "\x{7fffffff}"
[perl #73246].
=item *
C<< ($<,$>) = (...) >> stopped working properly in 5.12.0. It is supposed
to make a single C<setreuid()> call, rather than calling C<setruid()> and
C<seteuid()> separately. Consequently it did not work properly. This has
been fixed [perl #75212].
=item *
Fixed a regression of kill() when a match variable is used for the
process ID to kill [perl #75812].
=item *
C<UNIVERSAL::VERSION> no longer leaks memory. It started leaking in Perl
5.10.0.
=item *
The C-level C<my_strftime> functions no longer leaks memory. This fixes a
memory leak in C<POSIX::strftime> [perl #73520].
=item *
C<caller> no longer leaks memory when called from the DB package if
C<@DB::args> was assigned to after the first call to C<caller>. L<Carp>
was triggering this bug [perl #97010].
=item *
Passing to C<index> an offset beyond the end of the string when the string
is encoded internally in UTF8 no longer causes panics [perl #75898].
=item *
Syntax errors in C<< (?{...}) >> blocks in regular expressions no longer
cause panic messages [perl #2353].
=item *
Perl 5.10.0 introduced some faulty logic that made "U*" in the middle of
a pack template equivalent to "U0" if the input string was empty. This has
been fixed [perl #90160].
=back
=head1 Errata
=head2 split() and C<@_>
split() no longer modifies C<@_> when called in scalar or void context.
In void context it now produces a "Useless use of split" warning.
This is actually a change introduced in perl 5.12.0, but it was missed from
that release's L<perl5120delta>.
=head1 Acknowledgements
Perl 5.12.5 represents approximately 17 months of development since Perl 5.12.4
and contains approximately 1,900 lines of changes across 64 files from 18
authors.
Perl continues to flourish into its third decade thanks to a vibrant community
of users and developers. The following people are known to have contributed the
improvements that became Perl 5.12.5:
Andy Dougherty, Chris 'BinGOs' Williams, Craig A. Berry, David Mitchell,
Dominic Hargreaves, Father Chrysostomos, Florian Ragwitz, George Greer, Goro
Fuji, Jesse Vincent, Karl Williamson, Leon Brocard, Nicholas Clark, Rafael
Garcia-Suarez, Reini Urban, Ricardo Signes, Steve Hay, Tony Cook.
The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.
Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.
For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles
recently posted to the comp.lang.perl.misc newsgroup and the perl
bug database at http://rt.perl.org/perlbug/ . There may also be
information at http://www.perl.org/ , the Perl Home Page.
If you believe you have an unreported bug, please run the B<perlbug>
program included with your release. Be sure to trim your bug down
to a tiny but sufficient test case. Your bug report, along with the
output of C<perl -V>, will be sent off to perlbug@perl.org to be
analysed by the Perl porting team.
If the bug you are reporting has security implications, which make it
inappropriate to send to a publicly archived mailing list, then please send
it to perl5-security-report@perl.org. This points to a closed subscription
unarchived mailing list, which includes all the core committers, who be able
to help assess the impact of issues, figure out a resolution, and help
co-ordinate the release of patches to mitigate or fix the problem across all
platforms on which Perl is supported. Please only use this address for
security issues in the Perl core, not for modules independently
distributed on CPAN.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details
on what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,361 @@
=encoding utf8
=head1 NAME
perl5141delta - what is new for perl v5.14.1
=head1 DESCRIPTION
This document describes differences between the 5.14.0 release and
the 5.14.1 release.
If you are upgrading from an earlier release such as 5.12.0, first read
L<perl5140delta>, which describes differences between 5.12.0 and
5.14.0.
=head1 Core Enhancements
No changes since 5.14.0.
=head1 Security
No changes since 5.14.0.
=head1 Incompatible Changes
There are no changes intentionally incompatible with 5.14.0. If any
exist, they are bugs and reports are welcome.
=head1 Deprecations
There have been no deprecations since 5.14.0.
=head1 Modules and Pragmata
=head2 New Modules and Pragmata
None
=head2 Updated Modules and Pragmata
=over 4
=item *
L<B::Deparse> has been upgraded from version 1.03 to 1.04, to address two
regressions in Perl 5.14.0:
Deparsing of the C<glob> operator and its diamond (C<< <> >>) form now
works again. [perl #90898]
The presence of subroutines named C<::::> or C<::::::> no longer causes
B::Deparse to hang.
=item *
L<Pod::Perldoc> has been upgraded from version 3.15_03 to 3.15_04.
It corrects the search paths on VMS. [perl #90640]
=back
=head2 Removed Modules and Pragmata
None
=head1 Documentation
=head2 New Documentation
None
=head2 Changes to Existing Documentation
=head3 L<perlfunc>
=over
=item *
C<given>, C<when> and C<default> are now listed in L<perlfunc>.
=item *
Documentation for C<use> now includes a pointer to F<if.pm>.
=back
=head3 L<perllol>
=over
=item *
L<perllol> has been expanded with examples using the new C<push $scalar>
syntax introduced in Perl 5.14.0.
=back
=head3 L<perlop>
=over 4
=item *
The explanation of bitwise operators has been expanded to explain how they
work on Unicode strings.
=item *
The section on the triple-dot or yada-yada operator has been moved up, as
it used to separate two closely related sections about the comma operator.
=item *
More examples for C<m//g> have been added.
=item *
The C<<< <<\FOO >>> here-doc syntax has been documented.
=back
=head3 L<perlrun>
=over
=item *
L<perlrun> has undergone a significant clean-up. Most notably, the
B<-0x...> form of the B<-0> flag has been clarified, and the final section
on environment variables has been corrected and expanded.
=back
=head3 L<POSIX>
=over
=item *
The invocation documentation for C<WIFEXITED>, C<WEXITSTATUS>,
C<WIFSIGNALED>, C<WTERMSIG>, C<WIFSTOPPED>, and C<WSTOPSIG> was corrected.
=back
=head1 Diagnostics
The following additions or changes have been made to diagnostic output,
including warnings and fatal error messages. For the complete list of
diagnostic messages, see L<perldiag>.
=head2 New Diagnostics
None
=head2 Changes to Existing Diagnostics
None
=head1 Utility Changes
None
=head1 Configuration and Compilation
=over 4
=item *
F<regexp.h> has been modified for compatibility with GCC's C<-Werror>
option, as used by some projects that include perl's header files.
=back
=head1 Testing
=over 4
=item *
Some test failures in F<dist/Locale-Maketext/t/09_compile.t> that could
occur depending on the environment have been fixed. [perl #89896]
=item *
A watchdog timer for F<t/re/re.t> was lengthened to accommodate SH-4 systems
which were unable to complete the tests before the previous timer ran out.
=back
=head1 Platform Support
=head2 New Platforms
None
=head2 Discontinued Platforms
None
=head2 Platform-Specific Notes
=head3 Solaris
=over
=item *
Documentation listing the Solaris packages required to build Perl on
Solaris 9 and Solaris 10 has been corrected.
=back
=head3 Mac OS X
=over
=item *
The F<lib/locale.t> test script has been updated to work on the upcoming
Lion release.
=item *
Mac OS X specific compilation instructions have been clarified.
=back
=head3 Ubuntu Linux
=over
=item *
The L<ODBM_File> installation process has been updated with the new library
paths on Ubuntu natty.
=back
=head1 Internal Changes
=over
=item *
The compiled representation of formats is now stored via the mg_ptr of
their PERL_MAGIC_fm. Previously it was stored in the string buffer,
beyond SvLEN(), the regular end of the string. SvCOMPILED() and
SvCOMPILED_{on,off}() now exist solely for compatibility for XS code.
The first is always 0, the other two now no-ops.
=back
=head1 Bug Fixes
=over 4
=item *
A bug has been fixed that would cause a "Use of freed value in iteration"
error if the next two hash elements that would be iterated over are
deleted. [perl #85026]
=item *
Passing the same constant subroutine to both C<index> and C<formline> no
longer causes one or the other to fail. [perl #89218]
=item *
5.14.0 introduced some memory leaks in regular expression character
classes such as C<[\w\s]>, which have now been fixed.
=item *
An edge case in regular expression matching could potentially loop.
This happened only under C</i> in bracketed character classes that have
characters with multi-character folds, and the target string to match
against includes the first portion of the fold, followed by another
character that has a multi-character fold that begins with the remaining
portion of the fold, plus some more.
"s\N{U+DF}" =~ /[\x{DF}foo]/i
is one such case. C<\xDF> folds to C<"ss">.
=item *
Several Unicode case-folding bugs have been fixed.
=item *
The new (in 5.14.0) regular expression modifier C</a> when repeated like
C</aa> forbids the characters outside the ASCII range that match
characters inside that range from matching under C</i>. This did not
work under some circumstances, all involving alternation, such as:
"\N{KELVIN SIGN}" =~ /k|foo/iaa;
succeeded inappropriately. This is now fixed.
=item *
Fixed a case where it was possible that a freed buffer may have been read
from when parsing a here document.
=back
=head1 Acknowledgements
Perl 5.14.1 represents approximately four weeks of development since
Perl 5.14.0 and contains approximately 3500 lines of changes
across 38 files from 17 authors.
Perl continues to flourish into its third decade thanks to a vibrant
community of users and developers. The following people are known to
have contributed the improvements that became Perl 5.14.1:
Bo Lindbergh, Claudio Ramirez, Craig A. Berry, David Leadbeater, Father
Chrysostomos, Jesse Vincent, Jim Cromie, Justin Case, Karl Williamson,
Leo Lapworth, Nicholas Clark, Nobuhiro Iwamatsu, smash, Tom Christiansen,
Ton Hospel, Vladimir Timofeev, and Zsbán Ambrus.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles
recently posted to the comp.lang.perl.misc newsgroup and the perl
bug database at http://rt.perl.org/perlbug/ . There may also be
information at http://www.perl.org/ , the Perl Home Page.
If you believe you have an unreported bug, please run the L<perlbug>
program included with your release. Be sure to trim your bug down
to a tiny but sufficient test case. Your bug report, along with the
output of C<perl -V>, will be sent off to perlbug@perl.org to be
analysed by the Perl porting team.
If the bug you are reporting has security implications, which make it
inappropriate to send to a publicly archived mailing list, then please send
it to perl5-security-report@perl.org. This points to a closed subscription
unarchived mailing list, which includes all the core committers, who be able
to help assess the impact of issues, figure out a resolution, and help
co-ordinate the release of patches to mitigate or fix the problem across all
platforms on which Perl is supported. Please only use this address for
security issues in the Perl core, not for modules independently
distributed on CPAN.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details
on what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,242 @@
=encoding utf8
=head1 NAME
perl5142delta - what is new for perl v5.14.2
=head1 DESCRIPTION
This document describes differences between the 5.14.1 release and
the 5.14.2 release.
If you are upgrading from an earlier release such as 5.14.0, first read
L<perl5141delta>, which describes differences between 5.14.0 and
5.14.1.
=head1 Core Enhancements
No changes since 5.14.0.
=head1 Security
=head2 C<File::Glob::bsd_glob()> memory error with GLOB_ALTDIRFUNC (CVE-2011-2728).
Calling C<File::Glob::bsd_glob> with the unsupported flag GLOB_ALTDIRFUNC would
cause an access violation / segfault. A Perl program that accepts a flags value from
an external source could expose itself to denial of service or arbitrary code
execution attacks. There are no known exploits in the wild. The problem has been
corrected by explicitly disabling all unsupported flags and setting unused function
pointers to null. Bug reported by Clément Lecigne.
=head2 C<Encode> decode_xs n-byte heap-overflow (CVE-2011-2939)
A bug in C<Encode> could, on certain inputs, cause the heap to overflow.
This problem has been corrected. Bug reported by Robert Zacek.
=head1 Incompatible Changes
There are no changes intentionally incompatible with 5.14.0. If any
exist, they are bugs and reports are welcome.
=head1 Deprecations
There have been no deprecations since 5.14.0.
=head1 Modules and Pragmata
=head2 New Modules and Pragmata
None
=head2 Updated Modules and Pragmata
=over 4
=item *
L<CPAN> has been upgraded from version 1.9600 to version 1.9600_01.
L<CPAN::Distribution> has been upgraded from version 1.9602 to 1.9602_01.
Backported bugfixes from CPAN version 1.9800. Ensures proper
detection of C<configure_requires> prerequisites from CPAN Meta files
in the case where C<dynamic_config> is true. [rt.cpan.org #68835]
Also ensures that C<configure_requires> is only checked in META files,
not MYMETA files, so protect against MYMETA generation that drops
C<configure_requires>.
=item *
L<Encode> has been upgraded from version 2.42 to 2.42_01.
See L</Security>.
=item *
L<File::Glob> has been upgraded from version 1.12 to version 1.13.
See L</Security>.
=item *
L<PerlIO::scalar> has been upgraded from version 0.11 to 0.11_01.
It fixes a problem with C<< open my $fh, ">", \$scalar >> not working if
C<$scalar> is a copy-on-write scalar.
=back
=head2 Removed Modules and Pragmata
None
=head1 Platform Support
=head2 New Platforms
None
=head2 Discontinued Platforms
None
=head2 Platform-Specific Notes
=over 4
=item HP-UX PA-RISC/64 now supports gcc-4.x
A fix to correct the socketsize now makes the test suite pass on HP-UX
PA-RISC for 64bitall builds.
=item Building on OS X 10.7 Lion and Xcode 4 works again
The build system has been updated to work with the build tools under Mac OS X
10.7.
=back
=head1 Bug Fixes
=over 4
=item *
In @INC filters (subroutines returned by subroutines in @INC), $_ used to
misbehave: If returned from a subroutine, it would not be copied, but the
variable itself would be returned; and freeing $_ (e.g., with C<undef *_>)
would cause perl to crash. This has been fixed [perl #91880].
=item *
Perl 5.10.0 introduced some faulty logic that made "U*" in the middle of
a pack template equivalent to "U0" if the input string was empty. This has
been fixed [perl #90160].
=item *
C<caller> no longer leaks memory when called from the DB package if
C<@DB::args> was assigned to after the first call to C<caller>. L<Carp>
was triggering this bug [perl #97010].
=item *
C<utf8::decode> had a nasty bug that would modify copy-on-write scalars'
string buffers in place (i.e., skipping the copy). This could result in
hashes having two elements with the same key [perl #91834].
=item *
Localising a tied variable used to make it read-only if it contained a
copy-on-write string.
=item *
Elements of restricted hashes (see the L<fields> pragma) containing
copy-on-write values couldn't be deleted, nor could such hashes be cleared
(C<%hash = ()>).
=item *
Locking a hash element that is a glob copy no longer causes subsequent
assignment to it to corrupt the glob.
=item *
A panic involving the combination of the regular expression modifiers
C</aa> introduced in 5.14.0 and the C<\b> escape sequence has been
fixed [perl #95964].
=back
=head1 Known Problems
This is a list of some significant unfixed bugs, which are regressions
from 5.12.0.
=over 4
=item *
C<PERL_GLOBAL_STRUCT> is broken.
Since perl 5.14.0, building with C<-DPERL_GLOBAL_STRUCT> hasn't been
possible. This means that perl currently doesn't work on any platforms that
require it to be built this way, including Symbian.
While C<PERL_GLOBAL_STRUCT> now works again on recent development versions of
perl, it actually working on Symbian again hasn't been verified.
We'd be very interested in hearing from anyone working with Perl on Symbian.
=back
=head1 Acknowledgements
Perl 5.14.2 represents approximately three months of development since
Perl 5.14.1 and contains approximately 1200 lines of changes
across 61 files from 9 authors.
Perl continues to flourish into its third decade thanks to a vibrant
community of users and developers. The following people are known to
have contributed the improvements that became Perl 5.14.2:
Craig A. Berry, David Golden, Father Chrysostomos, Florian Ragwitz, H.Merijn
Brand, Karl Williamson, Nicholas Clark, Pau Amma and Ricardo Signes.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles
recently posted to the comp.lang.perl.misc newsgroup and the perl
bug database at http://rt.perl.org/perlbug/ . There may also be
information at http://www.perl.org/ , the Perl Home Page.
If you believe you have an unreported bug, please run the L<perlbug>
program included with your release. Be sure to trim your bug down
to a tiny but sufficient test case. Your bug report, along with the
output of C<perl -V>, will be sent off to perlbug@perl.org to be
analysed by the Perl porting team.
If the bug you are reporting has security implications, which make it
inappropriate to send to a publicly archived mailing list, then please send
it to perl5-security-report@perl.org. This points to a closed subscription
unarchived mailing list, which includes all the core committers, who be able
to help assess the impact of issues, figure out a resolution, and help
co-ordinate the release of patches to mitigate or fix the problem across all
platforms on which Perl is supported. Please only use this address for
security issues in the Perl core, not for modules independently
distributed on CPAN.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details
on what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,291 @@
=encoding utf8
=head1 NAME
perl5143delta - what is new for perl v5.14.3
=head1 DESCRIPTION
This document describes differences between the 5.14.2 release and
the 5.14.3 release.
If you are upgrading from an earlier release such as 5.12.0, first read
L<perl5140delta>, which describes differences between 5.12.0 and
5.14.0.
=head1 Core Enhancements
No changes since 5.14.0.
=head1 Security
=head2 C<Digest> unsafe use of eval (CVE-2011-3597)
The C<Digest-E<gt>new()> function did not properly sanitize input before
using it in an eval() call, which could lead to the injection of arbitrary
Perl code.
In order to exploit this flaw, the attacker would need to be able to set
the algorithm name used, or be able to execute arbitrary Perl code already.
This problem has been fixed.
=head2 Heap buffer overrun in 'x' string repeat operator (CVE-2012-5195)
Poorly written perl code that allows an attacker to specify the count to
perl's 'x' string repeat operator can already cause a memory exhaustion
denial-of-service attack. A flaw in versions of perl before 5.15.5 can
escalate that into a heap buffer overrun; coupled with versions of glibc
before 2.16, it possibly allows the execution of arbitrary code.
This problem has been fixed.
=head1 Incompatible Changes
There are no changes intentionally incompatible with 5.14.0. If any
exist, they are bugs and reports are welcome.
=head1 Deprecations
There have been no deprecations since 5.14.0.
=head1 Modules and Pragmata
=head2 New Modules and Pragmata
None
=head2 Updated Modules and Pragmata
=over 4
=item *
L<PerlIO::scalar> was updated to fix a bug in which opening a filehandle to
a glob copy caused assertion failures (under debugging) or hangs or other
erratic behaviour without debugging.
=item *
L<ODBM_File> and L<NDBM_File> were updated to allow building on GNU/Hurd.
=item *
L<IPC::Open3> has been updated to fix a regression introduced in perl
5.12, which broke C<IPC::Open3::open3($in, $out, $err, '-')>.
[perl #95748]
=item *
L<Digest> has been upgraded from version 1.16 to 1.16_01.
See L</Security>.
=item *
L<Module::CoreList> has been updated to version 2.49_04 to add data for
this release.
=back
=head2 Removed Modules and Pragmata
None
=head1 Documentation
=head2 New Documentation
None
=head2 Changes to Existing Documentation
=head3 L<perlcheat>
=over 4
=item *
L<perlcheat> was updated to 5.14.
=back
=head1 Configuration and Compilation
=over 4
=item *
h2ph was updated to search correctly gcc include directories on platforms
such as Debian with multi-architecture support.
=item *
In Configure, the test for procselfexe was refactored into a loop.
=back
=head1 Platform Support
=head2 New Platforms
None
=head2 Discontinued Platforms
None
=head2 Platform-Specific Notes
=over 4
=item FreeBSD
The FreeBSD hints file was corrected to be compatible with FreeBSD 10.0.
=item Solaris and NetBSD
Configure was updated for "procselfexe" support on Solaris and NetBSD.
=item HP-UX
README.hpux was updated to note the existence of a broken header in
HP-UX 11.00.
=item Linux
libutil is no longer used when compiling on Linux platforms, which avoids
warnings being emitted.
The system gcc (rather than any other gcc which might be in the compiling
user's path) is now used when searching for libraries such as C<-lm>.
=item Mac OS X
The locale tests were updated to reflect the behaviour of locales in
Mountain Lion.
=item GNU/Hurd
Various build and test fixes were included for GNU/Hurd.
LFS support was enabled in GNU/Hurd.
=item NetBSD
The NetBSD hints file was corrected to be compatible with NetBSD 6.*
=back
=head1 Bug Fixes
=over 4
=item *
A regression has been fixed that was introduced in 5.14, in C</i>
regular expression matching, in which a match improperly fails if the
pattern is in UTF-8, the target string is not, and a Latin-1 character
precedes a character in the string that should match the pattern. [perl
#101710]
=item *
In case-insensitive regular expression pattern matching, no longer on
UTF-8 encoded strings does the scan for the start of match only look at
the first possible position. This caused matches such as
C<"f\x{FB00}" =~ /ff/i> to fail.
=item *
The sitecustomize support was made relocatableinc aware, so that
-Dusesitecustomize and -Duserelocatableinc may be used together.
=item *
The smartmatch operator (C<~~>) was changed so that the right-hand side
takes precedence during C<Any ~~ Object> operations.
=item *
A bug has been fixed in the tainting support, in which an C<index()>
operation on a tainted constant would cause all other constants to become
tainted. [perl #64804]
=item *
A regression has been fixed that was introduced in perl 5.12, whereby
tainting errors were not correctly propagated through C<die()>.
[perl #111654]
=item *
A regression has been fixed that was introduced in perl 5.14, in which
C</[[:lower:]]/i> and C</[[:upper:]]/i> no longer matched the opposite case.
[perl #101970]
=back
=head1 Acknowledgements
Perl 5.14.3 represents approximately 12 months of development since Perl 5.14.2
and contains approximately 2,300 lines of changes across 64 files from 22
authors.
Perl continues to flourish into its third decade thanks to a vibrant community
of users and developers. The following people are known to have contributed the
improvements that became Perl 5.14.3:
Abigail, Andy Dougherty, Carl Hayter, Chris 'BinGOs' Williams, Dave Rolsky,
David Mitchell, Dominic Hargreaves, Father Chrysostomos, Florian Ragwitz,
H.Merijn Brand, Jilles Tjoelker, Karl Williamson, Leon Timmermans, Michael G
Schwern, Nicholas Clark, Niko Tyni, Pino Toscano, Ricardo Signes, Salvador
Fandiño, Samuel Thibault, Steve Hay, Tony Cook.
The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.
Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.
For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles
recently posted to the comp.lang.perl.misc newsgroup and the perl
bug database at http://rt.perl.org/perlbug/ . There may also be
information at http://www.perl.org/ , the Perl Home Page.
If you believe you have an unreported bug, please run the L<perlbug>
program included with your release. Be sure to trim your bug down
to a tiny but sufficient test case. Your bug report, along with the
output of C<perl -V>, will be sent off to perlbug@perl.org to be
analysed by the Perl porting team.
If the bug you are reporting has security implications, which make it
inappropriate to send to a publicly archived mailing list, then please send
it to perl5-security-report@perl.org. This points to a closed subscription
unarchived mailing list, which includes all the core committers, who be able
to help assess the impact of issues, figure out a resolution, and help
co-ordinate the release of patches to mitigate or fix the problem across all
platforms on which Perl is supported. Please only use this address for
security issues in the Perl core, not for modules independently
distributed on CPAN.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details
on what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,240 @@
=encoding utf8
=head1 NAME
perl5144delta - what is new for perl v5.14.4
=head1 DESCRIPTION
This document describes differences between the 5.14.3 release and
the 5.14.4 release.
If you are upgrading from an earlier release such as 5.12.0, first read
L<perl5140delta>, which describes differences between 5.12.0 and
5.14.0.
=head1 Core Enhancements
No changes since 5.14.0.
=head1 Security
This release contains one major, and medium, and a number of minor
security fixes. The latter are included mainly to allow the test suite to
pass cleanly with the clang compiler's address sanitizer facility.
=head2 CVE-2013-1667: memory exhaustion with arbitrary hash keys
With a carefully crafted set of hash keys (for example arguments on a
URL), it is possible to cause a hash to consume a large amount of memory
and CPU, and thus possibly to achieve a Denial-of-Service.
This problem has been fixed.
=head2 memory leak in Encode
The UTF-8 encoding implementation in Encode.xs had a memory leak which has been
fixed.
=head2 [perl #111594] Socket::unpack_sockaddr_un heap-buffer-overflow
A read buffer overflow could occur when copying C<sockaddr> buffers.
Fairly harmless.
This problem has been fixed.
=head2 [perl #111586] SDBM_File: fix off-by-one access to global ".dir"
An extra byte was being copied for some string literals. Fairly harmless.
This problem has been fixed.
=head2 off-by-two error in List::Util
A string literal was being used that included two bytes beyond the
end of the string. Fairly harmless.
This problem has been fixed.
=head2 [perl #115994] fix segv in regcomp.c:S_join_exact()
Under debugging builds, while marking optimised-out regex nodes as type
C<OPTIMIZED>, it could treat blocks of exact text as if they were nodes,
and thus SEGV. Fairly harmless.
This problem has been fixed.
=head2 [perl #115992] PL_eval_start use-after-free
The statement C<local $[;>, when preceded by an C<eval>, and when not part
of an assignment, could crash. Fairly harmless.
This problem has been fixed.
=head2 wrap-around with IO on long strings
Reading or writing strings greater than 2**31 bytes in size could segfault
due to integer wraparound.
This problem has been fixed.
=head1 Incompatible Changes
There are no changes intentionally incompatible with 5.14.0. If any
exist, they are bugs and reports are welcome.
=head1 Deprecations
There have been no deprecations since 5.14.0.
=head1 Modules and Pragmata
=head2 New Modules and Pragmata
None
=head2 Updated Modules and Pragmata
The following modules have just the minor code fixes as listed above in
L</Security> (version numbers have not changed):
=over 4
=item Socket
=item SDBM_File
=item List::Util
=back
L<Encode> has been upgraded from version 2.42_01 to version 2.42_02.
L<Module::CoreList> has been updated to version 2.49_06 to add data for
this release.
=head2 Removed Modules and Pragmata
None.
=head1 Documentation
=head2 New Documentation
None.
=head2 Changes to Existing Documentation
None.
=head1 Diagnostics
No new or changed diagnostics.
=head1 Utility Changes
None
=head1 Configuration and Compilation
No changes.
=head1 Platform Support
=head2 New Platforms
None.
=head2 Discontinued Platforms
None.
=head2 Platform-Specific Notes
=over 4
=item VMS
5.14.3 failed to compile on VMS due to incomplete application of a patch
series that allowed C<userelocatableinc> and C<usesitecustomize> to be
used simultaneously. Other platforms were not affected and the problem
has now been corrected.
=back
=head1 Selected Bug Fixes
=over 4
=item *
In Perl 5.14.0, C<$tainted ~~ @array> stopped working properly. Sometimes
it would erroneously fail (when C<$tainted> contained a string that occurs
in the array I<after> the first element) or erroneously succeed (when
C<undef> occurred after the first element) [perl #93590].
=back
=head1 Known Problems
None.
=head1 Acknowledgements
Perl 5.14.4 represents approximately 5 months of development since Perl 5.14.3
and contains approximately 1,700 lines of changes across 49 files from 12
authors.
Perl continues to flourish into its third decade thanks to a vibrant community
of users and developers. The following people are known to have contributed the
improvements that became Perl 5.14.4:
Andy Dougherty, Chris 'BinGOs' Williams, Christian Hansen, Craig A. Berry,
Dave Rolsky, David Mitchell, Dominic Hargreaves, Father Chrysostomos,
Florian Ragwitz, Reini Urban, Ricardo Signes, Yves Orton.
The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.
For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles
recently posted to the comp.lang.perl.misc newsgroup and the perl
bug database at http://rt.perl.org/perlbug/ . There may also be
information at http://www.perl.org/ , the Perl Home Page.
If you believe you have an unreported bug, please run the L<perlbug>
program included with your release. Be sure to trim your bug down
to a tiny but sufficient test case. Your bug report, along with the
output of C<perl -V>, will be sent off to perlbug@perl.org to be
analysed by the Perl porting team.
If the bug you are reporting has security implications, which make it
inappropriate to send to a publicly archived mailing list, then please send
it to perl5-security-report@perl.org. This points to a closed subscription
unarchived mailing list, which includes all the core committers, who be able
to help assess the impact of issues, figure out a resolution, and help
co-ordinate the release of patches to mitigate or fix the problem across all
platforms on which Perl is supported. Please only use this address for
security issues in the Perl core, not for modules independently
distributed on CPAN.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details
on what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,198 @@
=encoding utf8
=head1 NAME
perl5161delta - what is new for perl v5.16.1
=head1 DESCRIPTION
This document describes differences between the 5.16.0 release and
the 5.16.1 release.
If you are upgrading from an earlier release such as 5.14.0, first read
L<perl5160delta>, which describes differences between 5.14.0 and
5.16.0.
=head1 Security
=head2 an off-by-two error in Scalar-List-Util has been fixed
The bugfix was in Scalar-List-Util 1.23_04, and perl 5.16.1 includes
Scalar-List-Util 1.25.
=head1 Incompatible Changes
There are no changes intentionally incompatible with 5.16.0 If any
exist, they are bugs, and we request that you submit a report. See
L</Reporting Bugs> below.
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
=over 4
=item *
L<Scalar::Util> and L<List::Util> have been upgraded from version 1.23 to
version 1.25.
=item *
L<B::Deparse> has been updated from version 1.14 to 1.14_01. An
"uninitialized" warning emitted by B::Deparse has been squashed
[perl #113464].
=back
=head1 Configuration and Compilation
=over
=item *
Building perl with some Windows compilers used to fail due to a problem
with miniperl's C<glob> operator (which uses the C<perlglob> program)
deleting the PATH environment variable [perl #113798].
=back
=head1 Platform Support
=head2 Platform-Specific Notes
=over 4
=item VMS
All C header files from the top-level directory of the distribution are now
installed on VMS, providing consistency with a long-standing practice on other
platforms. Previously only a subset were installed, which broke non-core extension
builds for extensions that depended on the missing include files.
=back
=head1 Selected Bug Fixes
=over 4
=item *
A regression introduced in Perl v5.16.0 involving
C<tr/I<SEARCHLIST>/I<REPLACEMENTLIST>/> has been fixed. Only the first
instance is supposed to be meaningful if a character appears more than
once in C<I<SEARCHLIST>>. Under some circumstances, the final instance
was overriding all earlier ones. [perl #113584]
=item *
C<B::COP::stashlen> has been added. This provides access to an internal
field added in perl 5.16 under threaded builds. It was broken at the last
minute before 5.16 was released [perl #113034].
=item *
The L<re> pragma will no longer clobber C<$_>. [perl #113750]
=item *
Unicode 6.1 published an incorrect alias for one of the
Canonical_Combining_Class property's values (which range between 0 and
254). The alias C<CCC133> should have been C<CCC132>. Perl now
overrides the data file furnished by Unicode to give the correct value.
=item *
Duplicating scalar filehandles works again. [perl #113764]
=item *
Under threaded perls, a runtime code block in a regular expression could
corrupt the package name stored in the op tree, resulting in bad reads
in C<caller>, and possibly crashes [perl #113060].
=item *
For efficiency's sake, many operators and built-in functions return the
same scalar each time. Lvalue subroutines and subroutines in the CORE::
namespace were allowing this implementation detail to leak through.
C<print &CORE::uc("a"), &CORE::uc("b")> used to print "BB". The same thing
would happen with an lvalue subroutine returning the return value of C<uc>.
Now the value is copied in such cases [perl #113044].
=item *
C<__SUB__> now works in special blocks (C<BEGIN>, C<END>, etc.).
=item *
Formats that reference lexical variables from outside no longer result
in crashes.
=back
=head1 Known Problems
There are no new known problems, but consult L<perl5160delta/Known
Problems> to see those identified in the 5.16.0 release.
=head1 Acknowledgements
Perl 5.16.1 represents approximately 2 months of development since Perl
5.16.0 and contains approximately 14,000 lines of changes across 96
files from 8 authors.
Perl continues to flourish into its third decade thanks to a vibrant
community of users and developers. The following people are known to
have contributed the improvements that became Perl 5.16.1:
Chris 'BinGOs' Williams, Craig A. Berry, Father Chrysostomos, Karl
Williamson, Paul Johnson, Reini Urban, Ricardo Signes, Tony Cook.
The list above is almost certainly incomplete as it is automatically
generated from version control history. In particular, it does not
include the names of the (very much appreciated) contributors who
reported issues to the Perl bug tracker.
Many of the changes included in this version originated in the CPAN
modules included in Perl's core. We're grateful to the entire CPAN
community for helping Perl to flourish.
For a more complete list of all of Perl's historical contributors,
please see the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles
recently posted to the comp.lang.perl.misc newsgroup and the perl
bug database at http://rt.perl.org/perlbug/ . There may also be
information at http://www.perl.org/ , the Perl Home Page.
If you believe you have an unreported bug, please run the L<perlbug>
program included with your release. Be sure to trim your bug down
to a tiny but sufficient test case. Your bug report, along with the
output of C<perl -V>, will be sent off to perlbug@perl.org to be
analysed by the Perl porting team.
If the bug you are reporting has security implications, which make it
inappropriate to send to a publicly archived mailing list, then please
send it to perl5-security-report@perl.org. This points to a closed
subscription unarchived mailing list, which includes all the core
committers, who will be able to help assess the impact of issues, figure
out a resolution, and help co-ordinate the release of patches to
mitigate or fix the problem across all platforms on which Perl is
supported. Please only use this address for security issues in the Perl
core, not for modules independently distributed on CPAN.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details
on what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,125 @@
=encoding utf8
=head1 NAME
perl5162delta - what is new for perl v5.16.2
=head1 DESCRIPTION
This document describes differences between the 5.16.1 release and
the 5.16.2 release.
If you are upgrading from an earlier release such as 5.16.0, first read
L<perl5161delta>, which describes differences between 5.16.0 and
5.16.1.
=head1 Incompatible Changes
There are no changes intentionally incompatible with 5.16.0
If any exist, they are bugs, and we request that you submit a
report. See L</Reporting Bugs> below.
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
=over 4
=item *
L<Module::CoreList> has been upgraded from version 2.70 to version 2.76.
=back
=head1 Configuration and Compilation
=over 4
=item * configuration should no longer be confused by ls colorization
=back
=head1 Platform Support
=head2 Platform-Specific Notes
=over 4
=item AIX
Configure now always adds -qlanglvl=extc99 to the CC flags on AIX when
using xlC. This will make it easier to compile a number of XS-based modules
that assume C99 [perl #113778].
=back
=head1 Selected Bug Fixes
=over 4
=item * fix /\h/ equivalence with /[\h]/
see [perl #114220]
=back
=head1 Known Problems
There are no new known problems.
=head1 Acknowledgements
Perl 5.16.2 represents approximately 2 months of development since Perl
5.16.1 and contains approximately 740 lines of changes across 20 files
from 9 authors.
Perl continues to flourish into its third decade thanks to a vibrant
community of users and developers. The following people are known to
have contributed the improvements that became Perl 5.16.2:
Andy Dougherty, Craig A. Berry, Darin McBride, Dominic Hargreaves, Karen
Etheridge, Karl Williamson, Peter Martini, Ricardo Signes, Tony Cook.
The list above is almost certainly incomplete as it is automatically
generated from version control history. In particular, it does not
include the names of the (very much appreciated) contributors who
reported issues to the Perl bug tracker.
For a more complete list of all of Perl's historical contributors,
please see the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles
recently posted to the comp.lang.perl.misc newsgroup and the perl
bug database at http://rt.perl.org/perlbug/ . There may also be
information at http://www.perl.org/ , the Perl Home Page.
If you believe you have an unreported bug, please run the L<perlbug>
program included with your release. Be sure to trim your bug down
to a tiny but sufficient test case. Your bug report, along with the
output of C<perl -V>, will be sent off to perlbug@perl.org to be
analysed by the Perl porting team.
If the bug you are reporting has security implications, which make it
inappropriate to send to a publicly archived mailing list, then please
send it to perl5-security-report@perl.org. This points to a closed
subscription unarchived mailing list, which includes all the core
committers, who will be able to help assess the impact of issues, figure
out a resolution, and help co-ordinate the release of patches to
mitigate or fix the problem across all platforms on which Perl is
supported. Please only use this address for security issues in the Perl
core, not for modules independently distributed on CPAN.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details
on what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,133 @@
=encoding utf8
=head1 NAME
perl5163delta - what is new for perl v5.16.3
=head1 DESCRIPTION
This document describes differences between the 5.16.2 release and
the 5.16.3 release.
If you are upgrading from an earlier release such as 5.16.1, first read
L<perl5162delta>, which describes differences between 5.16.1 and
5.16.2.
=head1 Core Enhancements
No changes since 5.16.0.
=head1 Security
This release contains one major and a number of minor security fixes.
These latter are included mainly to allow the test suite to pass cleanly
with the clang compiler's address sanitizer facility.
=head2 CVE-2013-1667: memory exhaustion with arbitrary hash keys
With a carefully crafted set of hash keys (for example arguments on a
URL), it is possible to cause a hash to consume a large amount of memory
and CPU, and thus possibly to achieve a Denial-of-Service.
This problem has been fixed.
=head2 wrap-around with IO on long strings
Reading or writing strings greater than 2**31 bytes in size could segfault
due to integer wraparound.
This problem has been fixed.
=head2 memory leak in Encode
The UTF-8 encoding implementation in Encode.xs had a memory leak which has been
fixed.
=head1 Incompatible Changes
There are no changes intentionally incompatible with 5.16.0. If any
exist, they are bugs and reports are welcome.
=head1 Deprecations
There have been no deprecations since 5.16.0.
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
=over 4
=item *
L<Encode> has been upgraded from version 2.44 to version 2.44_01.
=item *
L<Module::CoreList> has been upgraded from version 2.76 to version 2.76_02.
=item *
L<XS::APItest> has been upgraded from version 0.38 to version 0.39.
=back
=head1 Known Problems
None.
=head1 Acknowledgements
Perl 5.16.3 represents approximately 4 months of development since Perl 5.16.2
and contains approximately 870 lines of changes across 39 files from 7 authors.
Perl continues to flourish into its third decade thanks to a vibrant community
of users and developers. The following people are known to have contributed the
improvements that became Perl 5.16.3:
Andy Dougherty, Chris 'BinGOs' Williams, Dave Rolsky, David Mitchell, Michael
Schroeder, Ricardo Signes, Yves Orton.
The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.
For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles
recently posted to the comp.lang.perl.misc newsgroup and the perl
bug database at http://rt.perl.org/perlbug/ . There may also be
information at http://www.perl.org/ , the Perl Home Page.
If you believe you have an unreported bug, please run the L<perlbug>
program included with your release. Be sure to trim your bug down
to a tiny but sufficient test case. Your bug report, along with the
output of C<perl -V>, will be sent off to perlbug@perl.org to be
analysed by the Perl porting team.
If the bug you are reporting has security implications, which make it
inappropriate to send to a publicly archived mailing list, then please
send it to perl5-security-report@perl.org. This points to a closed
subscription unarchived mailing list, which includes all the core
committers, who will be able to help assess the impact of issues, figure
out a resolution, and help co-ordinate the release of patches to
mitigate or fix the problem across all platforms on which Perl is
supported. Please only use this address for security issues in the Perl
core, not for modules independently distributed on CPAN.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details
on what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,217 @@
=encoding utf8
=head1 NAME
perl5181delta - what is new for perl v5.18.1
=head1 DESCRIPTION
This document describes differences between the 5.18.0 release and the 5.18.1
release.
If you are upgrading from an earlier release such as 5.16.0, first read
L<perl5180delta>, which describes differences between 5.16.0 and 5.18.0.
=head1 Incompatible Changes
There are no changes intentionally incompatible with 5.18.0
If any exist, they are bugs, and we request that you submit a
report. See L</Reporting Bugs> below.
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
=over 4
=item *
B has been upgraded from 1.42 to 1.42_01, fixing bugs related to lexical
subroutines.
=item *
Digest::SHA has been upgraded from 5.84 to 5.84_01, fixing a crashing bug.
[RT #118649]
=item *
Module::CoreList has been upgraded from 2.89 to 2.96.
=back
=head1 Platform Support
=head2 Platform-Specific Notes
=over 4
=item AIX
A rarely-encountered configuration bug in the AIX hints file has been corrected.
=item MidnightBSD
After a patch to the relevant hints file, perl should now build correctly on
MidnightBSD 0.4-RELEASE.
=back
=head1 Selected Bug Fixes
=over 4
=item *
Starting in v5.18.0, a construct like C</[#](?{})/x> would have its C<#>
incorrectly interpreted as a comment. The code block would be skipped,
unparsed. This has been corrected.
=item *
A number of memory leaks related to the new, experimental regexp bracketed
character class feature have been plugged.
=item *
The OP allocation code now returns correctly aligned memory in all cases
for C<struct pmop>. Previously it could return memory only aligned to a
4-byte boundary, which is not correct for an ithreads build with 64 bit IVs
on some 32 bit platforms. Notably, this caused the build to fail completely
on sparc GNU/Linux. [RT #118055]
=item *
The debugger's C<man> command been fixed. It was broken in the v5.18.0
release. The C<man> command is aliased to the names C<doc> and C<perldoc> -
all now work again.
=item *
C<@_> is now correctly visible in the debugger, fixing a regression
introduced in v5.18.0's debugger. [RT #118169]
=item *
Fixed a small number of regexp constructions that could either fail to
match or crash perl when the string being matched against was
allocated above the 2GB line on 32-bit systems. [RT #118175]
=item *
Perl v5.16 inadvertently introduced a bug whereby calls to XSUBs that were
not visible at compile time were treated as lvalues and could be assigned
to, even when the subroutine was not an lvalue sub. This has been fixed.
[perl #117947]
=item *
Perl v5.18 inadvertently introduced a bug whereby dual-vars (i.e.
variables with both string and numeric values, such as C<$!> ) where the
truthness of the variable was determined by the numeric value rather than
the string value. [RT #118159]
=item *
Perl v5.18 inadvertently introduced a bug whereby interpolating mixed up-
and down-graded UTF-8 strings in a regex could result in malformed UTF-8
in the pattern: specifically if a downgraded character in the range
C<\x80..\xff> followed a UTF-8 string, e.g.
utf8::upgrade( my $u = "\x{e5}");
utf8::downgrade(my $d = "\x{e5}");
/$u$d/
[perl #118297].
=item *
Lexical constants (C<my sub a() { 42 }>) no longer crash when inlined.
=item *
Parameter prototypes attached to lexical subroutines are now respected when
compiling sub calls without parentheses. Previously, the prototypes were
honoured only for calls I<with> parentheses. [RT #116735]
=item *
Syntax errors in lexical subroutines in combination with calls to the same
subroutines no longer cause crashes at compile time.
=item *
The dtrace sub-entry probe now works with lexical subs, instead of
crashing [perl #118305].
=item *
Undefining an inlinable lexical subroutine (C<my sub foo() { 42 } undef
&foo>) would result in a crash if warnings were turned on.
=item *
Deep recursion warnings no longer crash lexical subroutines. [RT #118521]
=back
=head1 Acknowledgements
Perl 5.18.1 represents approximately 2 months of development since Perl 5.18.0
and contains approximately 8,400 lines of changes across 60 files from 12
authors.
Perl continues to flourish into its third decade thanks to a vibrant community
of users and developers. The following people are known to have contributed the
improvements that became Perl 5.18.1:
Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari Mannsåker, David
Mitchell, Father Chrysostomos, Karl Williamson, Lukas Mai, Nicholas Clark,
Peter Martini, Ricardo Signes, Shlomi Fish, Tony Cook.
The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.
Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.
For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles recently
posted to the comp.lang.perl.misc newsgroup and the perl bug database at
http://rt.perl.org/perlbug/ . There may also be information at
http://www.perl.org/ , the Perl Home Page.
If you believe you have an unreported bug, please run the L<perlbug> program
included with your release. Be sure to trim your bug down to a tiny but
sufficient test case. Your bug report, along with the output of C<perl -V>,
will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
If the bug you are reporting has security implications, which make it
inappropriate to send to a publicly archived mailing list, then please send it
to perl5-security-report@perl.org. This points to a closed subscription
unarchived mailing list, which includes all the core committers, who will be
able to help assess the impact of issues, figure out a resolution, and help
co-ordinate the release of patches to mitigate or fix the problem across all
platforms on which Perl is supported. Please only use this address for
security issues in the Perl core, not for modules independently distributed on
CPAN.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details on
what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,175 @@
=encoding utf8
=head1 NAME
perl5182delta - what is new for perl v5.18.2
=head1 DESCRIPTION
This document describes differences between the 5.18.1 release and the 5.18.2
release.
If you are upgrading from an earlier release such as 5.18.0, first read
L<perl5181delta>, which describes differences between 5.18.0 and 5.18.1.
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
=over 4
=item *
L<B> has been upgraded from version 1.42_01 to 1.42_02.
The fix for [perl #118525] introduced a regression in the behaviour of
C<B::CV::GV>, changing the return value from a C<B::SPECIAL> object on
a C<NULL> C<CvGV> to C<undef>. C<B::CV::GV> again returns a
C<B::SPECIAL> object in this case. [perl #119413]
=item *
L<B::Concise> has been upgraded from version 0.95 to 0.95_01.
This fixes a bug in dumping unexpected SPECIALs.
=item *
L<English> has been upgraded from version 1.06 to 1.06_01. This fixes an
error about the performance of C<$`>, C<$&>, and C<$'>.
=item *
L<File::Glob> has been upgraded from version 1.20 to 1.20_01.
=back
=head1 Documentation
=head2 Changes to Existing Documentation
=over 4
=item *
L<perlrepository> has been restored with a pointer to more useful pages.
=item *
L<perlhack> has been updated with the latest changes from blead.
=back
=head1 Selected Bug Fixes
=over 4
=item *
Perl 5.18.1 introduced a regression along with a bugfix for lexical subs.
Some B::SPECIAL results from B::CV::GV became undefs instead. This broke
Devel::Cover among other libraries. This has been fixed. [perl #119351]
=item *
Perl 5.18.0 introduced a regression whereby C<[:^ascii:]>, if used in the same
character class as other qualifiers, would fail to match characters in the
Latin-1 block. This has been fixed. [perl #120799]
=item *
Perl 5.18.0 introduced a regression when using ->SUPER::method with AUTOLOAD
by looking up AUTOLOAD from the current package, rather than the current
packages superclass. This has been fixed. [perl #120694]
=item *
Perl 5.18.0 introduced a regression whereby C<-bareword> was no longer
permitted under the C<strict> and C<integer> pragmata when used together. This
has been fixed. [perl #120288]
=item *
Previously PerlIOBase_dup didn't check if pushing the new layer succeeded
before (optionally) setting the utf8 flag. This could cause
segfaults-by-nullpointer. This has been fixed.
=item *
A buffer overflow with very long identifiers has been fixed.
=item *
A regression from 5.16 in the handling of padranges led to assertion failures
if a keyword plugin declined to handle the second my, but only after creating
a padop.
This affected, at least, Devel::CallParser under threaded builds.
This has been fixed.
=item *
The construct C<< $r=qr/.../; /$r/p >> is now handled properly, an issue which
had been worsened by changes 5.18.0. [perl #118213]
=back
=head1 Acknowledgements
Perl 5.18.2 represents approximately 3 months of development since Perl
5.18.1 and contains approximately 980 lines of changes across 39 files from 4
authors.
Perl continues to flourish into its third decade thanks to a vibrant
community of users and developers. The following people are known to have
contributed the improvements that became Perl 5.18.2:
Craig A. Berry, David Mitchell, Ricardo Signes, Tony Cook.
The list above is almost certainly incomplete as it is automatically
generated from version control history. In particular, it does not include
the names of the (very much appreciated) contributors who reported issues to
the Perl bug tracker.
Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.
For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles recently
posted to the comp.lang.perl.misc newsgroup and the perl bug database at
http://rt.perl.org/perlbug/ . There may also be information at
http://www.perl.org/ , the Perl Home Page.
If you believe you have an unreported bug, please run the L<perlbug> program
included with your release. Be sure to trim your bug down to a tiny but
sufficient test case. Your bug report, along with the output of C<perl -V>,
will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
If the bug you are reporting has security implications, which make it
inappropriate to send to a publicly archived mailing list, then please send it
to perl5-security-report@perl.org. This points to a closed subscription
unarchived mailing list, which includes all the core committers, who will be
able to help assess the impact of issues, figure out a resolution, and help
co-ordinate the release of patches to mitigate or fix the problem across all
platforms on which Perl is supported. Please only use this address for
security issues in the Perl core, not for modules independently distributed on
CPAN.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details on
what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,153 @@
=encoding utf8
=head1 NAME
perl5184delta - what is new for perl v5.18.4
=head1 DESCRIPTION
This document describes differences between the 5.18.4 release and the 5.18.2
release. B<Please note:> This document ignores perl 5.18.3, a broken release
which existed for a few hours only.
If you are upgrading from an earlier release such as 5.18.1, first read
L<perl5182delta>, which describes differences between 5.18.1 and 5.18.2.
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
=over 4
=item *
L<Digest::SHA> has been upgraded from 5.84_01 to 5.84_02.
=item *
L<perl5db.pl> has been upgraded from version 1.39_10 to 1.39_11.
This fixes a crash in tab completion, where available. [perl #120827] Also,
filehandle information is properly reset after a pager is run. [perl #121456]
=back
=head1 Platform Support
=head2 Platform-Specific Notes
=over 4
=item Win32
=over 4
=item *
Introduced by
L<perl #113536|https://rt.perl.org/Public/Bug/Display.html?id=113536>, a memory
leak on every call to C<system> and backticks (C< `` >), on most Win32 Perls
starting from 5.18.0 has been fixed. The memory leak only occurred if you
enabled pseudo-fork in your build of Win32 Perl, and were running that build on
Server 2003 R2 or newer OS. The leak does not appear on WinXP SP3.
[L<perl #121676|https://rt.perl.org/Public/Bug/Display.html?id=121676>]
=back
=back
=head1 Selected Bug Fixes
=over 4
=item *
The debugger now properly resets filehandles as needed. [perl #121456]
=item *
A segfault in Digest::SHA has been addressed. [perl #121421]
=item *
perl can again be built with USE_64_BIT_INT, with Visual C 2003, 32 bit.
[perl #120925]
=item *
A leading { (brace) in formats is properly parsed again. [perl #119973]
=item *
Copy the values used to perturb hash iteration when cloning an
interpreter. This was fairly harmless but caused C<valgrind> to
complain. [perl #121336]
=item *
In Perl v5.18 C<undef *_; goto &sub> and C<local *_; goto &sub> started
crashing. This has been fixed. [perl #119949]
=back
=head1 Acknowledgements
Perl 5.18.4 represents approximately 9 months of development since Perl 5.18.2
and contains approximately 2,000 lines of changes across 53 files from 13
authors.
Perl continues to flourish into its third decade thanks to a vibrant community
of users and developers. The following people are known to have contributed the
improvements that became Perl 5.18.4:
Daniel Dragan, David Mitchell, Doug Bell, Father Chrysostomos, Hiroo Hayashi,
James E Keenan, Karl Williamson, Mark Shelor, Ricardo Signes, Shlomi Fish,
Smylers, Steve Hay, Tony Cook.
The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.
Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.
For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles recently
posted to the comp.lang.perl.misc newsgroup and the perl bug database at
http://rt.perl.org/perlbug/ . There may also be information at
http://www.perl.org/ , the Perl Home Page.
If you believe you have an unreported bug, please run the L<perlbug> program
included with your release. Be sure to trim your bug down to a tiny but
sufficient test case. Your bug report, along with the output of C<perl -V>,
will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
If the bug you are reporting has security implications, which make it
inappropriate to send to a publicly archived mailing list, then please send it
to perl5-security-report@perl.org. This points to a closed subscription
unarchived mailing list, which includes all the core committers, who will be
able to help assess the impact of issues, figure out a resolution, and help
co-ordinate the release of patches to mitigate or fix the problem across all
platforms on which Perl is supported. Please only use this address for
security issues in the Perl core, not for modules independently distributed on
CPAN.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details on
what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,410 @@
=encoding utf8
=head1 NAME
perl5201delta - what is new for perl v5.20.1
=head1 DESCRIPTION
This document describes differences between the 5.20.0 release and the 5.20.1
release.
If you are upgrading from an earlier release such as 5.18.0, first read
L<perl5200delta>, which describes differences between 5.18.0 and 5.20.0.
=head1 Incompatible Changes
There are no changes intentionally incompatible with 5.20.0. If any exist,
they are bugs, and we request that you submit a report. See L</Reporting Bugs>
below.
=head1 Performance Enhancements
=over 4
=item *
An optimization to avoid problems with COW and deliberately overallocated PVs
has been disabled because it interfered with another, more important,
optimization, causing a slowdown on some platforms.
L<[perl #121975]|https://rt.perl.org/Ticket/Display.html?id=121975>
=item *
Returning a string from a lexical variable could be slow in some cases. This
has now been fixed.
L<[perl #121977]|https://rt.perl.org/Ticket/Display.html?id=121977>
=back
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
=over 4
=item *
L<Config::Perl::V> has been upgraded from version 0.20 to 0.22.
The list of Perl versions covered has been updated and some flaws in the
parsing have been fixed.
=item *
L<Exporter> has been upgraded from version 5.70 to 5.71.
Illegal POD syntax in the documentation has been corrected.
=item *
L<ExtUtils::CBuilder> has been upgraded from version 0.280216 to 0.280217.
Android builds now link to both B<-lperl> and C<$Config::Config{perllibs}>.
=item *
L<File::Copy> has been upgraded from version 2.29 to 2.30.
The documentation now notes that C<copy> will not overwrite read-only files.
=item *
L<Module::CoreList> has been upgraded from version 3.11 to 5.020001.
The list of Perl versions covered has been updated.
=item *
The PathTools module collection has been upgraded from version 3.47 to 3.48.
Fallbacks are now in place when cross-compiling for Android and
C<$Config::Config{sh}> is not yet defined.
L<[perl #121963]|https://rt.perl.org/Ticket/Display.html?id=121963>
=item *
L<PerlIO::via> has been upgraded from version 0.14 to 0.15.
A minor portability improvement has been made to the XS implementation.
=item *
L<Unicode::UCD> has been upgraded from version 0.57 to 0.58.
The documentation includes many clarifications and fixes.
=item *
L<utf8> has been upgraded from version 1.13 to 1.13_01.
The documentation has some minor formatting improvements.
=item *
L<version> has been upgraded from version 0.9908 to 0.9909.
External libraries and Perl may have different ideas of what the locale is.
This is problematic when parsing version strings if the locale's numeric
separator has been changed. Version parsing has been patched to ensure it
handles the locales correctly.
L<[perl #121930]|https://rt.perl.org/Ticket/Display.html?id=121930>
=back
=head1 Documentation
=head2 Changes to Existing Documentation
=head3 L<perlapi>
=over 4
=item *
C<av_len> - Emphasize that this returns the highest index in the array, not the
size of the array.
L<[perl #120386]|https://rt.perl.org/Ticket/Display.html?id=120386>
=item *
Note that C<SvSetSV> doesn't do set magic.
=item *
C<sv_usepvn_flags> - Fix documentation to mention the use of C<NewX> instead of
C<malloc>.
L<[perl #121869]|https://rt.perl.org/Ticket/Display.html?id=121869>
=item *
Clarify where C<NUL> may be embedded or is required to terminate a string.
=back
=head3 L<perlfunc>
=over 4
=item *
Clarify the meaning of C<-B> and C<-T>.
=item *
C<-l> now notes that it will return false if symlinks aren't supported by the
file system.
L<[perl #121523]|https://rt.perl.org/Ticket/Display.html?id=121523>
=item *
Note that C<each>, C<keys> and C<values> may produce different orderings for
tied hashes compared to other perl hashes.
L<[perl #121404]|https://rt.perl.org/Ticket/Display.html?id=121404>
=item *
Note that C<exec LIST> and C<system LIST> may fall back to the shell on Win32.
Only C<exec PROGRAM LIST> and C<system PROGRAM LIST> indirect object syntax
will reliably avoid using the shell. This has also been noted in L<perlport>.
L<[perl #122046]|https://rt.perl.org/Ticket/Display.html?id=122046>
=item *
Clarify the meaning of C<our>.
L<[perl #122132]|https://rt.perl.org/Ticket/Display.html?id=122132>
=back
=head3 L<perlguts>
=over 4
=item *
Explain various ways of modifying an existing SV's buffer.
L<[perl #116925]|https://rt.perl.org/Ticket/Display.html?id=116925>
=back
=head3 L<perlpolicy>
=over 4
=item *
We now have a code of conduct for the I<< p5p >> mailing list, as documented in
L<< perlpolicy/STANDARDS OF CONDUCT >>.
=back
=head3 L<perlre>
=over 4
=item *
The C</x> modifier has been clarified to note that comments cannot be continued
onto the next line by escaping them.
=back
=head3 L<perlsyn>
=over 4
=item *
Mention the use of empty conditionals in C<for>/C<while> loops for infinite
loops.
=back
=head3 L<perlxs>
=over 4
=item *
Added a discussion of locale issues in XS code.
=back
=head1 Diagnostics
The following additions or changes have been made to diagnostic output,
including warnings and fatal error messages. For the complete list of
diagnostic messages, see L<perldiag>.
=head2 Changes to Existing Diagnostics
=over 4
=item *
L<Variable length lookbehind not implemented in regex mE<sol>%sE<sol>|perldiag/"Variable length lookbehind not implemented in regex m/%s/">
Information about Unicode behaviour has been added.
=back
=head1 Configuration and Compilation
=over 4
=item *
Building Perl no longer writes to the source tree when configured with
F<Configure>'s B<-Dmksymlinks> option.
L<[perl #121585]|https://rt.perl.org/Ticket/Display.html?id=121585>
=back
=head1 Platform Support
=head2 Platform-Specific Notes
=over 4
=item Android
Build support has been improved for cross-compiling in general and for Android
in particular.
=item OpenBSD
Corrected architectures and version numbers used in configuration hints when
building Perl.
=item Solaris
B<c99> options have been cleaned up, hints look for B<solstudio> as well as
B<SUNWspro>, and support for native C<setenv> has been added.
=item VMS
An old bug in feature checking, mainly affecting pre-7.3 systems, has been
fixed.
=item Windows
C<%I64d> is now being used instead of C<%lld> for MinGW.
=back
=head1 Internal Changes
=over 4
=item *
Added L<perlapi/sync_locale>.
Changing the program's locale should be avoided by XS code. Nevertheless,
certain non-Perl libraries called from XS, such as C<Gtk> do so. When this
happens, Perl needs to be told that the locale has changed. Use this function
to do so, before returning to Perl.
=back
=head1 Selected Bug Fixes
=over 4
=item *
A bug has been fixed where zero-length assertions and code blocks inside of a
regex could cause C<pos> to see an incorrect value.
L<[perl #122460]|https://rt.perl.org/Ticket/Display.html?id=122460>
=item *
Using C<s///e> on tainted utf8 strings could issue bogus "Malformed UTF-8
character (unexpected end of string)" warnings. This has now been fixed.
L<[perl #122148]|https://rt.perl.org/Ticket/Display.html?id=122148>
=item *
C<system> and friends should now work properly on more Android builds.
Due to an oversight, the value specified through B<-Dtargetsh> to F<Configure>
would end up being ignored by some of the build process. This caused perls
cross-compiled for Android to end up with defective versions of C<system>,
C<exec> and backticks: the commands would end up looking for F</bin/sh> instead
of F</system/bin/sh>, and so would fail for the vast majority of devices,
leaving C<$!> as C<ENOENT>.
=item *
Many issues have been detected by L<Coverity|http://www.coverity.com/> and
fixed.
=back
=head1 Acknowledgements
Perl 5.20.1 represents approximately 4 months of development since Perl 5.20.0
and contains approximately 12,000 lines of changes across 170 files from 36
authors.
Excluding auto-generated files, documentation and release tools, there were
approximately 2,600 lines of changes to 110 .pm, .t, .c and .h files.
Perl continues to flourish into its third decade thanks to a vibrant community
of users and developers. The following people are known to have contributed
the improvements that became Perl 5.20.1:
Aaron Crane, Abigail, Alberto Simões, Alexandr Ciornii, Alexandre (Midnite)
Jousset, Andrew Fresh, Andy Dougherty, Brian Fraser, Chris 'BinGOs' Williams,
Craig A. Berry, Daniel Dragan, David Golden, David Mitchell, H.Merijn Brand,
James E Keenan, Jan Dubois, Jarkko Hietaniemi, John Peacock, kafka, Karen
Etheridge, Karl Williamson, Lukas Mai, Matthew Horsfall, Michael Bunk, Peter
Martini, Rafael Garcia-Suarez, Reini Urban, Ricardo Signes, Shirakata Kentaro,
Smylers, Steve Hay, Thomas Sibley, Todd Rinaldo, Tony Cook, Vladimir Marek,
Yves Orton.
The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.
Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.
For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles recently
posted to the comp.lang.perl.misc newsgroup and the perl bug database at
https://rt.perl.org/ . There may also be information at http://www.perl.org/ ,
the Perl Home Page.
If you believe you have an unreported bug, please run the L<perlbug> program
included with your release. Be sure to trim your bug down to a tiny but
sufficient test case. Your bug report, along with the output of C<perl -V>,
will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
If the bug you are reporting has security implications, which make it
inappropriate to send to a publicly archived mailing list, then please send it
to perl5-security-report@perl.org. This points to a closed subscription
unarchived mailing list, which includes all the core committers, who will be
able to help assess the impact of issues, figure out a resolution, and help
co-ordinate the release of patches to mitigate or fix the problem across all
platforms on which Perl is supported. Please only use this address for
security issues in the Perl core, not for modules independently distributed on
CPAN.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details on
what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,415 @@
=encoding utf8
=head1 NAME
perl5202delta - what is new for perl v5.20.2
=head1 DESCRIPTION
This document describes differences between the 5.20.1 release and the 5.20.2
release.
If you are upgrading from an earlier release such as 5.20.0, first read
L<perl5201delta>, which describes differences between 5.20.0 and 5.20.1.
=head1 Incompatible Changes
There are no changes intentionally incompatible with 5.20.1. If any exist,
they are bugs, and we request that you submit a report. See L</Reporting Bugs>
below.
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
=over 4
=item *
L<attributes> has been upgraded from version 0.22 to 0.23.
The usage of C<memEQs> in the XS has been corrected.
L<[perl #122701]|https://rt.perl.org/Ticket/Display.html?id=122701>
=item *
L<Data::Dumper> has been upgraded from version 2.151 to 2.151_01.
Fixes CVE-2014-4330 by adding a configuration variable/option to limit
recursion when dumping deep data structures.
=item *
L<Errno> has been upgraded from version 1.20_03 to 1.20_05.
Warnings when building the XS on Windows with the Visual C++ compiler are now
avoided.
=item *
L<feature> has been upgraded from version 1.36 to 1.36_01.
The C<postderef> feature has now been documented. This feature was actually
added in Perl 5.20.0 but was accidentally omitted from the feature
documentation until now.
=item *
L<IO::Socket> has been upgraded from version 1.37 to 1.38.
Document the limitations of the connected() method.
L<[perl #123096]|https://rt.perl.org/Ticket/Display.html?id=123096>
=item *
L<Module::CoreList> has been upgraded from version 5.020001 to 5.20150214.
The list of Perl versions covered has been updated.
=item *
PathTools has been upgraded from version 3.48 to 3.48_01.
A warning from the B<gcc> compiler is now avoided when building the XS.
=item *
L<PerlIO::scalar> has been upgraded from version 0.18 to 0.18_01.
Reading from a position well past the end of the scalar now correctly returns
end of file.
L<[perl #123443]|https://rt.perl.org/Ticket/Display.html?id=123443>
Seeking to a negative position still fails, but no longer leaves the file
position set to a negation location.
C<eof()> on a C<PerlIO::scalar> handle now properly returns true when the file
position is past the 2GB mark on 32-bit systems.
=item *
L<Storable> has been upgraded from version 2.49 to 2.49_01.
Minor grammatical change to the documentation only.
=item *
L<VMS::DCLsym> has been upgraded from version 1.05 to 1.05_01.
Minor formatting change to the documentation only.
=item *
L<VMS::Stdio> has been upgraded from version 2.4 to 2.41.
Minor formatting change to the documentation only.
=back
=head1 Documentation
=head2 New Documentation
=head3 L<perlunicook>
This document, by Tom Christiansen, provides examples of handling Unicode in
Perl.
=head2 Changes to Existing Documentation
=head3 L<perlexperiment>
=over 4
=item *
Added reference to subroutine signatures. This feature was actually added in
Perl 5.20.0 but was accidentally omitted from the experimental feature
documentation until now.
=back
=head3 L<perlpolicy>
=over 4
=item *
The process whereby features may graduate from experimental status has now been
formally documented.
=back
=head3 L<perlsyn>
=over 4
=item *
An ambiguity in the documentation of the ellipsis statement has been corrected.
L<[perl #122661]|https://rt.perl.org/Ticket/Display.html?id=122661>
=back
=head1 Diagnostics
The following additions or changes have been made to diagnostic output,
including warnings and fatal error messages. For the complete list of
diagnostic messages, see L<perldiag>.
=head2 Changes to Existing Diagnostics
=over 4
=item *
L<Bad symbol for scalar|perldiag/"Bad symbol for scalar"> is now documented.
This error is not new, but was not previously documented here.
=item *
L<Missing right brace on \N{}|perldiag/"Missing right brace on \N{}"> is now
documented. This error is not new, but was not previously documented here.
=back
=head1 Testing
=over 4
=item *
The test script F<re/rt122747.t> has been added to verify that
L<perl #122747|https://rt.perl.org/Ticket/Display.html?id=122747> remains
fixed.
=back
=head1 Platform Support
=head2 Regained Platforms
IRIX and Tru64 platforms are working again. (Some C<make test> failures
remain.)
=head1 Selected Bug Fixes
=over 4
=item *
AIX now sets the length in C<< getsockopt >> correctly.
L<[perl #120835]|https://rt.perl.org/Ticket/Display.html?id=120835>,
L<[cpan #91183]|https://rt.cpan.org/Ticket/Display.html?id=91183>,
L<[cpan #85570]|https://rt.cpan.org/Ticket/Display.html?id=85570>
=item *
In Perl 5.20.0, C<$^N> accidentally had the internal UTF8 flag turned off if
accessed from a code block within a regular expression, effectively
UTF8-encoding the value. This has been fixed.
L<[perl #123135]|https://rt.perl.org/Ticket/Display.html?id=123135>
=item *
Various cases where the name of a sub is used (autoload, overloading, error
messages) used to crash for lexical subs, but have been fixed.
=item *
An assertion failure when parsing C<sort> with debugging enabled has been
fixed.
L<[perl #122771]|https://rt.perl.org/Ticket/Display.html?id=122771>
=item *
Loading UTF8 tables during a regular expression match could cause assertion
failures under debugging builds if the previous match used the very same
regular expression.
L<[perl #122747]|https://rt.perl.org/Ticket/Display.html?id=122747>
=item *
Due to a mistake in the string-copying logic, copying the value of a state
variable could instead steal the value and undefine the variable. This bug,
introduced in Perl 5.20, would happen mostly for long strings (1250 chars or
more), but could happen for any strings under builds with copy-on-write
disabled.
L<[perl #123029]|https://rt.perl.org/Ticket/Display.html?id=123029>
=item *
Fixed a bug that could cause perl to execute an infinite loop during
compilation.
L<[perl #122995]|https://rt.perl.org/Ticket/Display.html?id=122995>
=item *
On Win32, restoring in a child pseudo-process a variable that was C<local()>ed
in a parent pseudo-process before the C<fork> happened caused memory corruption
and a crash in the child pseudo-process (and therefore OS process).
L<[perl #40565]|https://rt.perl.org/Ticket/Display.html?id=40565>
=item *
Tainted constants evaluated at compile time no longer cause unrelated
statements to become tainted.
L<[perl #122669]|https://rt.perl.org/Ticket/Display.html?id=122669>
=item *
Calling C<write> on a format with a C<^**> field could produce a panic in
sv_chop() if there were insufficient arguments or if the variable used to fill
the field was empty.
L<[perl #123245]|https://rt.perl.org/Ticket/Display.html?id=123245>
=item *
In Perl 5.20.0, C<sort CORE::fake> where 'fake' is anything other than a
keyword started chopping of the last 6 characters and treating the result as a
sort sub name. The previous behaviour of treating "CORE::fake" as a sort sub
name has been restored.
L<[perl #123410]|https://rt.perl.org/Ticket/Display.html?id=123410>
=item *
A bug in regular expression patterns that could lead to segfaults and other
crashes has been fixed. This occurred only in patterns compiled with C<"/i">,
while taking into account the current POSIX locale (this usually means they
have to be compiled within the scope of C<S<"use locale">>), and there must be
a string of at least 128 consecutive bytes to match.
L<[perl #123539]|https://rt.perl.org/Ticket/Display.html?id=123539>
=item *
C<qr/@array(?{block})/> no longer dies with "Bizarre copy of ARRAY".
L<[perl #123344]|https://rt.perl.org/Ticket/Display.html?id=123344>
=item *
C<gmtime> no longer crashes with not-a-number values.
L<[perl #123495]|https://rt.perl.org/Ticket/Display.html?id=123495>
=item *
Certain syntax errors in substitutions, such as C<< s/${<>{})// >>, would
crash, and had done so since Perl 5.10. (In some cases the crash did not start
happening until Perl 5.16.) The crash has, of course, been fixed.
L<[perl #123542]|https://rt.perl.org/Ticket/Display.html?id=123542>
=item *
A memory leak in some regular expressions, introduced in Perl 5.20.1, has been
fixed.
L<[perl #123198]|https://rt.perl.org/Ticket/Display.html?id=123198>
=item *
C<< formline("@...", "a"); >> would crash. The C<FF_CHECKNL> case in
pp_formline() didn't set the pointer used to mark the chop position, which led
to the C<FF_MORE> case crashing with a segmentation fault. This has been
fixed.
L<[perl #123538]|https://rt.perl.org/Ticket/Display.html?id=123538>
L<[perl #123622]|https://rt.perl.org/Ticket/Display.html?id=123622>
=item *
A possible buffer overrun and crash when parsing a literal pattern during
regular expression compilation has been fixed.
L<[perl #123604]|https://rt.perl.org/Ticket/Display.html?id=123604>
=back
=head1 Known Problems
=over 4
=item *
It is a known bug that lexical subroutines cannot be used as the C<SUBNAME>
argument to C<sort>. This will be fixed in a future version of Perl.
=back
=head1 Errata From Previous Releases
=over 4
=item *
A regression has been fixed that was introduced in Perl 5.20.0 (fixed in Perl
5.20.1 as well as here) in which a UTF-8 encoded regular expression pattern
that contains a single ASCII lowercase letter does not match its uppercase
counterpart.
L<[perl #122655]|https://rt.perl.org/Ticket/Display.html?id=122655>
=back
=head1 Acknowledgements
Perl 5.20.2 represents approximately 5 months of development since Perl 5.20.1
and contains approximately 6,300 lines of changes across 170 files from 34
authors.
Excluding auto-generated files, documentation and release tools, there were
approximately 1,900 lines of changes to 80 .pm, .t, .c and .h files.
Perl continues to flourish into its third decade thanks to a vibrant community
of users and developers. The following people are known to have contributed
the improvements that became Perl 5.20.2:
Aaron Crane, Abigail, Andreas Voegele, Andy Dougherty, Anthony Heading,
Aristotle Pagaltzis, Chris 'BinGOs' Williams, Craig A. Berry, Daniel Dragan,
Doug Bell, Ed J, Father Chrysostomos, Glenn D. Golden, H.Merijn Brand, Hugo van
der Sanden, James E Keenan, Jarkko Hietaniemi, Jim Cromie, Karen Etheridge,
Karl Williamson, kmx, Matthew Horsfall, Max Maischein, Peter Martini, Rafael
Garcia-Suarez, Ricardo Signes, Shlomi Fish, Slaven Rezic, Steffen Müller,
Steve Hay, Tadeusz Sośnierz, Tony Cook, Yves Orton, Ævar Arnfjörð
Bjarmason.
The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.
Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.
For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles recently
posted to the comp.lang.perl.misc newsgroup and the perl bug database at
https://rt.perl.org/ . There may also be information at http://www.perl.org/ ,
the Perl Home Page.
If you believe you have an unreported bug, please run the L<perlbug> program
included with your release. Be sure to trim your bug down to a tiny but
sufficient test case. Your bug report, along with the output of C<perl -V>,
will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
If the bug you are reporting has security implications, which make it
inappropriate to send to a publicly archived mailing list, then please send it
to perl5-security-report@perl.org. This points to a closed subscription
unarchived mailing list, which includes all the core committers, who will be
able to help assess the impact of issues, figure out a resolution, and help
co-ordinate the release of patches to mitigate or fix the problem across all
platforms on which Perl is supported. Please only use this address for
security issues in the Perl core, not for modules independently distributed on
CPAN.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details on
what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,312 @@
=encoding utf8
=head1 NAME
perl5203delta - what is new for perl v5.20.3
=head1 DESCRIPTION
This document describes differences between the 5.20.2 release and the 5.20.3
release.
If you are upgrading from an earlier release such as 5.20.1, first read
L<perl5202delta>, which describes differences between 5.20.1 and 5.20.2.
=head1 Incompatible Changes
There are no changes intentionally incompatible with 5.20.2. If any exist,
they are bugs, and we request that you submit a report. See L</Reporting Bugs>
below.
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
=over 4
=item *
L<Errno> has been upgraded from version 1.20_05 to 1.20_06.
Add B<-P> to the pre-processor command-line on GCC 5. GCC added extra line
directives, breaking parsing of error code definitions.
L<[perl #123784]|https://rt.perl.org/Ticket/Display.html?id=123784>
=item *
L<Module::CoreList> has been upgraded from version 5.20150214 to 5.20150822.
Updated to cover the latest releases of Perl.
=item *
L<perl5db.pl> has been upgraded from 1.44 to 1.44_01.
The debugger would cause an assertion failure.
L<[perl #124127]|https://rt.perl.org/Ticket/Display.html?id=124127>
=back
=head1 Documentation
=head2 Changes to Existing Documentation
=head3 L<perlfunc>
=over 4
=item *
Mention that L<C<study()>|perlfunc/study> is currently a no-op.
=back
=head3 L<perlguts>
=over 4
=item *
The OOK example has been updated to account for COW changes and a change in the
storage of the offset.
=back
=head3 L<perlhacktips>
=over 4
=item *
Documentation has been added illustrating the perils of assuming the contents
of static memory pointed to by the return values of Perl wrappers for C library
functions doesn't change.
=back
=head3 L<perlpodspec>
=over 4
=item *
The specification of the POD language is changing so that the default encoding
of PODs that aren't in UTF-8 (unless otherwise indicated) is CP1252 instead of
ISO-8859-1 (Latin1).
=back
=head1 Utility Changes
=head2 L<h2ph>
=over 4
=item *
B<h2ph> now handles hexadecimal constants in the compiler's predefined macro
definitions, as visible in C<$Config{cppsymbols}>.
L<[perl #123784]|https://rt.perl.org/Ticket/Display.html?id=123784>
=back
=head1 Testing
=over 4
=item *
F<t/perf/taint.t> has been added to see if optimisations with taint issues are
keeping things fast.
=item *
F<t/porting/re_context.t> has been added to test that L<utf8> and its
dependencies only use the subset of the C<$1..$n> capture vars that
Perl_save_re_context() is hard-coded to localize, because that function has no
efficient way of determining at runtime what vars to localize.
=back
=head1 Platform Support
=head2 Platform-Specific Notes
=over 4
=item Win32
=over 4
=item *
Previously, when compiling with a 64-bit Visual C++, every Perl XS module
(including CPAN ones) and Perl aware C file would unconditionally have around a
dozen warnings from F<hv_func.h>. These warnings have been silenced. GCC (all
bitness) and 32-bit Visual C++ were not affected.
=item *
B<miniperl.exe> is now built with B<-fno-strict-aliasing>, allowing 64-bit
builds to complete with GCC 4.8.
L<[perl #123976]|https://rt.perl.org/Ticket/Display.html?id=123976>
=back
=back
=head1 Selected Bug Fixes
=over 4
=item *
Repeated global pattern matches in scalar context on large tainted strings were
exponentially slow depending on the current match position in the string.
L<[perl #123202]|https://rt.perl.org/Ticket/Display.html?id=123202>
=item *
The original visible value of L<C<$E<sol>>|perlvar/$E<sol>> is now preserved
when it is set to an invalid value. Previously if you set C<$/> to a reference
to an array, for example, perl would produce a runtime error and not set PL_rs,
but Perl code that checked C<$/> would see the array reference.
L<[perl #123218]|https://rt.perl.org/Ticket/Display.html?id=123218>
=item *
Perl 5.14.0 introduced a bug whereby C<eval { LABEL: }> would crash. This has
been fixed.
L<[perl #123652]|https://rt.perl.org/Ticket/Display.html?id=123652>
=item *
Extending an array cloned from a parent thread could result in "Modification of
a read-only value attempted" errors when attempting to modify the new elements.
L<[perl #124127]|https://rt.perl.org/Ticket/Display.html?id=124127>
=item *
Several cases of data used to store environment variable contents in core C
code being potentially overwritten before being used have been fixed.
L<[perl #123748]|https://rt.perl.org/Ticket/Display.html?id=123748>
=item *
UTF-8 variable names used in array indexes, unquoted UTF-8 HERE-document
terminators and UTF-8 function names all now work correctly.
L<[perl #124113]|https://rt.perl.org/Ticket/Display.html?id=124113>
=item *
A subtle bug introduced in Perl 5.20.2 involving UTF-8 in regular expressions
and sometimes causing a crash has been fixed. A new test script has been added
to test this fix; see under L</Testing>.
L<[perl #124109]|https://rt.perl.org/Ticket/Display.html?id=124109>
=item *
Some patterns starting with C</.*..../> matched against long strings have been
slow since Perl 5.8, and some of the form C</.*..../i> have been slow since
Perl 5.18. They are now all fast again.
L<[perl #123743]|https://rt.perl.org/Ticket/Display.html?id=123743>
=item *
Warning fatality is now ignored when rewinding the stack. This prevents
infinite recursion when the now fatal error also causes rewinding of the stack.
L<[perl #123398]|https://rt.perl.org/Ticket/Display.html?id=123398>
=item *
C<setpgrp($nonzero)> (with one argument) was accidentally changed in Perl 5.16
to mean C<setpgrp(0)>. This has been fixed.
=item *
A crash with C<< %::=(); J->${\"::"} >> has been fixed.
L<[perl #125541]|https://rt.perl.org/Ticket/Display.html?id=125541>
=item *
Regular expression possessive quantifier Perl 5.20 regression now fixed.
C<qr/>I<PAT>C<{>I<min>,I<max>C<}+>C</> is supposed to behave identically to
C<qr/(?E<gt>>I<PAT>C<{>I<min>,I<max>C<})/>. Since Perl 5.20, this didn't work
if I<min> and I<max> were equal.
L<[perl #125825]|https://rt.perl.org/Ticket/Display.html?id=125825>
=item *
Code like C</$a[/> used to read the next line of input and treat it as though
it came immediately after the opening bracket. Some invalid code consequently
would parse and run, but some code caused crashes, so this is now disallowed.
L<[perl #123712]|https://rt.perl.org/Ticket/Display.html?id=123712>
=back
=head1 Acknowledgements
Perl 5.20.3 represents approximately 7 months of development since Perl 5.20.2
and contains approximately 3,200 lines of changes across 99 files from 26
authors.
Excluding auto-generated files, documentation and release tools, there were
approximately 1,500 lines of changes to 43 .pm, .t, .c and .h files.
Perl continues to flourish into its third decade thanks to a vibrant community
of users and developers. The following people are known to have contributed
the improvements that became Perl 5.20.3:
Alex Vandiver, Andy Dougherty, Aristotle Pagaltzis, Chris 'BinGOs' Williams,
Craig A. Berry, Dagfinn Ilmari Mannsåker, Daniel Dragan, David Mitchell,
Father Chrysostomos, H.Merijn Brand, James E Keenan, James McCoy, Jarkko
Hietaniemi, Karen Etheridge, Karl Williamson, kmx, Lajos Veres, Lukas Mai,
Matthew Horsfall, Petr Písař, Randy Stauner, Ricardo Signes, Sawyer X, Steve
Hay, Tony Cook, Yves Orton.
The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.
Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.
For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles recently
posted to the comp.lang.perl.misc newsgroup and the perl bug database at
https://rt.perl.org/ . There may also be information at
http://www.perl.org/ , the Perl Home Page.
If you believe you have an unreported bug, please run the L<perlbug> program
included with your release. Be sure to trim your bug down to a tiny but
sufficient test case. Your bug report, along with the output of C<perl -V>,
will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
If the bug you are reporting has security implications, which make it
inappropriate to send to a publicly archived mailing list, then please send it
to perl5-security-report@perl.org. This points to a closed subscription
unarchived mailing list, which includes all the core committers, who will be
able to help assess the impact of issues, figure out a resolution, and help
co-ordinate the release of patches to mitigate or fix the problem across all
platforms on which Perl is supported. Please only use this address for
security issues in the Perl core, not for modules independently distributed on
CPAN.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details on
what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,338 @@
=encoding utf8
=head1 NAME
perl5221delta - what is new for perl v5.22.1
=head1 DESCRIPTION
This document describes differences between the 5.22.0 release and the 5.22.1
release.
If you are upgrading from an earlier release such as 5.20.0, first read
L<perl5220delta>, which describes differences between 5.20.0 and 5.22.0.
=head1 Incompatible Changes
There are no changes intentionally incompatible with 5.20.0 other than the
following single exception, which we deemed to be a sensible change to make in
order to get the new C<\b{wb}> and (in particular) C<\b{sb}> features sane
before people decided they're worthless because of bugs in their Perl 5.22.0
implementation and avoided them in the future.
If any others exist, they are bugs, and we request that you submit a report.
See L</Reporting Bugs> below.
=head2 Bounds Checking Constructs
Several bugs, including a segmentation fault, have been fixed with the bounds
checking constructs (introduced in Perl 5.22) C<\b{gcb}>, C<\b{sb}>, C<\b{wb}>,
C<\B{gcb}>, C<\B{sb}>, and C<\B{wb}>. All the C<\B{}> ones now match an empty
string; none of the C<\b{}> ones do.
L<[perl #126319]|https://rt.perl.org/Ticket/Display.html?id=126319>
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
=over 4
=item *
L<Module::CoreList> has been upgraded from version 5.20150520 to 5.20151213.
=item *
L<PerlIO::scalar> has been upgraded from version 0.22 to 0.23.
=item *
L<POSIX> has been upgraded from version 1.53 to 1.53_01.
If C<POSIX::strerror> was passed C<$!> as its argument then it accidentally
cleared C<$!>. This has been fixed.
L<[perl #126229]|https://rt.perl.org/Ticket/Display.html?id=126229>
=item *
L<Storable> has been upgraded from version 2.53 to 2.53_01.
=item *
L<warnings> has been upgraded from version 1.32 to 1.34.
The C<warnings::enabled> example now actually uses C<warnings::enabled>.
L<[perl #126051]|https://rt.perl.org/Ticket/Display.html?id=126051>
=item *
L<Win32> has been upgraded from version 0.51 to 0.52.
This has been updated for Windows 8.1, 10 and 2012 R2 Server.
=back
=head1 Documentation
=head2 Changes to Existing Documentation
=head3 L<perltie>
=over 4
=item *
The usage of C<FIRSTKEY> and C<NEXTKEY> has been clarified.
=back
=head3 L<perlvar>
=over 4
=item *
The specific true value of C<$!{E...}> is now documented, noting that it is
subject to change and not guaranteed.
=back
=head1 Diagnostics
The following additions or changes have been made to diagnostic output,
including warnings and fatal error messages. For the complete list of
diagnostic messages, see L<perldiag>.
=head2 Changes to Existing Diagnostics
=over 4
=item *
The C<printf> and C<sprintf> builtins are now more careful about the warnings
they emit: argument reordering now disables the "redundant argument" warning in
all cases.
L<[perl #125469]|https://rt.perl.org/Ticket/Display.html?id=125469>
=back
=head1 Configuration and Compilation
=over 4
=item *
Using the C<NO_HASH_SEED> define in combination with the default hash algorithm
C<PERL_HASH_FUNC_ONE_AT_A_TIME_HARD> resulted in a fatal error while compiling
the interpreter, since Perl 5.17.10. This has been fixed.
=item *
Configuring with ccflags containing quotes (e.g.
C<< -Accflags='-DAPPLLIB_EXP=\"/usr/libperl\"' >>) was broken in Perl 5.22.0
but has now been fixed again.
L<[perl #125314]|https://rt.perl.org/Ticket/Display.html?id=125314>
=back
=head1 Platform Support
=head2 Platform-Specific Notes
=over 4
=item IRIX
=over
=item *
Under some circumstances IRIX stdio fgetc() and fread() set the errno to
C<ENOENT>, which made no sense according to either IRIX or POSIX docs. Errno
is now cleared in such cases.
L<[perl #123977]|https://rt.perl.org/Ticket/Display.html?id=123977>
=item *
Problems when multiplying long doubles by infinity have been fixed.
L<[perl #126396]|https://rt.perl.org/Ticket/Display.html?id=126396>
=item *
All tests pass now on IRIX with the default build configuration.
=back
=back
=head1 Selected Bug Fixes
=over 4
=item *
C<qr/(?[ () ])/> no longer segfaults, giving a syntax error message instead.
L<[perl #125805]|https://rt.perl.org/Ticket/Display.html?id=125805>
=item *
Regular expression possessive quantifier Perl 5.20 regression now fixed.
C<qr/>I<PAT>C<{>I<min>,I<max>C<}+>C</> is supposed to behave identically to
C<qr/(?E<gt>>I<PAT>C<{>I<min>,I<max>C<})/>. Since Perl 5.20, this didn't work
if I<min> and I<max> were equal.
L<[perl #125825]|https://rt.perl.org/Ticket/Display.html?id=125825>
=item *
Certain syntax errors in
L<perlrecharclass/Extended Bracketed Character Classes> caused panics instead
of the proper error message. This has now been fixed.
L<[perl #126481]|https://rt.perl.org/Ticket/Display.html?id=126481>
=item *
C<< BEGIN <> >> no longer segfaults and properly produces an error message.
L<[perl #125341]|https://rt.perl.org/Ticket/Display.html?id=125341>
=item *
A regression from Perl 5.20 has been fixed, in which some syntax errors in
L<C<(?[...])>|perlrecharclass/Extended Bracketed Character Classes> constructs
within regular expression patterns could cause a segfault instead of a proper
error message.
L<[perl #126180]|https://rt.perl.org/Ticket/Display.html?id=126180>
=item *
Another problem with
L<C<(?[...])>|perlrecharclass/Extended Bracketed Character Classes>
constructs has been fixed wherein things like C<\c]> could cause panics.
L<[perl #126181]|https://rt.perl.org/Ticket/Display.html?id=126181>
=item *
In Perl 5.22.0, the logic changed when parsing a numeric parameter to the -C
option, such that the successfully parsed number was not saved as the option
value if it parsed to the end of the argument.
L<[perl #125381]|https://rt.perl.org/Ticket/Display.html?id=125381>
=item *
Warning fatality is now ignored when rewinding the stack. This prevents
infinite recursion when the now fatal error also causes rewinding of the stack.
L<[perl #123398]|https://rt.perl.org/Ticket/Display.html?id=123398>
=item *
A crash with C<< %::=(); J->${\"::"} >> has been fixed.
L<[perl #125541]|https://rt.perl.org/Ticket/Display.html?id=125541>
=item *
Nested quantifiers such as C</.{1}??/> should cause perl to throw a fatal
error, but were being silently accepted since Perl 5.20.0. This has been
fixed.
L<[perl #126253]|https://rt.perl.org/Ticket/Display.html?id=126253>
=item *
Regular expression sequences such as C</(?i/> (and similarly with other
recognized flags or combination of flags) should cause perl to throw a fatal
error, but were being silently accepted since Perl 5.18.0. This has been
fixed.
L<[perl #126178]|https://rt.perl.org/Ticket/Display.html?id=126178>
=item *
A bug in hexadecimal floating point literal support meant that high-order bits
could be lost in cases where mantissa overflow was caused by too many trailing
zeros in the fractional part. This has been fixed.
L<[perl #126582]|https://rt.perl.org/Ticket/Display.html?id=126582>
=item *
Another hexadecimal floating point bug, causing low-order bits to be lost in
cases where the last hexadecimal digit of the mantissa has bits straddling the
limit of the number of bits allowed for the mantissa, has also been fixed.
L<[perl #126586]|https://rt.perl.org/Ticket/Display.html?id=126586>
=item *
Further hexadecimal floating point bugs have been fixed: In some circumstances,
the C<%a> format specifier could variously lose the sign of the negative zero,
fail to display zeros after the radix point with the requested precision, or
even lose the radix point after the leftmost hexadecimal digit completely.
=item *
A crash caused by incomplete expressions within C<< /(?[ ])/ >> (e.g.
C<< /(?[[0]+()+])/ >>) has been fixed.
L<[perl #126615]|https://rt.perl.org/Ticket/Display.html?id=126615>
=back
=head1 Acknowledgements
Perl 5.22.1 represents approximately 6 months of development since Perl 5.22.0
and contains approximately 19,000 lines of changes across 130 files from 27
authors.
Excluding auto-generated files, documentation and release tools, there were
approximately 1,700 lines of changes to 44 .pm, .t, .c and .h files.
Perl continues to flourish into its third decade thanks to a vibrant community
of users and developers. The following people are known to have contributed
the improvements that became Perl 5.22.1:
Aaron Crane, Abigail, Andy Broad, Aristotle Pagaltzis, Chase Whitener, Chris
'BinGOs' Williams, Craig A. Berry, Daniel Dragan, David Mitchell, Father
Chrysostomos, Herbert Breunung, Hugo van der Sanden, James E Keenan, Jan
Dubois, Jarkko Hietaniemi, Karen Etheridge, Karl Williamson, Lukas Mai, Matthew
Horsfall, Peter Martini, Rafael Garcia-Suarez, Ricardo Signes, Shlomi Fish,
Sisyphus, Steve Hay, Tony Cook, Victor Adam.
The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.
Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.
For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles recently
posted to the comp.lang.perl.misc newsgroup and the perl bug database at
https://rt.perl.org/ . There may also be information at
http://www.perl.org/ , the Perl Home Page.
If you believe you have an unreported bug, please run the L<perlbug> program
included with your release. Be sure to trim your bug down to a tiny but
sufficient test case. Your bug report, along with the output of C<perl -V>,
will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
If the bug you are reporting has security implications, which make it
inappropriate to send to a publicly archived mailing list, then please send it
to perl5-security-report@perl.org. This points to a closed subscription
unarchived mailing list, which includes all the core committers, who will be
able to help assess the impact of issues, figure out a resolution, and help
co-ordinate the release of patches to mitigate or fix the problem across all
platforms on which Perl is supported. Please only use this address for
security issues in the Perl core, not for modules independently distributed on
CPAN.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details on
what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,386 @@
=encoding utf8
=head1 NAME
perl5222delta - what is new for perl v5.22.2
=head1 DESCRIPTION
This document describes differences between the 5.22.1 release and the 5.22.2
release.
If you are upgrading from an earlier release such as 5.22.0, first read
L<perl5221delta>, which describes differences between 5.22.0 and 5.22.1.
=head1 Security
=head2 Fix out of boundary access in Win32 path handling
This is CVE-2015-8608. For more information see
L<[perl #126755]|https://rt.perl.org/Ticket/Display.html?id=126755>.
=head2 Fix loss of taint in C<canonpath()>
This is CVE-2015-8607. For more information see
L<[perl #126862]|https://rt.perl.org/Ticket/Display.html?id=126862>.
=head2 Set proper umask before calling C<mkstemp(3)>
In 5.22.0 perl started setting umask to C<0600> before calling C<mkstemp(3)>
and restoring it afterwards. This wrongfully tells C<open(2)> to strip the
owner read and write bits from the given mode before applying it, rather than
the intended negation of leaving only those bits in place.
Systems that use mode C<0666> in C<mkstemp(3)> (like old versions of glibc)
create a file with permissions C<0066>, leaving world read and write permissions
regardless of current umask.
This has been fixed by using umask C<0177> instead.
L<[perl #127322]|https://rt.perl.org/Ticket/Display.html?id=127322>
=head2 Avoid accessing uninitialized memory in Win32 C<crypt()>
Validation that will detect both a short salt and invalid characters in the
salt has been added.
L<[perl #126922]|https://rt.perl.org/Ticket/Display.html?id=126922>
=head2 Remove duplicate environment variables from C<environ>
Previously, if an environment variable appeared more than once in C<environ[]>,
L<C<%ENV>|perlvar/%ENV> would contain the last entry for that name, while a
typical C<getenv()> would return the first entry. We now make sure C<%ENV>
contains the same as what C<getenv()> returns.
Secondly, we now remove duplicates from C<environ[]>, so if a setting with that
name is set in C<%ENV> we won't pass an unsafe value to a child process.
This is CVE-2016-2381.
=head1 Incompatible Changes
There are no changes intentionally incompatible with Perl 5.22.1. If any
exist, they are bugs, and we request that you submit a report. See
L</Reporting Bugs> below.
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
=over 4
=item *
L<File::Spec> has been upgraded from version 3.56 to 3.56_01.
C<canonpath()> now preserves taint. See L</"Fix loss of taint in
C<canonpath()>">.
=item *
L<Module::CoreList> has been upgraded from version 5.20151213 to 5.20160429.
The version number of L<Digest::SHA> listed for Perl 5.18.4 was wrong and has
been corrected. Likewise for the version number of L<Config> in 5.18.3 and
5.18.4.
L<[perl #127624]|https://rt.perl.org/Ticket/Display.html?id=127624>
=back
=head1 Documentation
=head2 Changes to Existing Documentation
=head3 L<perldiag>
=over 4
=item *
The explanation of the warning "unable to close filehandle %s properly: %s"
which can occur when doing an implicit close of a filehandle has been expanded
and improved.
=back
=head3 L<perlfunc>
=over 4
=item *
The documentation of L<C<hex()>|perlfunc/hex> has been revised to clarify valid
inputs.
=back
=head1 Configuration and Compilation
=over 4
=item *
Dtrace builds now build successfully on systems with a newer dtrace that
require an input object file that uses the probes in the F<.d> file.
Previously the probe would fail and cause a build failure.
L<[perl #122287]|https://rt.perl.org/Ticket/Display.html?id=122287>
=item *
F<Configure> no longer probes for F<libnm> by default. Originally this was the
"New Math" library, but the name has been re-used by the GNOME NetworkManager.
L<[perl #127131]|https://rt.perl.org/Ticket/Display.html?id=127131>
=item *
F<Configure> now knows about gcc 5.
=item *
Compiling perl with B<-DPERL_MEM_LOG> now works again.
=back
=head1 Platform Support
=head2 Platform-Specific Notes
=over 4
=item Darwin
Compiling perl with B<-Dusecbacktrace> on Darwin now works again.
L<[perl #127764]|https://rt.perl.org/Ticket/Display.html?id=127764>
=item OS X/Darwin
Builds with both B<-DDEBUGGING> and threading enabled would fail with a "panic:
free from wrong pool" error when built or tested from Terminal on OS X. This
was caused by perl's internal management of the environment conflicting with an
atfork handler using the libc C<setenv()> function to update the environment.
Perl now uses C<setenv()>/C<unsetenv()> to update the environment on OS X.
L<[perl #126240]|https://rt.perl.org/Ticket/Display.html?id=126240>
=item ppc64el
The floating point format of ppc64el (Debian naming for little-endian PowerPC)
is now detected correctly.
=item Tru64
A test failure in F<t/porting/extrefs.t> has been fixed.
=back
=head1 Internal Changes
=over 4
=item *
An unwarranted assertion in C<Perl_newATTRSUB_x()> has been removed. If a stub
subroutine definition with a prototype has been seen, then any subsequent stub
(or definition) of the same subroutine with an attribute was causing an
assertion failure because of a null pointer.
L<[perl #126845]|https://rt.perl.org/Ticket/Display.html?id=126845>
=back
=head1 Selected Bug Fixes
=over 4
=item *
Calls to the placeholder C<&PL_sv_yes> used internally when an C<import()> or
C<unimport()> method isn't found now correctly handle scalar context.
L<[perl #126042]|https://rt.perl.org/Ticket/Display.html?id=126042>
=item *
The L<C<pipe()>|perlfunc/pipe> operator would assert for C<DEBUGGING> builds
instead of producing the correct error message. The condition asserted on is
detected and reported on correctly without the assertions, so the assertions
were removed.
L<[perl #126480]|https://rt.perl.org/Ticket/Display.html?id=126480>
=item *
In some cases, failing to parse a here-doc would attempt to use freed memory.
This was caused by a pointer not being restored correctly.
L<[perl #126443]|https://rt.perl.org/Ticket/Display.html?id=126443>
=item *
Perl now reports more context when it sees an array where it expects to see an
operator, and avoids an assertion failure.
L<[perl #123737]|https://rt.perl.org/Ticket/Display.html?id=123737>
=item *
If a here-doc was found while parsing another operator, the parser had already
read end of file, and the here-doc was not terminated, perl could produce an
assertion or a segmentation fault. This now reliably complains about the
unterminated here-doc.
L<[perl #125540]|https://rt.perl.org/Ticket/Display.html?id=125540>
=item *
Parsing beyond the end of the buffer when processing a C<#line> directive with
no filename is now avoided.
L<[perl #127334]|https://rt.perl.org/Ticket/Display.html?id=127334>
=item *
Perl 5.22.0 added support for the C99 hexadecimal floating point notation, but
sometimes misparsed hex floats. This has been fixed.
L<[perl #127183]|https://rt.perl.org/Ticket/Display.html?id=127183>
=item *
Certain regex patterns involving a complemented posix class in an inverted
bracketed character class, and matching something else optionally would
improperly fail to match. An example of one that could fail is
C<qr/_?[^\Wbar]\x{100}/>. This has been fixed.
L<[perl #127537]|https://rt.perl.org/Ticket/Display.html?id=127537>
=item *
Fixed an issue with L<C<pack()>|perlfunc/pack> where C<< pack "H" >> (and
C<< pack "h" >>) could read past the source when given a non-utf8 source and a
utf8 target.
L<[perl #126325]|https://rt.perl.org/Ticket/Display.html?id=126325>
=item *
Fixed some cases where perl would abort due to a segmentation fault, or a
C-level assert.
L<[perl #126193]|https://rt.perl.org/Ticket/Display.html?id=126193>
L<[perl #126257]|https://rt.perl.org/Ticket/Display.html?id=126257>
L<[perl #126258]|https://rt.perl.org/Ticket/Display.html?id=126258>
L<[perl #126405]|https://rt.perl.org/Ticket/Display.html?id=126405>
L<[perl #126602]|https://rt.perl.org/Ticket/Display.html?id=126602>
L<[perl #127773]|https://rt.perl.org/Ticket/Display.html?id=127773>
L<[perl #127786]|https://rt.perl.org/Ticket/Display.html?id=127786>
=item *
A memory leak when setting C<$ENV{foo}> on Darwin has been fixed.
L<[perl #126240]|https://rt.perl.org/Ticket/Display.html?id=126240>
=item *
Perl now correctly raises an error when trying to compile patterns with
unterminated character classes while there are trailing backslashes.
L<[perl #126141]|https://rt.perl.org/Ticket/Display.html?id=126141>
=item *
C<NOTHING> regops and C<EXACTFU_SS> regops in C<make_trie()> are now handled
properly.
L<[perl #126206]|https://rt.perl.org/Ticket/Display.html?id=126206>
=item *
Perl now only tests C<semctl()> if we have everything needed to use it. In
FreeBSD the C<semctl()> entry point may exist, but it can be disabled by
policy.
L<[perl #127533]|https://rt.perl.org/Ticket/Display.html?id=127533>
=item *
A regression that allowed undeclared barewords as hash keys to work despite
strictures has been fixed.
L<[perl #126981]|https://rt.perl.org/Ticket/Display.html?id=126981>
=item *
As an optimization (introduced in Perl 5.20.0), L<C<uc()>|perlfunc/uc>,
L<C<lc()>|perlfunc/lc>, L<C<ucfirst()>|perlfunc/ucfirst> and
L<C<lcfirst()>|perlfunc/lcfirst> sometimes modify their argument in-place
rather than returning a modified copy. The criteria for this optimization has
been made stricter to avoid these functions accidentally modifying in-place
when they should not, which has been happening in some cases, e.g. in
L<List::Util>.
=item *
Excessive memory usage in the compilation of some regular expressions involving
non-ASCII characters has been reduced. A more complete fix is forthcoming in
Perl 5.24.0.
=back
=head1 Acknowledgements
Perl 5.22.2 represents approximately 5 months of development since Perl 5.22.1
and contains approximately 3,000 lines of changes across 110 files from 24
authors.
Excluding auto-generated files, documentation and release tools, there were
approximately 1,500 lines of changes to 52 .pm, .t, .c and .h files.
Perl continues to flourish into its third decade thanks to a vibrant community
of users and developers. The following people are known to have contributed
the improvements that became Perl 5.22.2:
Aaron Crane, Abigail, Andreas König, Aristotle Pagaltzis, Chris 'BinGOs'
Williams, Craig A. Berry, Dagfinn Ilmari Mannsåker, David Golden, David
Mitchell, H.Merijn Brand, James E Keenan, Jarkko Hietaniemi, Karen Etheridge,
Karl Williamson, Matthew Horsfall, Niko Tyni, Ricardo Signes, Sawyer X, Stevan
Little, Steve Hay, Todd Rinaldo, Tony Cook, Vladimir Timofeev, Yves Orton.
The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.
Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.
For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles recently
posted to the comp.lang.perl.misc newsgroup and the perl bug database at
https://rt.perl.org/ . There may also be information at http://www.perl.org/ ,
the Perl Home Page.
If you believe you have an unreported bug, please run the L<perlbug> program
included with your release. Be sure to trim your bug down to a tiny but
sufficient test case. Your bug report, along with the output of C<perl -V>,
will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
If the bug you are reporting has security implications, which make it
inappropriate to send to a publicly archived mailing list, then please send it
to perl5-security-report@perl.org. This points to a closed subscription
unarchived mailing list, which includes all the core committers, who will be
able to help assess the impact of issues, figure out a resolution, and help
co-ordinate the release of patches to mitigate or fix the problem across all
platforms on which Perl is supported. Please only use this address for
security issues in the Perl core, not for modules independently distributed on
CPAN.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details on
what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,314 @@
=encoding utf8
=head1 NAME
perl5223delta - what is new for perl v5.22.3
=head1 DESCRIPTION
This document describes differences between the 5.22.2 release and the 5.22.3
release.
If you are upgrading from an earlier release such as 5.22.1, first read
L<perl5222delta>, which describes differences between 5.22.1 and 5.22.2.
=head1 Security
=head2 B<-Di> switch is now required for PerlIO debugging output
Previously PerlIO debugging output would be sent to the file specified by the
C<PERLIO_DEBUG> environment variable if perl wasn't running setuid and the
B<-T> or B<-t> switches hadn't been parsed yet.
If perl performed output at a point where it hadn't yet parsed its switches
this could result in perl creating or overwriting the file named by
C<PERLIO_DEBUG> even when the B<-T> switch had been supplied.
Perl now requires the B<-Di> switch to produce PerlIO debugging output. By
default this is written to C<stderr>, but can optionally be redirected to a
file by setting the C<PERLIO_DEBUG> environment variable.
If perl is running setuid or the B<-T> switch was supplied C<PERLIO_DEBUG> is
ignored and the debugging output is sent to C<stderr> as for any other B<-D>
switch.
=head2 Core modules and tools no longer search F<"."> for optional modules
The tools and many modules supplied in core no longer search the default
current directory entry in L<C<@INC>|perlvar/@INC> for optional modules. For
example, L<Storable> will remove the final F<"."> from C<@INC> before trying to
load L<Log::Agent>.
This prevents an attacker injecting an optional module into a process run by
another user where the current directory is writable by the attacker, e.g. the
F</tmp> directory.
In most cases this removal should not cause problems, but difficulties were
encountered with L<base>, which treats every module name supplied as optional.
These difficulties have not yet been resolved, so for this release there are no
changes to L<base>. We hope to have a fix for L<base> in Perl 5.22.4.
To protect your own code from this attack, either remove the default F<".">
entry from C<@INC> at the start of your script, so:
#!/usr/bin/perl
use strict;
...
becomes:
#!/usr/bin/perl
BEGIN { pop @INC if $INC[-1] eq '.' }
use strict;
...
or for modules, remove F<"."> from a localized C<@INC>, so:
my $can_foo = eval { require Foo; }
becomes:
my $can_foo = eval {
local @INC = @INC;
pop @INC if $INC[-1] eq '.';
require Foo;
};
=head1 Incompatible Changes
Other than the security changes above there are no changes intentionally
incompatible with Perl 5.22.2. If any exist, they are bugs, and we request
that you submit a report. See L</Reporting Bugs> below.
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
=over 4
=item *
L<Archive::Tar> has been upgraded from version 2.04 to 2.04_01.
=item *
L<bignum> has been upgraded from version 0.39 to 0.39_01.
=item *
L<CPAN> has been upgraded from version 2.11 to 2.11_01.
=item *
L<Digest> has been upgraded from version 1.17 to 1.17_01.
=item *
L<Digest::SHA> has been upgraded from version 5.95 to 5.95_01.
=item *
L<Encode> has been upgraded from version 2.72 to 2.72_01.
=item *
L<ExtUtils::Command> has been upgraded from version 1.20 to 1.20_01.
=item *
L<ExtUtils::MakeMaker> has been upgraded from version 7.04_01 to 7.04_02.
=item *
L<File::Fetch> has been upgraded from version 0.48 to 0.48_01.
=item *
L<File::Spec> has been upgraded from version 3.56_01 to 3.56_02.
=item *
L<HTTP::Tiny> has been upgraded from version 0.054 to 0.054_01.
=item *
L<IO> has been upgraded from version 1.35 to 1.35_01.
=item *
The IO-Compress modules have been upgraded from version 2.068 to 2.068_001.
=item *
L<IPC::Cmd> has been upgraded from version 0.92 to 0.92_01.
=item *
L<JSON::PP> has been upgraded from version 2.27300 to 2.27300_01.
=item *
L<Locale::Maketext> has been upgraded from version 1.26 to 1.26_01.
=item *
L<Locale::Maketext::Simple> has been upgraded from version 0.21 to 0.21_01.
=item *
L<Memoize> has been upgraded from version 1.03 to 1.03_01.
=item *
L<Module::CoreList> has been upgraded from version 5.20160429 to 5.20170114_22.
=item *
L<Net::Ping> has been upgraded from version 2.43 to 2.43_01.
=item *
L<Parse::CPAN::Meta> has been upgraded from version 1.4414 to 1.4414_001.
=item *
L<Pod::Html> has been upgraded from version 1.22 to 1.2201.
=item *
L<Pod::Perldoc> has been upgraded from version 3.25 to 3.25_01.
=item *
L<Storable> has been upgraded from version 2.53_01 to 2.53_02.
=item *
L<Sys::Syslog> has been upgraded from version 0.33 to 0.33_01.
=item *
L<Test> has been upgraded from version 1.26 to 1.26_01.
=item *
L<Test::Harness> has been upgraded from version 3.35 to 3.35_01.
=item *
L<XSLoader> has been upgraded from version 0.20 to 0.20_01, fixing a security
hole in which binary files could be loaded from a path outside of C<@INC>.
L<[perl #128528]|https://rt.perl.org/Public/Bug/Display.html?id=128528>
=back
=head1 Documentation
=head2 Changes to Existing Documentation
=head3 L<perlapio>
=over 4
=item *
The documentation of C<PERLIO_DEBUG> has been updated.
=back
=head3 L<perlrun>
=over 4
=item *
The new B<-Di> switch has been documented, and the documentation of
C<PERLIO_DEBUG> has been updated.
=back
=head1 Testing
=over 4
=item *
A new test script, F<t/run/switchDx.t>, has been added to test that the new
B<-Di> switch is working correctly.
=back
=head1 Selected Bug Fixes
=over 4
=item *
The C<PadlistNAMES> macro is an lvalue again.
=back
=head1 Acknowledgements
Perl 5.22.3 represents approximately 9 months of development since Perl 5.22.2
and contains approximately 4,400 lines of changes across 240 files from 20
authors.
Excluding auto-generated files, documentation and release tools, there were
approximately 2,200 lines of changes to 170 .pm, .t, .c and .h files.
Perl continues to flourish into its third decade thanks to a vibrant community
of users and developers. The following people are known to have contributed
the improvements that became Perl 5.22.3:
Aaron Crane, Abigail, Alex Vandiver, Aristotle Pagaltzis, Chad Granum, Chris
'BinGOs' Williams, Craig A. Berry, David Mitchell, Father Chrysostomos, James E
Keenan, Jarkko Hietaniemi, Karen Etheridge, Karl Williamson, Matthew Horsfall,
Niko Tyni, Ricardo Signes, Sawyer X, Stevan Little, Steve Hay, Tony Cook.
The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.
Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.
For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles recently
posted to the comp.lang.perl.misc newsgroup and the Perl bug database at
https://rt.perl.org/ . There may also be information at http://www.perl.org/ ,
the Perl Home Page.
If you believe you have an unreported bug, please run the L<perlbug> program
included with your release. Be sure to trim your bug down to a tiny but
sufficient test case. Your bug report, along with the output of C<perl -V>,
will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
If the bug you are reporting has security implications, which make it
inappropriate to send to a publicly archived mailing list, then please send it
to perl5-security-report@perl.org. This points to a closed subscription
unarchived mailing list, which includes all the core committers, who will be
able to help assess the impact of issues, figure out a resolution, and help
co-ordinate the release of patches to mitigate or fix the problem across all
platforms on which Perl is supported. Please only use this address for
security issues in the Perl core, not for modules independently distributed on
CPAN.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details on
what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,125 @@
=encoding utf8
=head1 NAME
perl5224delta - what is new for perl v5.22.4
=head1 DESCRIPTION
This document describes differences between the 5.22.3 release and the 5.22.4
release.
If you are upgrading from an earlier release such as 5.22.2, first read
L<perl5223delta>, which describes differences between 5.22.2 and 5.22.3.
=head1 Security
=head2 Improved handling of '.' in @INC in base.pm
The handling of (the removal of) C<'.'> in C<@INC> in L<base> has been
improved. This resolves some problematic behaviour in the approach taken in
Perl 5.22.3, which is probably best described in the following two threads on
the Perl 5 Porters mailing list:
L<http://www.nntp.perl.org/group/perl.perl5.porters/2016/08/msg238991.html>,
L<http://www.nntp.perl.org/group/perl.perl5.porters/2016/10/msg240297.html>.
=head2 "Escaped" colons and relative paths in PATH
On Unix systems, Perl treats any relative paths in the PATH environment
variable as tainted when starting a new process. Previously, it was allowing a
backslash to escape a colon (unlike the OS), consequently allowing relative
paths to be considered safe if the PATH was set to something like C</\:.>. The
check has been fixed to treat C<.> as tainted in that example.
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
=over 4
=item *
L<base> has been upgraded from version 2.22 to 2.22_01.
=item *
L<Module::CoreList> has been upgraded from version 5.20170114_22 to 5.20170715_22.
=back
=head1 Selected Bug Fixes
=over 4
=item *
Fixed a crash with C<s///l> where it thought it was dealing with UTF-8 when it
wasn't.
L<[perl #129038]|https://rt.perl.org/Ticket/Display.html?id=129038>
=back
=head1 Acknowledgements
Perl 5.22.4 represents approximately 6 months of development since Perl 5.22.3
and contains approximately 2,200 lines of changes across 52 files from 16
authors.
Excluding auto-generated files, documentation and release tools, there were
approximately 970 lines of changes to 18 .pm, .t, .c and .h files.
Perl continues to flourish into its third decade thanks to a vibrant community
of users and developers. The following people are known to have contributed
the improvements that became Perl 5.22.4:
Aaron Crane, Abigail, Aristotle Pagaltzis, Chris 'BinGOs' Williams, David
Mitchell, Eric Herman, Father Chrysostomos, James E Keenan, Karl Williamson,
Lukas Mai, Renee Baecker, Ricardo Signes, Sawyer X, Stevan Little, Steve Hay,
Tony Cook.
The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.
Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.
For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles recently
posted to the comp.lang.perl.misc newsgroup and the perl bug database at
https://rt.perl.org/ . There may also be information at
http://www.perl.org/ , the Perl Home Page.
If you believe you have an unreported bug, please run the L<perlbug> program
included with your release. Be sure to trim your bug down to a tiny but
sufficient test case. Your bug report, along with the output of C<perl -V>,
will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
If the bug you are reporting has security implications, which make it
inappropriate to send to a publicly archived mailing list, then please send it
to perl5-security-report@perl.org. This points to a closed subscription
unarchived mailing list, which includes all the core committers, who will be
able to help assess the impact of issues, figure out a resolution, and help
co-ordinate the release of patches to mitigate or fix the problem across all
platforms on which Perl is supported. Please only use this address for
security issues in the Perl core, not for modules independently distributed on
CPAN.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details on
what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,308 @@
=encoding utf8
=head1 NAME
perl5241delta - what is new for perl v5.24.1
=head1 DESCRIPTION
This document describes differences between the 5.24.0 release and the 5.24.1
release.
If you are upgrading from an earlier release such as 5.22.0, first read
L<perl5240delta>, which describes differences between 5.22.0 and 5.24.0.
=head1 Security
=head2 B<-Di> switch is now required for PerlIO debugging output
Previously PerlIO debugging output would be sent to the file specified by the
C<PERLIO_DEBUG> environment variable if perl wasn't running setuid and the
B<-T> or B<-t> switches hadn't been parsed yet.
If perl performed output at a point where it hadn't yet parsed its switches
this could result in perl creating or overwriting the file named by
C<PERLIO_DEBUG> even when the B<-T> switch had been supplied.
Perl now requires the B<-Di> switch to produce PerlIO debugging output. By
default this is written to C<stderr>, but can optionally be redirected to a
file by setting the C<PERLIO_DEBUG> environment variable.
If perl is running setuid or the B<-T> switch was supplied C<PERLIO_DEBUG> is
ignored and the debugging output is sent to C<stderr> as for any other B<-D>
switch.
=head2 Core modules and tools no longer search F<"."> for optional modules
The tools and many modules supplied in core no longer search the default
current directory entry in L<C<@INC>|perlvar/@INC> for optional modules. For
example, L<Storable> will remove the final F<"."> from C<@INC> before trying to
load L<Log::Agent>.
This prevents an attacker injecting an optional module into a process run by
another user where the current directory is writable by the attacker, e.g. the
F</tmp> directory.
In most cases this removal should not cause problems, but difficulties were
encountered with L<base>, which treats every module name supplied as optional.
These difficulties have not yet been resolved, so for this release there are no
changes to L<base>. We hope to have a fix for L<base> in Perl 5.24.2.
To protect your own code from this attack, either remove the default F<".">
entry from C<@INC> at the start of your script, so:
#!/usr/bin/perl
use strict;
...
becomes:
#!/usr/bin/perl
BEGIN { pop @INC if $INC[-1] eq '.' }
use strict;
...
or for modules, remove F<"."> from a localized C<@INC>, so:
my $can_foo = eval { require Foo; }
becomes:
my $can_foo = eval {
local @INC = @INC;
pop @INC if $INC[-1] eq '.';
require Foo;
};
=head1 Incompatible Changes
Other than the security changes above there are no changes intentionally
incompatible with Perl 5.24.0. If any exist, they are bugs, and we request
that you submit a report. See L</Reporting Bugs> below.
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
=over 4
=item *
L<Archive::Tar> has been upgraded from version 2.04 to 2.04_01.
=item *
L<bignum> has been upgraded from version 0.42 to 0.42_01.
=item *
L<CPAN> has been upgraded from version 2.11 to 2.11_01.
=item *
L<Digest> has been upgraded from version 1.17 to 1.17_01.
=item *
L<Digest::SHA> has been upgraded from version 5.95 to 5.95_01.
=item *
L<Encode> has been upgraded from version 2.80 to 2.80_01.
=item *
L<ExtUtils::MakeMaker> has been upgraded from version 7.10_01 to 7.10_02.
=item *
L<File::Fetch> has been upgraded from version 0.48 to 0.48_01.
=item *
L<File::Spec> has been upgraded from version 3.63 to 3.63_01.
=item *
L<HTTP::Tiny> has been upgraded from version 0.056 to 0.056_001.
=item *
L<IO> has been upgraded from version 1.36 to 1.36_01.
=item *
The IO-Compress modules have been upgraded from version 2.069 to 2.069_001.
=item *
L<IPC::Cmd> has been upgraded from version 0.92 to 0.92_01.
=item *
L<JSON::PP> has been upgraded from version 2.27300 to 2.27300_01.
=item *
L<Locale::Maketext> has been upgraded from version 1.26 to 1.26_01.
=item *
L<Locale::Maketext::Simple> has been upgraded from version 0.21 to 0.21_01.
=item *
L<Memoize> has been upgraded from version 1.03 to 1.03_01.
=item *
L<Module::CoreList> has been upgraded from version 5.20160506 to 5.20170114_24.
=item *
L<Net::Ping> has been upgraded from version 2.43 to 2.43_01.
=item *
L<Parse::CPAN::Meta> has been upgraded from version 1.4417 to 1.4417_001.
=item *
L<Pod::Html> has been upgraded from version 1.22 to 1.2201.
=item *
L<Pod::Perldoc> has been upgraded from version 3.25_02 to 3.25_03.
=item *
L<Storable> has been upgraded from version 2.56 to 2.56_01.
=item *
L<Sys::Syslog> has been upgraded from version 0.33 to 0.33_01.
=item *
L<Test> has been upgraded from version 1.28 to 1.28_01.
=item *
L<Test::Harness> has been upgraded from version 3.36 to 3.36_01.
=item *
L<XSLoader> has been upgraded from version 0.21 to 0.22, fixing a security hole
in which binary files could be loaded from a path outside of C<@INC>.
L<[perl #128528]|https://rt.perl.org/Public/Bug/Display.html?id=128528>
=back
=head1 Documentation
=head2 Changes to Existing Documentation
=head3 L<perlapio>
=over 4
=item *
The documentation of C<PERLIO_DEBUG> has been updated.
=back
=head3 L<perlrun>
=over 4
=item *
The new B<-Di> switch has been documented, and the documentation of
C<PERLIO_DEBUG> has been updated.
=back
=head1 Testing
=over 4
=item *
A new test script, F<t/run/switchDx.t>, has been added to test that the new
B<-Di> switch is working correctly.
=back
=head1 Selected Bug Fixes
=over 4
=item *
The change to hashbang redirection introduced in Perl 5.24.0, whereby perl
would redirect to another interpreter (Perl 6) if it found a hashbang path
which contains "perl" followed by "6", has been reverted because it broke in
cases such as C<#!/opt/perl64/bin/perl>.
=back
=head1 Acknowledgements
Perl 5.24.1 represents approximately 8 months of development since Perl 5.24.0
and contains approximately 8,100 lines of changes across 240 files from 18
authors.
Excluding auto-generated files, documentation and release tools, there were
approximately 2,200 lines of changes to 170 .pm, .t, .c and .h files.
Perl continues to flourish into its third decade thanks to a vibrant community
of users and developers. The following people are known to have contributed
the improvements that became Perl 5.24.1:
Aaron Crane, Alex Vandiver, Aristotle Pagaltzis, Chad Granum, Chris 'BinGOs'
Williams, Craig A. Berry, Father Chrysostomos, James E Keenan, Jarkko
Hietaniemi, Karen Etheridge, Leon Timmermans, Matthew Horsfall, Ricardo Signes,
Sawyer X, Sébastien Aperghis-Tramoni, Stevan Little, Steve Hay, Tony Cook.
The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.
Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.
For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles recently
posted to the comp.lang.perl.misc newsgroup and the Perl bug database at
L<https://rt.perl.org/> . There may also be information at
L<http://www.perl.org/> , the Perl Home Page.
If you believe you have an unreported bug, please run the L<perlbug> program
included with your release. Be sure to trim your bug down to a tiny but
sufficient test case. Your bug report, along with the output of C<perl -V>,
will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
If the bug you are reporting has security implications which make it
inappropriate to send to a publicly archived mailing list, then see
L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION> for details of how to
report the issue.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details on
what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,120 @@
=encoding utf8
=head1 NAME
perl5242delta - what is new for perl v5.24.2
=head1 DESCRIPTION
This document describes differences between the 5.24.1 release and the 5.24.2
release.
If you are upgrading from an earlier release such as 5.24.0, first read
L<perl5241delta>, which describes differences between 5.24.0 and 5.24.1.
=head1 Security
=head2 Improved handling of '.' in @INC in base.pm
The handling of (the removal of) C<'.'> in C<@INC> in L<base> has been
improved. This resolves some problematic behaviour in the approach taken in
Perl 5.24.1, which is probably best described in the following two threads on
the Perl 5 Porters mailing list:
L<http://www.nntp.perl.org/group/perl.perl5.porters/2016/08/msg238991.html>,
L<http://www.nntp.perl.org/group/perl.perl5.porters/2016/10/msg240297.html>.
=head2 "Escaped" colons and relative paths in PATH
On Unix systems, Perl treats any relative paths in the PATH environment
variable as tainted when starting a new process. Previously, it was allowing a
backslash to escape a colon (unlike the OS), consequently allowing relative
paths to be considered safe if the PATH was set to something like C</\:.>. The
check has been fixed to treat C<.> as tainted in that example.
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
=over 4
=item *
L<base> has been upgraded from version 2.23 to 2.23_01.
=item *
L<Module::CoreList> has been upgraded from version 5.20170114_24 to 5.20170715_24.
=back
=head1 Selected Bug Fixes
=over 4
=item *
Fixed a crash with C<s///l> where it thought it was dealing with UTF-8 when it
wasn't.
L<[perl #129038]|https://rt.perl.org/Ticket/Display.html?id=129038>
=back
=head1 Acknowledgements
Perl 5.24.2 represents approximately 6 months of development since Perl 5.24.1
and contains approximately 2,500 lines of changes across 53 files from 18
authors.
Excluding auto-generated files, documentation and release tools, there were
approximately 960 lines of changes to 17 .pm, .t, .c and .h files.
Perl continues to flourish into its third decade thanks to a vibrant community
of users and developers. The following people are known to have contributed
the improvements that became Perl 5.24.2:
Aaron Crane, Abigail, Aristotle Pagaltzis, Chris 'BinGOs' Williams, Dan
Collins, David Mitchell, Eric Herman, Father Chrysostomos, James E Keenan, Karl
Williamson, Lukas Mai, Renee Baecker, Ricardo Signes, Sawyer X, Stevan Little,
Steve Hay, Tony Cook, Yves Orton.
The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.
Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.
For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles recently
posted to the comp.lang.perl.misc newsgroup and the perl bug database at
L<https://rt.perl.org/> . There may also be information at
L<http://www.perl.org/> , the Perl Home Page.
If you believe you have an unreported bug, please run the L<perlbug> program
included with your release. Be sure to trim your bug down to a tiny but
sufficient test case. Your bug report, along with the output of C<perl -V>,
will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
If the bug you are reporting has security implications which make it
inappropriate to send to a publicly archived mailing list, then see
L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
for details of how to report the issue.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details on
what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,335 @@
=encoding utf8
=head1 NAME
perl5243delta - what is new for perl v5.24.3
=head1 DESCRIPTION
This document describes differences between the 5.24.2 release and the 5.24.3
release.
If you are upgrading from an earlier release such as 5.24.1, first read
L<perl5242delta>, which describes differences between 5.24.1 and 5.24.2.
=head1 Security
=head2 [CVE-2017-12837] Heap buffer overflow in regular expression compiler
Compiling certain regular expression patterns with the case-insensitive
modifier could cause a heap buffer overflow and crash perl. This has now been
fixed.
L<[perl #131582]|https://rt.perl.org/Public/Bug/Display.html?id=131582>
=head2 [CVE-2017-12883] Buffer over-read in regular expression parser
For certain types of syntax error in a regular expression pattern, the error
message could either contain the contents of a random, possibly large, chunk of
memory, or could crash perl. This has now been fixed.
L<[perl #131598]|https://rt.perl.org/Public/Bug/Display.html?id=131598>
=head2 [CVE-2017-12814] C<$ENV{$key}> stack buffer overflow on Windows
A possible stack buffer overflow in the C<%ENV> code on Windows has been fixed
by removing the buffer completely since it was superfluous anyway.
L<[perl #131665]|https://rt.perl.org/Public/Bug/Display.html?id=131665>
=head1 Incompatible Changes
There are no changes intentionally incompatible with 5.24.2. If any exist,
they are bugs, and we request that you submit a report. See L</Reporting
Bugs> below.
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
=over 4
=item *
L<Module::CoreList> has been upgraded from version 5.20170715_24 to
5.20170922_24.
=item *
L<POSIX> has been upgraded from version 1.65 to 1.65_01.
=item *
L<Time::HiRes> has been upgraded from version 1.9733 to 1.9741.
L<[perl #128427]|https://rt.perl.org/Public/Bug/Display.html?id=128427>
L<[perl #128445]|https://rt.perl.org/Public/Bug/Display.html?id=128445>
L<[perl #128972]|https://rt.perl.org/Public/Bug/Display.html?id=128972>
L<[cpan #120032]|https://rt.cpan.org/Public/Bug/Display.html?id=120032>
=back
=head1 Configuration and Compilation
=over 4
=item *
When building with GCC 6 and link-time optimization (the B<-flto> option to
B<gcc>), F<Configure> was treating all probed symbols as present on the system,
regardless of whether they actually exist. This has been fixed.
L<[perl #128131]|https://rt.perl.org/Public/Bug/Display.html?id=128131>
=item *
F<Configure> now aborts if both C<-Duselongdouble> and C<-Dusequadmath> are
requested.
L<[perl #126203]|https://rt.perl.org/Public/Bug/Display.html?id=126203>
=item *
Fixed a bug in which F<Configure> could append C<-quadmath> to the archname
even if it was already present.
L<[perl #128538]|https://rt.perl.org/Public/Bug/Display.html?id=128538>
=item *
Clang builds with C<-DPERL_GLOBAL_STRUCT> or C<-DPERL_GLOBAL_STRUCT_PRIVATE>
have been fixed (by disabling Thread Safety Analysis for these configurations).
=back
=head1 Platform Support
=head2 Platform-Specific Notes
=over 4
=item VMS
=over 4
=item *
C<configure.com> now recognizes the VSI-branded C compiler.
=back
=item Windows
=over 4
=item *
Building XS modules with GCC 6 in a 64-bit build of Perl failed due to
incorrect mapping of C<strtoll> and C<strtoull>. This has now been fixed.
L<[perl #131726]|https://rt.perl.org/Public/Bug/Display.html?id=131726>
L<[cpan #121683]|https://rt.cpan.org/Public/Bug/Display.html?id=121683>
L<[cpan #122353]|https://rt.cpan.org/Public/Bug/Display.html?id=122353>
=back
=back
=head1 Selected Bug Fixes
=over 4
=item *
C<< /@0{0*-E<gt>@*/*0 >> and similar contortions used to crash, but no longer
do, but merely produce a syntax error.
L<[perl #128171]|https://rt.perl.org/Public/Bug/Display.html?id=128171>
=item *
C<do> or C<require> with an argument which is a reference or typeglob which,
when stringified, contains a null character, started crashing in Perl 5.20, but
has now been fixed.
L<[perl #128182]|https://rt.perl.org/Public/Bug/Display.html?id=128182>
=item *
Expressions containing an C<&&> or C<||> operator (or their synonyms C<and> and
C<or>) were being compiled incorrectly in some cases. If the left-hand side
consisted of either a negated bareword constant or a negated C<do {}> block
containing a constant expression, and the right-hand side consisted of a
negated non-foldable expression, one of the negations was effectively ignored.
The same was true of C<if> and C<unless> statement modifiers, though with the
left-hand and right-hand sides swapped. This long-standing bug has now been
fixed.
L<[perl #127952]|https://rt.perl.org/Public/Bug/Display.html?id=127952>
=item *
C<reset> with an argument no longer crashes when encountering stash entries
other than globs.
L<[perl #128106]|https://rt.perl.org/Public/Bug/Display.html?id=128106>
=item *
Assignment of hashes to, and deletion of, typeglobs named C<*::::::> no longer
causes crashes.
L<[perl #128086]|https://rt.perl.org/Public/Bug/Display.html?id=128086>
=item *
Assignment variants of any bitwise ops under the C<bitwise> feature would crash
if the left-hand side was an array or hash.
L<[perl #128204]|https://rt.perl.org/Public/Bug/Display.html?id=128204>
=item *
C<socket> now leaves the error code returned by the system in C<$!> on failure.
L<[perl #128316]|https://rt.perl.org/Public/Bug/Display.html?id=128316>
=item *
Parsing bad POSIX charclasses no longer leaks memory.
L<[perl #128313]|https://rt.perl.org/Public/Bug/Display.html?id=128313>
=item *
Since Perl 5.20, line numbers have been off by one when perl is invoked with
the B<-x> switch. This has been fixed.
L<[perl #128508]|https://rt.perl.org/Public/Bug/Display.html?id=128508>
=item *
Some obscure cases of subroutines and file handles being freed at the same time
could result in crashes, but have been fixed. The crash was introduced in Perl
5.22.
L<[perl #128597]|https://rt.perl.org/Public/Bug/Display.html?id=128597>
=item *
Some regular expression parsing glitches could lead to assertion failures with
regular expressions such as C</(?E<lt>=/> and C</(?E<lt>!/>. This has now been
fixed.
L<[perl #128170]|https://rt.perl.org/Public/Bug/Display.html?id=128170>
=item *
C<gethostent> and similar functions now perform a null check internally, to
avoid crashing with the torsocks library. This was a regression from Perl
5.22.
L<[perl #128740]|https://rt.perl.org/Public/Bug/Display.html?id=128740>
=item *
Mentioning the same constant twice in a row (which is a syntax error) no longer
fails an assertion under debugging builds. This was a regression from Perl
5.20.
L<[perl #126482]|https://rt.perl.org/Public/Bug/Display.html?id=126482>
=item *
In Perl 5.24 C<fchown> was changed not to accept negative one as an argument
because in some platforms that is an error. However, in some other platforms
that is an acceptable argument. This change has been reverted.
L<[perl #128967]|https://rt.perl.org/Public/Bug/Display.html?id=128967>.
=item *
C<@{x> followed by a newline where C<"x"> represents a control or non-ASCII
character no longer produces a garbled syntax error message or a crash.
L<[perl #128951]|https://rt.perl.org/Public/Bug/Display.html?id=128951>
=item *
A regression in Perl 5.24 with C<tr/\N{U+...}/foo/> when the code point was
between 128 and 255 has been fixed.
L<[perl #128734]|https://rt.perl.org/Public/Bug/Display.html?id=128734>.
=item *
Many issues relating to C<printf "%a"> of hexadecimal floating point were
fixed. In addition, the "subnormals" (formerly known as "denormals") floating
point numbers are now supported both with the plain IEEE 754 floating point
numbers (64-bit or 128-bit) and the x86 80-bit "extended precision". Note that
subnormal hexadecimal floating point literals will give a warning about
"exponent underflow".
L<[perl #128843]|https://rt.perl.org/Public/Bug/Display.html?id=128843>
L<[perl #128888]|https://rt.perl.org/Public/Bug/Display.html?id=128888>
L<[perl #128889]|https://rt.perl.org/Public/Bug/Display.html?id=128889>
L<[perl #128890]|https://rt.perl.org/Public/Bug/Display.html?id=128890>
L<[perl #128893]|https://rt.perl.org/Public/Bug/Display.html?id=128893>
L<[perl #128909]|https://rt.perl.org/Public/Bug/Display.html?id=128909>
L<[perl #128919]|https://rt.perl.org/Public/Bug/Display.html?id=128919>
=item *
The parser could sometimes crash if a bareword came after C<evalbytes>.
L<[perl #129196]|https://rt.perl.org/Public/Bug/Display.html?id=129196>
=item *
Fixed a place where the regex parser was not setting the syntax error correctly
on a syntactically incorrect pattern.
L<[perl #129122]|https://rt.perl.org/Public/Bug/Display.html?id=129122>
=item *
A vulnerability in Perl's C<sprintf> implementation has been fixed by avoiding
a possible memory wrap.
L<[perl #131260]|https://rt.perl.org/Public/Bug/Display.html?id=131260>
=back
=head1 Acknowledgements
Perl 5.24.3 represents approximately 2 months of development since Perl 5.24.2
and contains approximately 3,200 lines of changes across 120 files from 23
authors.
Excluding auto-generated files, documentation and release tools, there were
approximately 1,600 lines of changes to 56 .pm, .t, .c and .h files.
Perl continues to flourish into its third decade thanks to a vibrant community
of users and developers. The following people are known to have contributed
the improvements that became Perl 5.24.3:
Aaron Crane, Craig A. Berry, Dagfinn Ilmari Mannsåker, Dan Collins, Daniel
Dragan, Dave Cross, David Mitchell, Eric Herman, Father Chrysostomos, H.Merijn
Brand, Hugo van der Sanden, James E Keenan, Jarkko Hietaniemi, John SJ
Anderson, Karl Williamson, Ken Brown, Lukas Mai, Matthew Horsfall, Stevan
Little, Steve Hay, Steven Humphrey, Tony Cook, Yves Orton.
The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.
Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.
For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles recently
posted to the comp.lang.perl.misc newsgroup and the perl bug database at
L<https://rt.perl.org/> . There may also be information at
L<http://www.perl.org/> , the Perl Home Page.
If you believe you have an unreported bug, please run the L<perlbug> program
included with your release. Be sure to trim your bug down to a tiny but
sufficient test case. Your bug report, along with the output of C<perl -V>,
will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
If the bug you are reporting has security implications which make it
inappropriate to send to a publicly archived mailing list, then see
L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION> for details of how to
report the issue.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details on
what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,130 @@
=encoding utf8
=head1 NAME
perl5244delta - what is new for perl v5.24.4
=head1 DESCRIPTION
This document describes differences between the 5.24.3 release and the 5.24.4
release.
If you are upgrading from an earlier release such as 5.24.2, first read
L<perl5243delta>, which describes differences between 5.24.2 and 5.24.3.
=head1 Security
=head2 [CVE-2018-6797] heap-buffer-overflow (WRITE of size 1) in S_regatom (regcomp.c)
A crafted regular expression could cause a heap buffer write overflow, with
control over the bytes written.
L<[perl #132227]|https://rt.perl.org/Public/Bug/Display.html?id=132227>
=head2 [CVE-2018-6798] Heap-buffer-overflow in Perl__byte_dump_string (utf8.c)
Matching a crafted locale dependent regular expression could cause a heap
buffer read overflow and potentially information disclosure.
L<[perl #132063]|https://rt.perl.org/Public/Bug/Display.html?id=132063>
=head2 [CVE-2018-6913] heap-buffer-overflow in S_pack_rec
C<pack()> could cause a heap buffer write overflow with a large item count.
L<[perl #131844]|https://rt.perl.org/Public/Bug/Display.html?id=131844>
=head2 Assertion failure in Perl__core_swash_init (utf8.c)
Control characters in a supposed Unicode property name could cause perl to
crash. This has been fixed.
L<[perl #132055]|https://rt.perl.org/Public/Bug/Display.html?id=132055>
L<[perl #132553]|https://rt.perl.org/Public/Bug/Display.html?id=132553>
L<[perl #132658]|https://rt.perl.org/Public/Bug/Display.html?id=132658>
=head1 Incompatible Changes
There are no changes intentionally incompatible with 5.24.3. If any exist,
they are bugs, and we request that you submit a report. See L</Reporting
Bugs> below.
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
=over 4
=item *
L<Module::CoreList> has been upgraded from version 5.20170922_24 to 5.20180414_24.
=back
=head1 Selected Bug Fixes
=over 4
=item *
The C<readpipe()> built-in function now checks at compile time that it has only
one parameter expression, and puts it in scalar context, thus ensuring that it
doesn't corrupt the stack at runtime.
L<[perl #4574]|https://rt.perl.org/Public/Bug/Display.html?id=4574>
=back
=head1 Acknowledgements
Perl 5.24.4 represents approximately 7 months of development since Perl 5.24.3
and contains approximately 2,400 lines of changes across 49 files from 12
authors.
Excluding auto-generated files, documentation and release tools, there were
approximately 1,300 lines of changes to 12 .pm, .t, .c and .h files.
Perl continues to flourish into its third decade thanks to a vibrant community
of users and developers. The following people are known to have contributed
the improvements that became Perl 5.24.4:
Abigail, Chris 'BinGOs' Williams, John SJ Anderson, Karen Etheridge, Karl
Williamson, Renee Baecker, Sawyer X, Steve Hay, Todd Rinaldo, Tony Cook, Yves
Orton, Zefram.
The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.
Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.
For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles recently
posted to the comp.lang.perl.misc newsgroup and the perl bug database at
L<https://rt.perl.org/> . There may also be information at
L<http://www.perl.org/> , the Perl Home Page.
If you believe you have an unreported bug, please run the L<perlbug> program
included with your release. Be sure to trim your bug down to a tiny but
sufficient test case. Your bug report, along with the output of C<perl -V>,
will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
If the bug you are reporting has security implications which make it
inappropriate to send to a publicly archived mailing list, then see
L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
for details of how to report the issue.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details on
what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,247 @@
=encoding utf8
=head1 NAME
perl5261delta - what is new for perl v5.26.1
=head1 DESCRIPTION
This document describes differences between the 5.26.0 release and the 5.26.1
release.
If you are upgrading from an earlier release such as 5.24.0, first read
L<perl5260delta>, which describes differences between 5.24.0 and 5.26.0.
=head1 Security
=head2 [CVE-2017-12837] Heap buffer overflow in regular expression compiler
Compiling certain regular expression patterns with the case-insensitive
modifier could cause a heap buffer overflow and crash perl. This has now been
fixed.
L<[perl #131582]|https://rt.perl.org/Public/Bug/Display.html?id=131582>
=head2 [CVE-2017-12883] Buffer over-read in regular expression parser
For certain types of syntax error in a regular expression pattern, the error
message could either contain the contents of a random, possibly large, chunk of
memory, or could crash perl. This has now been fixed.
L<[perl #131598]|https://rt.perl.org/Public/Bug/Display.html?id=131598>
=head2 [CVE-2017-12814] C<$ENV{$key}> stack buffer overflow on Windows
A possible stack buffer overflow in the C<%ENV> code on Windows has been fixed
by removing the buffer completely since it was superfluous anyway.
L<[perl #131665]|https://rt.perl.org/Public/Bug/Display.html?id=131665>
=head1 Incompatible Changes
There are no changes intentionally incompatible with 5.26.0. If any exist,
they are bugs, and we request that you submit a report. See L</Reporting
Bugs> below.
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
=over 4
=item *
L<base> has been upgraded from version 2.25 to 2.26.
The effects of dotless C<@INC> on this module have been limited by the
introduction of a more refined and accurate solution for removing C<'.'> from
C<@INC> while reducing the false positives.
=item *
L<charnames> has been upgraded from version 1.44 to 1.45.
=item *
L<Module::CoreList> has been upgraded from version 5.20170530 to 5.20170922_26.
=back
=head1 Platform Support
=head2 Platform-Specific Notes
=over 4
=item FreeBSD
=over 4
=item *
Building with B<g++> on FreeBSD-11.0 has been fixed.
L<[perl #131337]|https://rt.perl.org/Public/Bug/Display.html?id=131337>
=back
=item Windows
=over 4
=item *
Support for compiling perl on Windows using Microsoft Visual Studio 2017
(containing Visual C++ 14.1) has been added.
=item *
Building XS modules with GCC 6 in a 64-bit build of Perl failed due to
incorrect mapping of C<strtoll> and C<strtoull>. This has now been fixed.
L<[perl #131726]|https://rt.perl.org/Public/Bug/Display.html?id=131726>
L<[cpan #121683]|https://rt.cpan.org/Public/Bug/Display.html?id=121683>
L<[cpan #122353]|https://rt.cpan.org/Public/Bug/Display.html?id=122353>
=back
=back
=head1 Selected Bug Fixes
=over 4
=item *
Several built-in functions previously had bugs that could cause them to write
to the internal stack without allocating room for the item being written. In
rare situations, this could have led to a crash. These bugs have now been
fixed, and if any similar bugs are introduced in future, they will be detected
automatically in debugging builds.
L<[perl #131732]|https://rt.perl.org/Public/Bug/Display.html?id=131732>
=item *
Using a symbolic ref with postderef syntax as the key in a hash lookup was
yielding an assertion failure on debugging builds.
L<[perl #131627]|https://rt.perl.org/Public/Bug/Display.html?id=131627>
=item *
List assignment (C<aassign>) could in some rare cases allocate an entry on the
mortal stack and leave the entry uninitialized.
L<[perl #131570]|https://rt.perl.org/Public/Bug/Display.html?id=131570>
=item *
Attempting to apply an attribute to an C<our> variable where a function of that
name already exists could result in a NULL pointer being supplied where an SV
was expected, crashing perl.
L<[perl #131597]|https://rt.perl.org/Public/Bug/Display.html?id=131597>
=item *
The code that vivifies a typeglob out of a code ref made some false assumptions
that could lead to a crash in cases such as C<< $::{"A"} = sub {}; \&{"A"} >>.
This has now been fixed.
L<[perl #131085]|https://rt.perl.org/Public/Bug/Display.html?id=131085>
=item *
C<my_atof2> no longer reads beyond the terminating NUL, which previously
occurred if the decimal point is immediately before the NUL.
L<[perl #131526]|https://rt.perl.org/Public/Bug/Display.html?id=131526>
=item *
Occasional "Malformed UTF-8 character" crashes in C<s//> on utf8 strings have
been fixed.
L<[perl #131575]|https://rt.perl.org/Public/Bug/Display.html?id=131575>
=item *
C<perldoc -f s> now finds C<s///>.
L<[perl #131371]|https://rt.perl.org/Public/Bug/Display.html?id=131371>
=item *
Some erroneous warnings after utf8 conversion have been fixed.
L<[perl #131190]|https://rt.perl.org/Public/Bug/Display.html?id=131190>
=item *
The C<jmpenv> frame to catch Perl exceptions is set up lazily, and this used to
be a bit too lazy. The catcher is now set up earlier, preventing some possible
crashes.
L<[perl #105930]|https://rt.perl.org/Public/Bug/Display.html?id=105930>
=item *
Spurious "Assuming NOT a POSIX class" warnings have been removed.
L<[perl #131522]|https://rt.perl.org/Public/Bug/Display.html?id=131522>
=back
=head1 Acknowledgements
Perl 5.26.1 represents approximately 4 months of development since Perl 5.26.0
and contains approximately 8,900 lines of changes across 85 files from 23
authors.
Excluding auto-generated files, documentation and release tools, there were
approximately 990 lines of changes to 38 .pm, .t, .c and .h files.
Perl continues to flourish into its third decade thanks to a vibrant community
of users and developers. The following people are known to have contributed
the improvements that became Perl 5.26.1:
Aaron Crane, Andy Dougherty, Aristotle Pagaltzis, Chris 'BinGOs' Williams,
Craig A. Berry, Dagfinn Ilmari Mannsåker, David Mitchell, E. Choroba, Eric
Herman, Father Chrysostomos, Jacques Germishuys, James E Keenan, John SJ
Anderson, Karl Williamson, Ken Brown, Lukas Mai, Matthew Horsfall, Ricardo
Signes, Sawyer X, Steve Hay, Tony Cook, Yves Orton, Zefram.
The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.
Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.
For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the perl bug database
at L<https://rt.perl.org/> . There may also be information at
L<http://www.perl.org/> , the Perl Home Page.
If you believe you have an unreported bug, please run the L<perlbug> program
included with your release. Be sure to trim your bug down to a tiny but
sufficient test case. Your bug report, along with the output of C<perl -V>,
will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
If the bug you are reporting has security implications which make it
inappropriate to send to a publicly archived mailing list, then see
L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION> for details of how to
report the issue.
=head1 Give Thanks
If you wish to thank the Perl 5 Porters for the work we had done in Perl 5, you
can do so by running the C<perlthanks> program:
perlthanks
This will send an email to the Perl 5 Porters list with your show of thanks.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details on
what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,245 @@
=encoding utf8
=head1 NAME
perl5262delta - what is new for perl v5.26.2
=head1 DESCRIPTION
This document describes differences between the 5.26.1 release and the 5.26.2
release.
If you are upgrading from an earlier release such as 5.26.0, first read
L<perl5261delta>, which describes differences between 5.26.0 and 5.26.1.
=head1 Security
=head2 [CVE-2018-6797] heap-buffer-overflow (WRITE of size 1) in S_regatom (regcomp.c)
A crafted regular expression could cause a heap buffer write overflow, with
control over the bytes written.
L<[perl #132227]|https://rt.perl.org/Public/Bug/Display.html?id=132227>
=head2 [CVE-2018-6798] Heap-buffer-overflow in Perl__byte_dump_string (utf8.c)
Matching a crafted locale dependent regular expression could cause a heap
buffer read overflow and potentially information disclosure.
L<[perl #132063]|https://rt.perl.org/Public/Bug/Display.html?id=132063>
=head2 [CVE-2018-6913] heap-buffer-overflow in S_pack_rec
C<pack()> could cause a heap buffer write overflow with a large item count.
L<[perl #131844]|https://rt.perl.org/Public/Bug/Display.html?id=131844>
=head2 Assertion failure in Perl__core_swash_init (utf8.c)
Control characters in a supposed Unicode property name could cause perl to
crash. This has been fixed.
L<[perl #132055]|https://rt.perl.org/Public/Bug/Display.html?id=132055>
L<[perl #132553]|https://rt.perl.org/Public/Bug/Display.html?id=132553>
L<[perl #132658]|https://rt.perl.org/Public/Bug/Display.html?id=132658>
=head1 Incompatible Changes
There are no changes intentionally incompatible with 5.26.1. If any exist,
they are bugs, and we request that you submit a report. See L</Reporting
Bugs> below.
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
=over 4
=item *
L<Module::CoreList> has been upgraded from version 5.20170922_26 to 5.20180414_26.
=item *
L<PerlIO::via> has been upgraded from version 0.16 to 0.17.
=item *
L<Term::ReadLine> has been upgraded from version 1.16 to 1.17.
=item *
L<Unicode::UCD> has been upgraded from version 0.68 to 0.69.
=back
=head1 Documentation
=head2 Changes to Existing Documentation
=head3 L<perluniprops>
=over 4
=item *
This has been updated to note that C<\p{Word}> now includes code points
matching the C<\p{Join_Control}> property. The change to the property was made
in Perl 5.18, but not documented until now. There are currently only two code
points that match this property: U+200C (ZERO WIDTH NON-JOINER) and U+200D
(ZERO WIDTH JOINER).
=back
=head1 Platform Support
=head2 Platform-Specific Notes
=over 4
=item Windows
Visual C++ compiler version detection has been improved to work on non-English
language systems.
L<[perl #132421]|https://rt.perl.org/Public/Bug/Display.html?id=132421>
We now set C<$Config{libpth}> correctly for 64-bit builds using Visual C++
versions earlier than 14.1.
L<[perl #132484]|https://rt.perl.org/Public/Bug/Display.html?id=132484>
=back
=head1 Selected Bug Fixes
=over 4
=item *
The C<readpipe()> built-in function now checks at compile time that it has only
one parameter expression, and puts it in scalar context, thus ensuring that it
doesn't corrupt the stack at runtime.
L<[perl #4574]|https://rt.perl.org/Public/Bug/Display.html?id=4574>
=item *
Fixed a use after free bug in C<pp_list> introduced in Perl 5.27.1.
L<[perl #131954]|https://rt.perl.org/Public/Bug/Display.html?id=131954>
=item *
Parsing a C<sub> definition could cause a use after free if the C<sub> keyword
was followed by whitespace including newlines (and comments).
L<[perl #131836]|https://rt.perl.org/Public/Bug/Display.html?id=131836>
=item *
The tokenizer now correctly adjusts a parse pointer when skipping whitespace in
an C< ${identifier} > construct.
L<[perl #131949]|https://rt.perl.org/Public/Bug/Display.html?id=131949>
=item *
Accesses to C<${^LAST_FH}> no longer assert after using any of a variety of I/O
operations on a non-glob.
L<[perl #128263]|https://rt.perl.org/Public/Bug/Display.html?id=128263>
=item *
C<sort> now performs correct reference counting when aliasing C<$a> and C<$b>,
thus avoiding premature destruction and leakage of scalars if they are
re-aliased during execution of the sort comparator.
L<[perl #92264]|https://rt.perl.org/Public/Bug/Display.html?id=92264>
=item *
Some convoluted kinds of regexp no longer cause an arithmetic overflow when
compiled.
L<[perl #131893]|https://rt.perl.org/Public/Bug/Display.html?id=131893>
=item *
Fixed a duplicate symbol failure with B<-flto -mieee-fp> builds. F<pp.c>
defined C<_LIB_VERSION> which B<-lieee> already defines.
L<[perl #131786]|https://rt.perl.org/Public/Bug/Display.html?id=131786>
=item *
A NULL pointer dereference in the C<S_regmatch()> function has been fixed.
L<[perl #132017]|https://rt.perl.org/Public/Bug/Display.html?id=132017>
=item *
Failures while compiling code within other constructs, such as with string
interpolation and the right part of C<s///e> now cause compilation to abort
earlier.
Previously compilation could continue in order to report other errors, but the
failed sub-parse could leave partly parsed constructs on the parser
shift-reduce stack, confusing the parser, leading to perl crashes.
L<[perl #125351]|https://rt.perl.org/Public/Bug/Display.html?id=125351>
=back
=head1 Acknowledgements
Perl 5.26.2 represents approximately 7 months of development since Perl 5.26.1
and contains approximately 3,300 lines of changes across 82 files from 17
authors.
Excluding auto-generated files, documentation and release tools, there were
approximately 1,800 lines of changes to 36 .pm, .t, .c and .h files.
Perl continues to flourish into its third decade thanks to a vibrant community
of users and developers. The following people are known to have contributed
the improvements that became Perl 5.26.2:
Aaron Crane, Abigail, Chris 'BinGOs' Williams, H.Merijn Brand, James E Keenan,
Jarkko Hietaniemi, John SJ Anderson, Karen Etheridge, Karl Williamson, Lukas
Mai, Renee Baecker, Sawyer X, Steve Hay, Todd Rinaldo, Tony Cook, Yves Orton,
Zefram.
The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.
Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.
For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the perl bug database
at L<https://rt.perl.org/> . There may also be information at
L<http://www.perl.org/> , the Perl Home Page.
If you believe you have an unreported bug, please run the L<perlbug> program
included with your release. Be sure to trim your bug down to a tiny but
sufficient test case. Your bug report, along with the output of C<perl -V>,
will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
If the bug you are reporting has security implications which make it
inappropriate to send to a publicly archived mailing list, then see
L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
for details of how to report the issue.
=head1 Give Thanks
If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
you can do so by running the C<perlthanks> program:
perlthanks
This will send an email to the Perl 5 Porters list with your show of thanks.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details on
what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,201 @@
=encoding utf8
=head1 NAME
perl5263delta - what is new for perl v5.26.3
=head1 DESCRIPTION
This document describes differences between the 5.26.2 release and the 5.26.3
release.
If you are upgrading from an earlier release such as 5.26.1, first read
L<perl5262delta>, which describes differences between 5.26.1 and 5.26.2.
=head1 Security
=head2 [CVE-2018-12015] Directory traversal in module Archive::Tar
By default, L<Archive::Tar> doesn't allow extracting files outside the current
working directory. However, this secure extraction mode could be bypassed by
putting a symlink and a regular file with the same name into the tar file.
L<[perl #133250]|https://rt.perl.org/Ticket/Display.html?id=133250>
L<[cpan #125523]|https://rt.cpan.org/Ticket/Display.html?id=125523>
=head2 [CVE-2018-18311] Integer overflow leading to buffer overflow and segmentation fault
Integer arithmetic in C<Perl_my_setenv()> could wrap when the combined length
of the environment variable name and value exceeded around 0x7fffffff. This
could lead to writing beyond the end of an allocated buffer with attacker
supplied data.
L<[perl #133204]|https://rt.perl.org/Ticket/Display.html?id=133204>
=head2 [CVE-2018-18312] Heap-buffer-overflow write in S_regatom (regcomp.c)
A crafted regular expression could cause heap-buffer-overflow write during
compilation, potentially allowing arbitrary code execution.
L<[perl #133423]|https://rt.perl.org/Ticket/Display.html?id=133423>
=head2 [CVE-2018-18313] Heap-buffer-overflow read in S_grok_bslash_N (regcomp.c)
A crafted regular expression could cause heap-buffer-overflow read during
compilation, potentially leading to sensitive information being leaked.
L<[perl #133192]|https://rt.perl.org/Ticket/Display.html?id=133192>
=head2 [CVE-2018-18314] Heap-buffer-overflow write in S_regatom (regcomp.c)
A crafted regular expression could cause heap-buffer-overflow write during
compilation, potentially allowing arbitrary code execution.
L<[perl #131649]|https://rt.perl.org/Ticket/Display.html?id=131649>
=head1 Incompatible Changes
There are no changes intentionally incompatible with 5.26.2. If any exist,
they are bugs, and we request that you submit a report. See
L</Reporting Bugs> below.
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
=over 4
=item *
L<Archive::Tar> has been upgraded from version 2.24 to 2.24_01.
=item *
L<Module::CoreList> has been upgraded from version 5.20180414_26 to 5.20181129_26.
=back
=head1 Diagnostics
The following additions or changes have been made to diagnostic output,
including warnings and fatal error messages. For the complete list of
diagnostic messages, see L<perldiag>.
=head2 New Diagnostics
=head3 New Errors
=over 4
=item *
L<Unexpected ']' with no following ')' in (?[... in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>|perldiag/"Unexpected ']' with no following ')' in (?[... in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>">
(F) While parsing an extended character class a ']' character was encountered
at a point in the definition where the only legal use of ']' is to close the
character class definition as part of a '])', you may have forgotten the close
paren, or otherwise confused the parser.
=item *
L<Expecting close paren for nested extended charclass in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>|perldiag/"Expecting close paren for nested extended charclass in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>">
(F) While parsing a nested extended character class like:
(?[ ... (?flags:(?[ ... ])) ... ])
^
we expected to see a close paren ')' (marked by ^) but did not.
=item *
L<Expecting close paren for wrapper for nested extended charclass in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>|perldiag/"Expecting close paren for wrapper for nested extended charclass in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>">
(F) While parsing a nested extended character class like:
(?[ ... (?flags:(?[ ... ])) ... ])
^
we expected to see a close paren ')' (marked by ^) but did not.
=back
=head2 Changes to Existing Diagnostics
=over 4
=item *
L<Syntax error in (?[...]) in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>|perldiag/"Syntax error in (?[...]) in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>">
This fatal error message has been slightly expanded (from "Syntax error in
(?[...]) in regex mE<sol>%sE<sol>") for greater clarity.
=back
=head1 Acknowledgements
Perl 5.26.3 represents approximately 8 months of development since Perl 5.26.2
and contains approximately 4,500 lines of changes across 51 files from 15
authors.
Excluding auto-generated files, documentation and release tools, there were
approximately 770 lines of changes to 10 .pm, .t, .c and .h files.
Perl continues to flourish into its third decade thanks to a vibrant community
of users and developers. The following people are known to have contributed
the improvements that became Perl 5.26.3:
Aaron Crane, Abigail, Chris 'BinGOs' Williams, Dagfinn Ilmari Mannsåker, David
Mitchell, H.Merijn Brand, James E Keenan, John SJ Anderson, Karen Etheridge,
Karl Williamson, Sawyer X, Steve Hay, Todd Rinaldo, Tony Cook, Yves Orton.
The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.
Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.
For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the perl bug database
at L<https://rt.perl.org/> . There may also be information at
L<http://www.perl.org/> , the Perl Home Page.
If you believe you have an unreported bug, please run the L<perlbug> program
included with your release. Be sure to trim your bug down to a tiny but
sufficient test case. Your bug report, along with the output of C<perl -V>,
will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
If the bug you are reporting has security implications which make it
inappropriate to send to a publicly archived mailing list, then see
L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
for details of how to report the issue.
=head1 Give Thanks
If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
you can do so by running the C<perlthanks> program:
perlthanks
This will send an email to the Perl 5 Porters list with your show of thanks.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details on
what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,141 @@
=encoding utf8
=head1 NAME
perl5281delta - what is new for perl v5.28.1
=head1 DESCRIPTION
This document describes differences between the 5.28.0 release and the 5.28.1
release.
If you are upgrading from an earlier release such as 5.26.0, first read
L<perl5280delta>, which describes differences between 5.26.0 and 5.28.0.
=head1 Security
=head2 [CVE-2018-18311] Integer overflow leading to buffer overflow and segmentation fault
Integer arithmetic in C<Perl_my_setenv()> could wrap when the combined length
of the environment variable name and value exceeded around 0x7fffffff. This
could lead to writing beyond the end of an allocated buffer with attacker
supplied data.
L<[perl #133204]|https://rt.perl.org/Ticket/Display.html?id=133204>
=head2 [CVE-2018-18312] Heap-buffer-overflow write in S_regatom (regcomp.c)
A crafted regular expression could cause heap-buffer-overflow write during
compilation, potentially allowing arbitrary code execution.
L<[perl #133423]|https://rt.perl.org/Ticket/Display.html?id=133423>
=head1 Incompatible Changes
There are no changes intentionally incompatible with 5.28.0. If any exist,
they are bugs, and we request that you submit a report. See
L</Reporting Bugs> below.
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
=over 4
=item *
L<Module::CoreList> has been upgraded from version 5.20180622 to 5.20181129_28.
=back
=head1 Selected Bug Fixes
=over 4
=item *
Perl 5.28 introduced an C<index()> optimization when comparing to -1 (or
indirectly, e.g. >= 0). When this optimization was triggered inside a C<when>
clause it caused a warning ("Argument %s isn't numeric in smart match"). This
has now been fixed.
L<[perl #133368]|https://rt.perl.org/Ticket/Display.html?id=133368>
=item *
Matching of decimal digits in script runs, introduced in Perl 5.28, had a bug
that led to C<"1\N{THAI DIGIT FIVE}"> matching C</^(*sr:\d+)$/> when it should
not. This has now been fixed.
=item *
The new in-place editing code no longer leaks directory handles.
L<[perl #133314]|https://rt.perl.org/Ticket/Display.html?id=133314>
=back
=head1 Acknowledgements
Perl 5.28.1 represents approximately 5 months of development since Perl 5.28.0
and contains approximately 6,100 lines of changes across 44 files from 12
authors.
Excluding auto-generated files, documentation and release tools, there were
approximately 700 lines of changes to 12 .pm, .t, .c and .h files.
Perl continues to flourish into its fourth decade thanks to a vibrant community
of users and developers. The following people are known to have contributed
the improvements that became Perl 5.28.1:
Aaron Crane, Abigail, Chris 'BinGOs' Williams, Dagfinn Ilmari Mannsåker, David
Mitchell, James E Keenan, John SJ Anderson, Karen Etheridge, Karl Williamson,
Sawyer X, Steve Hay, Tony Cook.
The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.
Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.
For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the perl bug database
at L<https://rt.perl.org/> . There may also be information at
L<http://www.perl.org/> , the Perl Home Page.
If you believe you have an unreported bug, please run the L<perlbug> program
included with your release. Be sure to trim your bug down to a tiny but
sufficient test case. Your bug report, along with the output of C<perl -V>,
will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
If the bug you are reporting has security implications which make it
inappropriate to send to a publicly archived mailing list, then see
L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
for details of how to report the issue.
=head1 Give Thanks
If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
you can do so by running the C<perlthanks> program:
perlthanks
This will send an email to the Perl 5 Porters list with your show of thanks.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details on
what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,199 @@
=encoding utf8
=head1 NAME
perl5282delta - what is new for perl v5.28.2
=head1 DESCRIPTION
This document describes differences between the 5.28.1 release and the 5.28.2
release.
If you are upgrading from an earlier release such as 5.28.0, first read
L<perl5281delta>, which describes differences between 5.28.0 and 5.28.1.
=head1 Incompatible Changes
=head2 Any set of digits in the Common script are legal in a script run of
another script
There are several sets of digits in the Common script. C<[0-9]> is the most
familiar. But there are also C<[\x{FF10}-\x{FF19}]> (FULLWIDTH DIGIT ZERO -
FULLWIDTH DIGIT NINE), and several sets for use in mathematical notation, such
as the MATHEMATICAL DOUBLE-STRUCK DIGITs. Any of these sets should be able to
appear in script runs of, say, Greek. But the previous design overlooked all
but the ASCII digits C<[0-9]>, so the design was flawed. This has been fixed,
so is both a bug fix and an incompatibility.
All digits in a run still have to come from the same set of ten digits.
L<[perl #133547]|https://rt.perl.org/Ticket/Display.html?id=133547>
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
=over 4
=item *
L<Module::CoreList> has been upgraded from version 5.20181129_28 to 5.20190419.
=item *
L<PerlIO::scalar> has been upgraded from version 0.29 to 0.30.
=item *
L<Storable> has been upgraded from version 3.08 to 3.08_01.
=back
=head1 Platform Support
=head2 Platform-Specific Notes
=over 4
=item Windows
The Windows Server 2003 SP1 Platform SDK build, with its early x64 compiler and
tools, was accidentally broken in Perl 5.27.9. This has now been fixed.
=item Mac OS X
Perl's build and testing process on Mac OS X for C<-Duseshrplib> builds is now
compatible with Mac OS X System Integrity Protection (SIP).
SIP prevents binaries in F</bin> (and a few other places) being passed the
C<DYLD_LIBRARY_PATH> environment variable. For our purposes this prevents
C<DYLD_LIBRARY_PATH> from being passed to the shell, which prevents that
variable being passed to the testing or build process, so running C<perl>
couldn't find F<libperl.dylib>.
To work around that, the initial build of the F<perl> executable expects to
find F<libperl.dylib> in the build directory, and the library path is then
adjusted during installation to point to the installed library.
L<[perl #126706]|https://rt.perl.org/Ticket/Display.html?id=126706>
=back
=head1 Selected Bug Fixes
=over 4
=item *
If an in-place edit is still in progress during global destruction and the
process exit code (as stored in C<$?>) is zero, perl will now treat the
in-place edit as successful, replacing the input file with any output produced.
This allows code like:
perl -i -ne 'print "Foo"; last'
to replace the input file, while code like:
perl -i -ne 'print "Foo"; die'
will not. Partly resolves [perl #133659].
L<[perl #133659]|https://rt.perl.org/Ticket/Display.html?id=133659>
=item *
A regression in Perl 5.28 caused the following code to fail
close(STDIN); open(CHILD, "|wc -l")'
because the child's stdin would be closed on exec. This has now been fixed.
=item *
C<pack "u", "invalid uuencoding"> now properly NUL terminates the zero-length
SV produced.
L<[perl #132655]|https://rt.perl.org/Ticket/Display.html?id=132655>
=item *
Failing to compile a format now aborts compilation. Like other errors in
sub-parses this could leave the parser in a strange state, possibly crashing
perl if compilation continued.
L<[perl #132158]|https://rt.perl.org/Ticket/Display.html?id=132158>
=item *
See L</Any set of digits in the Common script are legal in a script run of
another script>.
=back
=head1 Acknowledgements
Perl 5.28.2 represents approximately 4 months of development since Perl 5.28.1
and contains approximately 2,500 lines of changes across 75 files from 13
authors.
Excluding auto-generated files, documentation and release tools, there were
approximately 1,200 lines of changes to 29 .pm, .t, .c and .h files.
Perl continues to flourish into its fourth decade thanks to a vibrant community
of users and developers. The following people are known to have contributed
the improvements that became Perl 5.28.2:
Aaron Crane, Abigail, Andy Dougherty, David Mitchell, Karen Etheridge, Karl
Williamson, Leon Timmermans, Nicolas R., Sawyer X, Steve Hay, Tina Müller,
Tony Cook, Zak B. Elep.
The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.
Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.
For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the perl bug database
at L<https://rt.perl.org/> . There may also be information at
L<http://www.perl.org/> , the Perl Home Page.
If you believe you have an unreported bug, please run the L<perlbug> program
included with your release. Be sure to trim your bug down to a tiny but
sufficient test case. Your bug report, along with the output of C<perl -V>,
will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
If the bug you are reporting has security implications which make it
inappropriate to send to a publicly archived mailing list, then see
L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
for details of how to report the issue.
=head1 Give Thanks
If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
you can do so by running the C<perlthanks> program:
perlthanks
This will send an email to the Perl 5 Porters list with your show of thanks.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details on
what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,144 @@
=encoding utf8
=head1 NAME
perl5283delta - what is new for perl v5.28.3
=head1 DESCRIPTION
This document describes differences between the 5.28.2 release and the 5.28.3
release.
If you are upgrading from an earlier release such as 5.28.1, first read
L<perl5282delta>, which describes differences between 5.28.1 and 5.28.2.
=head1 Security
=head2 [CVE-2020-10543] Buffer overflow caused by a crafted regular expression
A signed C<size_t> integer overflow in the storage space calculations for
nested regular expression quantifiers could cause a heap buffer overflow in
Perl's regular expression compiler that overwrites memory allocated after the
regular expression storage space with attacker supplied data.
The target system needs a sufficient amount of memory to allocate partial
expansions of the nested quantifiers prior to the overflow occurring. This
requirement is unlikely to be met on 64-bit systems.
Discovered by: ManhND of The Tarantula Team, VinCSS (a member of Vingroup).
=head2 [CVE-2020-10878] Integer overflow via malformed bytecode produced by a crafted regular expression
Integer overflows in the calculation of offsets between instructions for the
regular expression engine could cause corruption of the intermediate language
state of a compiled regular expression. An attacker could abuse this behaviour
to insert instructions into the compiled form of a Perl regular expression.
Discovered by: Hugo van der Sanden and Slaven Rezic.
=head2 [CVE-2020-12723] Buffer overflow caused by a crafted regular expression
Recursive calls to C<S_study_chunk()> by Perl's regular expression compiler to
optimize the intermediate language representation of a regular expression could
cause corruption of the intermediate language state of a compiled regular
expression.
Discovered by: Sergey Aleynikov.
=head2 Additional Note
An application written in Perl would only be vulnerable to any of the above
flaws if it evaluates regular expressions supplied by the attacker. Evaluating
regular expressions in this fashion is known to be dangerous since the regular
expression engine does not protect against denial of service attacks in this
usage scenario.
=head1 Incompatible Changes
There are no changes intentionally incompatible with Perl 5.28.2. If any
exist, they are bugs, and we request that you submit a report. See
L</Reporting Bugs> below.
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
=over 4
=item *
L<Module::CoreList> has been upgraded from version 5.20190419 to 5.20200601_28.
=back
=head1 Testing
Tests were added and changed to reflect the other additions and changes in this
release.
=head1 Acknowledgements
Perl 5.28.3 represents approximately 13 months of development since Perl 5.28.2
and contains approximately 3,100 lines of changes across 48 files from 16
authors.
Excluding auto-generated files, documentation and release tools, there were
approximately 1,700 lines of changes to 9 .pm, .t, .c and .h files.
Perl continues to flourish into its fourth decade thanks to a vibrant community
of users and developers. The following people are known to have contributed
the improvements that became Perl 5.28.3:
Chris 'BinGOs' Williams, Dan Book, Hugo van der Sanden, James E Keenan, John
Lightsey, Karen Etheridge, Karl Williamson, Matthew Horsfall, Max Maischein,
Nicolas R., Renee Baecker, Sawyer X, Steve Hay, Tom Hukins, Tony Cook, Zak B.
Elep.
The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.
Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.
For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the perl bug database at
L<https://github.com/Perl/perl5/issues>. There may also be information at
L<https://www.perl.org/>, the Perl Home Page.
If you believe you have an unreported bug, please open an issue at
L<https://github.com/Perl/perl5/issues>. Be sure to trim your bug down to a
tiny but sufficient test case.
If the bug you are reporting has security implications which make it
inappropriate to send to a public issue tracker, then see
L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION> for details of how to
report the issue.
=head1 Give Thanks
If you wish to thank the Perl 5 Porters for the work we had done in Perl 5, you
can do so by running the C<perlthanks> program:
perlthanks
This will send an email to the Perl 5 Porters list with your show of thanks.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details on
what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,188 @@
=encoding utf8
=head1 NAME
perl5301delta - what is new for perl v5.30.1
=head1 DESCRIPTION
This document describes differences between the 5.30.0 release and the 5.30.1
release.
If you are upgrading from an earlier release such as 5.29.0, first read
L<perl5300delta>, which describes differences between 5.29.0 and 5.30.0.
=head1 Incompatible Changes
There are no changes intentionally incompatible with 5.30.1. If any exist,
they are bugs, and we request that you submit a report. See
L</Reporting Bugs> below.
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
=over 4
=item *
L<Module::CoreList> has been upgraded from version 5.20190522 to 5.20191110.
=back
=head1 Documentation
=head2 Changes to Existing Documentation
We have attempted to update the documentation to reflect the changes listed in
this document. If you find any we have missed, send email to
L<perlbug@perl.org|mailto:perlbug@perl.org>.
Additionally, documentation has been updated to reference GitHub as the new
canonical repository and to describe the new GitHub pull request workflow.
=head1 Configuration and Compilation
=over 4
=item *
The C<ECHO> macro is now defined. This is used in a C<dtrace> rule that was
originally changed for FreeBSD, and the FreeBSD make apparently predefines it.
The Solaris make does not predefine C<ECHO> which broke this rule on Solaris.
L<[perl #17057]|https://github.com/perl/perl5/issues/17057>
=back
=head1 Testing
Tests were added and changed to reflect the other additions and changes in this
release.
=head1 Platform Support
=head2 Platform-Specific Notes
=over 4
=item Win32
The locale tests could crash on Win32 due to a Windows bug, and separately due
to the CRT throwing an exception if the locale name wasn't validly encoded in
the current code page.
For the second we now decode the locale name ourselves, and always decode it as
UTF-8.
L<[perl #16922]|https://github.com/perl/perl5/issues/16922>
=back
=head1 Selected Bug Fixes
=over 4
=item *
Setting C<$)> now properly sets supplementary group ids, if you have the
necessary privileges.
L<[perl #17031]|https://github.com/perl/perl5/issues/17031>
=item *
C<readline @foo> now evaluates C<@foo> in scalar context. Previously, it would
be evaluated in list context, and since readline() pops only one argument from
the stack, the stack could underflow, or be left with unexpected values on it.
L<[perl #16929]|https://github.com/perl/perl5/issues/16929>
=item *
sv_gets() now recovers better if the target SV is modified by a signal handler.
L<[perl #16960]|https://github.com/perl/perl5/issues/16960>
=item *
Matching a non-C<SVf_UTF8> string against a regular expression containing
Unicode literals could leak an SV on each match attempt.
L<[perl #17140]|https://github.com/perl/perl5/issues/17140>
=item *
C<< sprintf("%.*a", -10000, $x) >> would cause a buffer overflow due to
mishandling of the negative precision value.
L<[perl #16942]|https://github.com/perl/perl5/issues/16942>
=item *
C<scalar()> on a reference could cause an erroneous assertion failure during
compilation.
L<[perl #16969]|https://github.com/perl/perl5/issues/16969>
=back
=head1 Acknowledgements
Perl 5.30.1 represents approximately 6 months of development since Perl 5.30.0
and contains approximately 4,700 lines of changes across 67 files from 14
authors.
Excluding auto-generated files, documentation and release tools, there were
approximately 910 lines of changes to 20 .pm, .t, .c and .h files.
Perl continues to flourish into its fourth decade thanks to a vibrant community
of users and developers. The following people are known to have contributed
the improvements that became Perl 5.30.1:
Chris 'BinGOs' Williams, Dan Book, David Mitchell, Hugo van der Sanden, James E
Keenan, Karen Etheridge, Karl Williamson, Manuel Mausz, Max Maischein, Nicolas
R., Sawyer X, Steve Hay, Tom Hukins, Tony Cook.
The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.
Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.
For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the perl bug database at
L<https://rt.perl.org/>. There may also be information at
L<http://www.perl.org/>, the Perl Home Page.
If you believe you have an unreported bug, please run the L<perlbug> program
included with your release. Be sure to trim your bug down to a tiny but
sufficient test case. Your bug report, along with the output of C<perl -V>,
will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
If the bug you are reporting has security implications which make it
inappropriate to send to a publicly archived mailing list, then see
L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION> for details of how to
report the issue.
=head1 Give Thanks
If you wish to thank the Perl 5 Porters for the work we had done in Perl 5, you
can do so by running the C<perlthanks> program:
perlthanks
This will send an email to the Perl 5 Porters list with your show of thanks.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details on
what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,174 @@
=encoding utf8
=head1 NAME
perl5302delta - what is new for perl v5.30.2
=head1 DESCRIPTION
This document describes differences between the 5.30.1 release and the 5.30.2
release.
If you are upgrading from an earlier release such as 5.30.0, first read
L<perl5301delta>, which describes differences between 5.30.0 and 5.30.1.
=head1 Incompatible Changes
There are no changes intentionally incompatible with 5.30.0. If any exist,
they are bugs, and we request that you submit a report. See L</Reporting Bugs>
below.
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
=over 4
=item *
L<Compress::Raw::Bzip2> has been upgraded from version 2.084 to 2.089.
=item *
L<Module::CoreList> has been upgraded from version 5.20191110 to 5.20200314.
=back
=head1 Documentation
=head2 Changes to Existing Documentation
We have attempted to update the documentation to reflect the changes
listed in this document. If you find any we have missed, send email
to L<https://github.com/Perl/perl5/issues>.
=head1 Configuration and Compilation
=over 4
=item *
GCC 10 is now supported by F<Configure>.
=back
=head1 Testing
Tests were added and changed to reflect the other additions and changes in this
release.
=head1 Platform Support
=head2 Platform-Specific Notes
=over 4
=item Windows
The MYMALLOC (PERL_MALLOC) build on Windows has been fixed.
=back
=head1 Selected Bug Fixes
=over 4
=item *
printf() or sprintf() with the C<%n> format no longer cause a panic on
debugging builds, or report an incorrectly cached length value when producing
C<SVfUTF8> flagged strings.
[L<GH #17221|https://github.com/Perl/perl5/issues/17221>]
=item *
A memory leak in regular expression patterns has been fixed.
[L<GH #17218|https://github.com/Perl/perl5/issues/17218>]
=item *
A read beyond buffer in grok_infnan has been fixed.
[L<GH #17370|https://github.com/Perl/perl5/issues/17370>]
=item *
An assertion failure in the regular expression engine has been fixed.
[L<GH #17372|https://github.com/Perl/perl5/issues/17372>]
=item *
C<(?{...})> eval groups in regular expressions no longer unintentionally
trigger "EVAL without pos change exceeded limit in regex".
[L<GH #17490|https://github.com/Perl/perl5/issues/17490>]
=back
=head1 Acknowledgements
Perl 5.30.2 represents approximately 4 months of development since Perl 5.30.1
and contains approximately 2,100 lines of changes across 110 files from 15
authors.
Excluding auto-generated files, documentation and release tools, there were
approximately 920 lines of changes to 30 .pm, .t, .c and .h files.
Perl continues to flourish into its fourth decade thanks to a vibrant community
of users and developers. The following people are known to have contributed
the improvements that became Perl 5.30.2:
Chris 'BinGOs' Williams, Dan Book, David Mitchell, Hugo van der Sanden, Karen
Etheridge, Karl Williamson, Matthew Horsfall, Nicolas R., Petr Písař, Renee
Baecker, Sawyer X, Steve Hay, Tomasz Konojacki, Tony Cook, Yves Orton.
The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.
Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.
For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the perl bug database at
L<https://rt.perl.org/>. There may also be information at
L<http://www.perl.org/>, the Perl Home Page.
If you believe you have an unreported bug, please open an issue at
L<https://github.com/Perl/perl5/issues>. Be sure to trim your bug down to a
tiny but sufficient test case.
If the bug you are reporting has security implications which make it
inappropriate to send to a public issue tracker, then see L<perlsec/SECURITY
VULNERABILITY CONTACT INFORMATION> for details of how to report the issue.
=head1 Give Thanks
If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
you can do so by running the C<perlthanks> program:
perlthanks
This will send an email to the Perl 5 Porters list with your show of thanks.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details on
what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,142 @@
=encoding utf8
=head1 NAME
perl5303delta - what is new for perl v5.30.3
=head1 DESCRIPTION
This document describes differences between the 5.30.2 release and the 5.30.3
release.
If you are upgrading from an earlier release such as 5.30.1, first read
L<perl5302delta>, which describes differences between 5.30.1 and 5.30.2.
=head1 Security
=head2 [CVE-2020-10543] Buffer overflow caused by a crafted regular expression
A signed C<size_t> integer overflow in the storage space calculations for
nested regular expression quantifiers could cause a heap buffer overflow in
Perl's regular expression compiler that overwrites memory allocated after the
regular expression storage space with attacker supplied data.
The target system needs a sufficient amount of memory to allocate partial
expansions of the nested quantifiers prior to the overflow occurring. This
requirement is unlikely to be met on 64-bit systems.
Discovered by: ManhND of The Tarantula Team, VinCSS (a member of Vingroup).
=head2 [CVE-2020-10878] Integer overflow via malformed bytecode produced by a crafted regular expression
Integer overflows in the calculation of offsets between instructions for the
regular expression engine could cause corruption of the intermediate language
state of a compiled regular expression. An attacker could abuse this behaviour
to insert instructions into the compiled form of a Perl regular expression.
Discovered by: Hugo van der Sanden and Slaven Rezic.
=head2 [CVE-2020-12723] Buffer overflow caused by a crafted regular expression
Recursive calls to C<S_study_chunk()> by Perl's regular expression compiler to
optimize the intermediate language representation of a regular expression could
cause corruption of the intermediate language state of a compiled regular
expression.
Discovered by: Sergey Aleynikov.
=head2 Additional Note
An application written in Perl would only be vulnerable to any of the above
flaws if it evaluates regular expressions supplied by the attacker. Evaluating
regular expressions in this fashion is known to be dangerous since the regular
expression engine does not protect against denial of service attacks in this
usage scenario.
=head1 Incompatible Changes
There are no changes intentionally incompatible with Perl 5.30.2. If any
exist, they are bugs, and we request that you submit a report. See
L</Reporting Bugs> below.
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
=over 4
=item *
L<Module::CoreList> has been upgraded from version 5.20200314 to 5.20200601_30.
=back
=head1 Testing
Tests were added and changed to reflect the other additions and changes in this
release.
=head1 Acknowledgements
Perl 5.30.3 represents approximately 3 months of development since Perl 5.30.2
and contains approximately 1,100 lines of changes across 42 files from 7
authors.
Excluding auto-generated files, documentation and release tools, there were
approximately 350 lines of changes to 8 .pm, .t, .c and .h files.
Perl continues to flourish into its fourth decade thanks to a vibrant community
of users and developers. The following people are known to have contributed
the improvements that became Perl 5.30.3:
Chris 'BinGOs' Williams, Hugo van der Sanden, John Lightsey, Karl Williamson,
Nicolas R., Sawyer X, Steve Hay.
The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.
Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.
For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the perl bug database at
L<https://github.com/Perl/perl5/issues>. There may also be information at
L<https://www.perl.org/>, the Perl Home Page.
If you believe you have an unreported bug, please open an issue at
L<https://github.com/Perl/perl5/issues>. Be sure to trim your bug down to a
tiny but sufficient test case.
If the bug you are reporting has security implications which make it
inappropriate to send to a public issue tracker, then see
L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION> for details of how to
report the issue.
=head1 Give Thanks
If you wish to thank the Perl 5 Porters for the work we had done in Perl 5, you
can do so by running the C<perlthanks> program:
perlthanks
This will send an email to the Perl 5 Porters list with your show of thanks.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details on
what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,266 @@
=encoding utf8
=head1 NAME
perldelta - what is new for perl v5.32.1
=head1 DESCRIPTION
This document describes differences between the 5.32.0 release and the 5.32.1
release.
If you are upgrading from an earlier release such as 5.31.0, first read
L<perl5320delta>, which describes differences between 5.31.0 and 5.32.0.
=head1 Incompatible Changes
There are no changes intentionally incompatible with Perl 5.32.0. If any
exist, they are bugs, and we request that you submit a report. See
L</Reporting Bugs> below.
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
=over 4
=item *
L<Data::Dumper> has been upgraded from version 2.174 to 2.174_01.
A number of memory leaks have been fixed.
=item *
L<DynaLoader> has been upgraded from version 1.47 to 1.47_01.
=item *
L<Module::CoreList> has been upgraded from version 5.20200620 to 5.20210123.
=item *
L<Opcode> has been upgraded from version 1.47 to 1.48.
A warning has been added about evaluating untrusted code with the perl
interpreter.
=item *
L<Safe> has been upgraded from version 2.41 to 2.41_01.
A warning has been added about evaluating untrusted code with the perl
interpreter.
=back
=head1 Documentation
=head2 New Documentation
=head3 L<perlgov>
Documentation of the newly formed rules of governance for Perl.
=head3 L<perlsecpolicy>
Documentation of how the Perl security team operates and how the team evaluates
new security reports.
=head2 Changes to Existing Documentation
We have attempted to update the documentation to reflect the changes listed in
this document. If you find any we have missed, open an issue at
L<https://github.com/Perl/perl5/issues>.
Additionally, the following selected changes have been made:
=head3 L<perlop>
=over 4
=item *
Document range op behaviour change.
=back
=head1 Diagnostics
The following additions or changes have been made to diagnostic output,
including warnings and fatal error messages. For the complete list of
diagnostic messages, see L<perldiag>.
=head2 Changes to Existing Diagnostics
=over 4
=item *
L<\K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in mE<sol>%sE<sol>|perldiag/"\K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in m/%s/">
This error was incorrectly produced in some cases involving nested lookarounds.
This has been fixed.
[L<GH #18123|https://github.com/Perl/perl5/issues/18123>]
=back
=head1 Configuration and Compilation
=over 4
=item *
Newer 64-bit versions of the Intel C/C++ compiler are now recognized and have
the correct flags set.
=item *
We now trap SIGBUS when F<Configure> checks for C<va_copy>.
On several systems the attempt to determine if we need C<va_copy> or similar
results in a SIGBUS instead of the expected SIGSEGV, which previously caused a
core dump.
[L<GH #18148|https://github.com/Perl/perl5/issues/18148>]
=back
=head1 Testing
Tests were added and changed to reflect the other additions and changes in this
release.
=head1 Platform Support
=head2 Platform-Specific Notes
=over 4
=item MacOS (Darwin)
The hints file for darwin has been updated to handle future macOS versions
beyond 10. Perl can now be built on macOS Big Sur.
[L<GH #17946|https://github.com/Perl/perl5/issues/17946>,
L<GH #18406|https://github.com/Perl/perl5/issues/18406>]
=item Minix
Build errors on Minix have been fixed.
[L<GH #17908|https://github.com/Perl/perl5/issues/17908>]
=back
=head1 Selected Bug Fixes
=over 4
=item *
Some list assignments involving C<undef> on the left-hand side were
over-optimized and produced incorrect results.
[L<GH #16685|https://github.com/Perl/perl5/issues/16685>,
L<GH #17816|https://github.com/Perl/perl5/issues/17816>]
=item *
Fixed a bug in which some regexps with recursive subpatterns matched
incorrectly.
[L<GH #18096|https://github.com/Perl/perl5/issues/18096>]
=item *
Fixed a deadlock that hung the build when Perl is compiled for debugging memory
problems and has PERL_MEM_LOG enabled.
[L<GH #18341|https://github.com/Perl/perl5/issues/18341>]
=item *
Fixed a crash in the use of chained comparison operators when run under "no
warnings 'uninitialized'".
[L<GH #17917|https://github.com/Perl/perl5/issues/17917>,
L<GH #18380|https://github.com/Perl/perl5/issues/18380>]
=item *
Exceptions thrown from destructors during global destruction are no longer
swallowed.
[L<GH #18063|https://github.com/Perl/perl5/issues/18063>]
=back
=head1 Acknowledgements
Perl 5.32.1 represents approximately 7 months of development since Perl 5.32.0
and contains approximately 7,000 lines of changes across 80 files from 23
authors.
Excluding auto-generated files, documentation and release tools, there were
approximately 1,300 lines of changes to 23 .pm, .t, .c and .h files.
Perl continues to flourish into its fourth decade thanks to a vibrant community
of users and developers. The following people are known to have contributed
the improvements that became Perl 5.32.1:
Adam Hartley, Andy Dougherty, Dagfinn Ilmari Mannsåker, Dan Book, David
Mitchell, Graham Knop, Graham Ollis, Hauke D, H.Merijn Brand, Hugo van der
Sanden, John Lightsey, Karen Etheridge, Karl Williamson, Leon Timmermans, Max
Maischein, Nicolas R., Ricardo Signes, Richard Leach, Sawyer X, Sevan Janiyan,
Steve Hay, Tom Hukins, Tony Cook.
The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.
Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.
For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the perl bug database at
L<https://github.com/Perl/perl5/issues>. There may also be information at
L<http://www.perl.org/>, the Perl Home Page.
If you believe you have an unreported bug, please open an issue at
L<https://github.com/Perl/perl5/issues>. Be sure to trim your bug down to a
tiny but sufficient test case.
If the bug you are reporting has security implications which make it
inappropriate to send to a public issue tracker, then see
L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION> for details of how to
report the issue.
=head1 Give Thanks
If you wish to thank the Perl 5 Porters for the work we had done in Perl 5, you
can do so by running the C<perlthanks> program:
perlthanks
This will send an email to the Perl 5 Porters list with your show of thanks.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details on
what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,162 @@
=head1 NAME
perl582delta - what is new for perl v5.8.2
=head1 DESCRIPTION
This document describes differences between the 5.8.1 release and
the 5.8.2 release.
If you are upgrading from an earlier release such as 5.6.1, first read
the L<perl58delta>, which describes differences between 5.6.0 and
5.8.0, and the L<perl581delta>, which describes differences between
5.8.0 and 5.8.1.
=head1 Incompatible Changes
For threaded builds for modules calling certain re-entrant system calls,
binary compatibility was accidentally lost between 5.8.0 and 5.8.1.
Binary compatibility with 5.8.0 has been restored in 5.8.2, which
necessitates breaking compatibility with 5.8.1. We see this as the
lesser of two evils.
This will only affect people who have a threaded perl 5.8.1, and compiled
modules which use these calls, and now attempt to run the compiled modules
with 5.8.2. The fix is to re-compile and re-install the modules using 5.8.2.
=head1 Core Enhancements
=head2 Hash Randomisation
The hash randomisation introduced with 5.8.1 has been amended. It
transpired that although the implementation introduced in 5.8.1 was source
compatible with 5.8.0, it was not binary compatible in certain cases. 5.8.2
contains an improved implementation which is both source and binary
compatible with both 5.8.0 and 5.8.1, and remains robust against the form of
attack which prompted the change for 5.8.1.
We are grateful to the Debian project for their input in this area.
See L<perlsec/"Algorithmic Complexity Attacks"> for the original
rationale behind this change.
=head2 Threading
Several memory leaks associated with variables shared between threads
have been fixed.
=head1 Modules and Pragmata
=head2 Updated Modules And Pragmata
The following modules and pragmata have been updated since Perl 5.8.1:
=over 4
=item Devel::PPPort
=item Digest::MD5
=item I18N::LangTags
=item libnet
=item MIME::Base64
=item Pod::Perldoc
=item strict
Documentation improved
=item Tie::Hash
Documentation improved
=item Time::HiRes
=item Unicode::Collate
=item Unicode::Normalize
=item UNIVERSAL
Documentation improved
=back
=head1 Selected Bug Fixes
Some syntax errors involving unrecognized filetest operators are now handled
correctly by the parser.
=head1 Changed Internals
Interpreter initialization is more complete when -DMULTIPLICITY is off.
This should resolve problems with initializing and destroying the Perl
interpreter more than once in a single process.
=head1 Platform Specific Problems
Dynamic linker flags have been tweaked for Solaris and OS X, which should
solve problems seen while building some XS modules.
Bugs in OS/2 sockets and tmpfile have been fixed.
In OS X C<setreuid> and friends are troublesome - perl will now work
around their problems as best possible.
=head1 Future Directions
Starting with 5.8.3 we intend to make more frequent maintenance releases,
with a smaller number of changes in each. The intent is to propagate
bug fixes out to stable releases more rapidly and make upgrading stable
releases less of an upheaval. This should give end users more
flexibility in their choice of upgrade timing, and allow them easier
assessment of the impact of upgrades. The current plan is for code freezes
as follows
=over 4
=item *
5.8.3 23:59:59 GMT, Wednesday December 31st 2003
=item *
5.8.4 23:59:59 GMT, Wednesday March 31st 2004
=item *
5.8.5 23:59:59 GMT, Wednesday June 30th 2004
=back
with the release following soon after, when testing is complete.
See L<perl581delta/"Future Directions"> for more soothsaying.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles
recently posted to the comp.lang.perl.misc newsgroup and the perl
bug database at http://bugs.perl.org/. There may also be
information at http://www.perl.com/, the Perl Home Page.
If you believe you have an unreported bug, please run the B<perlbug>
program included with your release. Be sure to trim your bug down
to a tiny but sufficient test case. Your bug report, along with the
output of C<perl -V>, will be sent off to perlbug@perl.org to be
analysed by the Perl porting team. You can browse and search
the Perl 5 bugs at http://bugs.perl.org/
=head1 SEE ALSO
The F<Changes> file for exhaustive details on what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,210 @@
=head1 NAME
perl583delta - what is new for perl v5.8.3
=head1 DESCRIPTION
This document describes differences between the 5.8.2 release and
the 5.8.3 release.
If you are upgrading from an earlier release such as 5.6.1, first read
the L<perl58delta>, which describes differences between 5.6.0 and
5.8.0, and the L<perl581delta> and L<perl582delta>, which describe differences
between 5.8.0, 5.8.1 and 5.8.2
=head1 Incompatible Changes
There are no changes incompatible with 5.8.2.
=head1 Core Enhancements
A C<SCALAR> method is now available for tied hashes. This is called when
a tied hash is used in scalar context, such as
if (%tied_hash) {
...
}
The old behaviour was that %tied_hash would return whatever would have been
returned for that hash before the hash was tied (so usually 0). The new
behaviour in the absence of a SCALAR method is to return TRUE if in the
middle of an C<each> iteration, and otherwise call FIRSTKEY to check if the
hash is empty (making sure that a subsequent C<each> will also begin by
calling FIRSTKEY). Please see L<perltie/SCALAR> for the full details and
caveats.
=head1 Modules and Pragmata
=over 4
=item CGI
=item Cwd
=item Digest
=item Digest::MD5
=item Encode
=item File::Spec
=item FindBin
A function C<again> is provided to resolve problems where modules in different
directories wish to use FindBin.
=item List::Util
You can now weaken references to read only values.
=item Math::BigInt
=item PodParser
=item Pod::Perldoc
=item POSIX
=item Unicode::Collate
=item Unicode::Normalize
=item Test::Harness
=item threads::shared
C<cond_wait> has a new two argument form. C<cond_timedwait> has been added.
=back
=head1 Utility Changes
C<find2perl> now assumes C<-print> as a default action. Previously, it
needed to be specified explicitly.
A new utility, C<prove>, makes it easy to run an individual regression test
at the command line. C<prove> is part of Test::Harness, which users of earlier
Perl versions can install from CPAN.
=head1 New Documentation
The documentation has been revised in places to produce more standard manpages.
The documentation for the special code blocks (BEGIN, CHECK, INIT, END)
has been improved.
=head1 Installation and Configuration Improvements
Perl now builds on OpenVMS I64
=head1 Selected Bug Fixes
Using substr() on a UTF8 string could cause subsequent accesses on that
string to return garbage. This was due to incorrect UTF8 offsets being
cached, and is now fixed.
join() could return garbage when the same join() statement was used to
process 8 bit data having earlier processed UTF8 data, due to the flags
on that statement's temporary workspace not being reset correctly. This
is now fixed.
C<$a .. $b> will now work as expected when either $a or $b is C<undef>
Using Unicode keys with tied hashes should now work correctly.
Reading $^E now preserves $!. Previously, the C code implementing $^E
did not preserve C<errno>, so reading $^E could cause C<errno> and therefore
C<$!> to change unexpectedly.
Reentrant functions will (once more) work with C++. 5.8.2 introduced a bugfix
which accidentally broke the compilation of Perl extensions written in C++
=head1 New or Changed Diagnostics
The fatal error "DESTROY created new reference to dead object" is now
documented in L<perldiag>.
=head1 Changed Internals
The hash code has been refactored to reduce source duplication. The
external interface is unchanged, and aside from the bug fixes described
above, there should be no change in behaviour.
C<hv_clear_placeholders> is now part of the perl API
Some C macros have been tidied. In particular macros which create temporary
local variables now name these variables more defensively, which should
avoid bugs where names clash.
<signal.h> is now always included.
=head1 Configuration and Building
C<Configure> now invokes callbacks regardless of the value of the variable
they are called for. Previously callbacks were only invoked in the
C<case $variable $define)> branch. This change should only affect platform
maintainers writing configuration hints files.
=head1 Platform Specific Problems
The regression test ext/threads/shared/t/wait.t fails on early RedHat 9
and HP-UX 10.20 due to bugs in their threading implementations.
RedHat users should see https://rhn.redhat.com/errata/RHBA-2003-136.html
and consider upgrading their glibc.
=head1 Known Problems
Detached threads aren't supported on Windows yet, as they may lead to
memory access violation problems.
There is a known race condition opening scripts in C<suidperl>. C<suidperl>
is neither built nor installed by default, and has been deprecated since
perl 5.8.0. You are advised to replace use of suidperl with tools such
as sudo ( http://www.courtesan.com/sudo/ )
We have a backlog of unresolved bugs. Dealing with bugs and bug reports
is unglamorous work; not something ideally suited to volunteer labour,
but that is all that we have.
The perl5 development team are implementing changes to help address this
problem, which should go live in early 2004.
=head1 Future Directions
Code freeze for the next maintenance release (5.8.4) is on March 31st 2004,
with release expected by mid April. Similarly 5.8.5's freeze will be at
the end of June, with release by mid July.
=head1 Obituary
Iain 'Spoon' Truskett, Perl hacker, author of L<perlreref> and
contributor to CPAN, died suddenly on 29th December 2003, aged 24.
He will be missed.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles
recently posted to the comp.lang.perl.misc newsgroup and the perl
bug database at http://bugs.perl.org. There may also be
information at http://www.perl.org, the Perl Home Page.
If you believe you have an unreported bug, please run the B<perlbug>
program included with your release. Be sure to trim your bug down
to a tiny but sufficient test case. Your bug report, along with the
output of C<perl -V>, will be sent off to perlbug@perl.org to be
analysed by the Perl porting team. You can browse and search
the Perl 5 bugs at http://bugs.perl.org/
=head1 SEE ALSO
The F<Changes> file for exhaustive details on what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,263 @@
=head1 NAME
perl584delta - what is new for perl v5.8.4
=head1 DESCRIPTION
This document describes differences between the 5.8.3 release and
the 5.8.4 release.
=head1 Incompatible Changes
Many minor bugs have been fixed. Scripts which happen to rely on previously
erroneous behaviour will consider these fixes as incompatible changes :-)
You are advised to perform sufficient acceptance testing on this release
to satisfy yourself that this does not affect you, before putting this
release into production.
The diagnostic output of Carp has been changed slightly, to add a space after
the comma between arguments. This makes it much easier for tools such as
web browsers to wrap it, but might confuse any automatic tools which perform
detailed parsing of Carp output.
The internal dump output has been improved, so that non-printable characters
such as newline and backspace are output in C<\x> notation, rather than
octal. This might just confuse non-robust tools which parse the output of
modules such as Devel::Peek.
=head1 Core Enhancements
=head2 Malloc wrapping
Perl can now be built to detect attempts to assign pathologically large chunks
of memory. Previously such assignments would suffer from integer wrap-around
during size calculations causing a misallocation, which would crash perl, and
could theoretically be used for "stack smashing" attacks. The wrapping
defaults to enabled on platforms where we know it works (most AIX
configurations, BSDi, Darwin, DEC OSF/1, FreeBSD, HP/UX, GNU Linux, OpenBSD,
Solaris, VMS and most Win32 compilers) and defaults to disabled on other
platforms.
=head2 Unicode Character Database 4.0.1
The copy of the Unicode Character Database included in Perl 5.8 has
been updated to 4.0.1 from 4.0.0.
=head2 suidperl less insecure
Paul Szabo has analysed and patched C<suidperl> to remove existing known
insecurities. Currently there are no known holes in C<suidperl>, but previous
experience shows that we cannot be confident that these were the last. You may
no longer invoke the set uid perl directly, so to preserve backwards
compatibility with scripts that invoke #!/usr/bin/suidperl the only set uid
binary is now C<sperl5.8.>I<n> (C<sperl5.8.4> for this release). C<suidperl>
is installed as a hard link to C<perl>; both C<suidperl> and C<perl> will
invoke C<sperl5.8.4> automatically the set uid binary, so this change should
be completely transparent.
For new projects the core perl team would strongly recommend that you use
dedicated, single purpose security tools such as C<sudo> in preference to
C<suidperl>.
=head2 format
In addition to bug fixes, C<format>'s features have been enhanced. See
L<perlform>
=head1 Modules and Pragmata
The (mis)use of C</tmp> in core modules and documentation has been tidied up.
Some modules available both within the perl core and independently from CPAN
("dual-life modules") have not yet had these changes applied; the changes
will be integrated into future stable perl releases as the modules are
updated on CPAN.
=head2 Updated modules
=over 4
=item Attribute::Handlers
=item B
=item Benchmark
=item CGI
=item Carp
=item Cwd
=item Exporter
=item File::Find
=item IO
=item IPC::Open3
=item Local::Maketext
=item Math::BigFloat
=item Math::BigInt
=item Math::BigRat
=item MIME::Base64
=item ODBM_File
=item POSIX
=item Shell
=item Socket
There is experimental support for Linux abstract Unix domain sockets.
=item Storable
=item Switch
Synced with its CPAN version 2.10
=item Sys::Syslog
C<syslog()> can now use numeric constants for facility names and priorities,
in addition to strings.
=item Term::ANSIColor
=item Time::HiRes
=item Unicode::UCD
=item Win32
Win32.pm/Win32.xs has moved from the libwin32 module to core Perl
=item base
=item open
=item threads
Detached threads are now also supported on Windows.
=item utf8
=back
=head1 Performance Enhancements
=over 4
=item *
Accelerated Unicode case mappings (C</i>, C<lc>, C<uc>, etc).
=item *
In place sort optimised (eg C<@a = sort @a>)
=item *
Unnecessary assignment optimised away in
my $s = undef;
my @a = ();
my %h = ();
=item *
Optimised C<map> in scalar context
=back
=head1 Utility Changes
The Perl debugger (F<lib/perl5db.pl>) can now save all debugger commands for
sourcing later, and can display the parent inheritance tree of a given class.
=head1 Installation and Configuration Improvements
The build process on both VMS and Windows has had several minor improvements
made. On Windows Borland's C compiler can now compile perl with PerlIO and/or
USE_LARGE_FILES enabled.
C<perl.exe> on Windows now has a "Camel" logo icon. The use of a camel with
the topic of Perl is a trademark of O'Reilly and Associates Inc., and is used
with their permission (ie distribution of the source, compiling a Windows
executable from it, and using that executable locally). Use of the supplied
camel for anything other than a perl executable's icon is specifically not
covered, and anyone wishing to redistribute perl binaries I<with> the icon
should check directly with O'Reilly beforehand.
Perl should build cleanly on Stratus VOS once more.
=head1 Selected Bug Fixes
More utf8 bugs fixed, notably in how C<chomp>, C<chop>, C<send>, and
C<syswrite> and interact with utf8 data. Concatenation now works correctly
when C<use bytes;> is in scope.
Pragmata are now correctly propagated into (?{...}) constructions in regexps.
Code such as
my $x = qr{ ... (??{ $x }) ... };
will now (correctly) fail under use strict. (As the inner C<$x> is and
has always referred to C<$::x>)
The "const in void context" warning has been suppressed for a constant in an
optimised-away boolean expression such as C<5 || print;>
C<perl -i> could C<fchmod(stdin)> by mistake. This is serious if stdin is
attached to a terminal, and perl is running as root. Now fixed.
=head1 New or Changed Diagnostics
C<Carp> and the internal diagnostic routines used by C<Devel::Peek> have been
made clearer, as described in L</Incompatible Changes>
=head1 Changed Internals
Some bugs have been fixed in the hash internals. Restricted hashes and
their place holders are now allocated and deleted at slightly different times,
but this should not be visible to user code.
=head1 Future Directions
Code freeze for the next maintenance release (5.8.5) will be on 30th June
2004, with release by mid July.
=head1 Platform Specific Problems
This release is known not to build on Windows 95.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles
recently posted to the comp.lang.perl.misc newsgroup and the perl
bug database at http://bugs.perl.org. There may also be
information at http://www.perl.org, the Perl Home Page.
If you believe you have an unreported bug, please run the B<perlbug>
program included with your release. Be sure to trim your bug down
to a tiny but sufficient test case. Your bug report, along with the
output of C<perl -V>, will be sent off to perlbug@perl.org to be
analysed by the Perl porting team. You can browse and search
the Perl 5 bugs at http://bugs.perl.org/
=head1 SEE ALSO
The F<Changes> file for exhaustive details on what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,257 @@
=head1 NAME
perl585delta - what is new for perl v5.8.5
=head1 DESCRIPTION
This document describes differences between the 5.8.4 release and
the 5.8.5 release.
=head1 Incompatible Changes
There are no changes incompatible with 5.8.4.
=head1 Core Enhancements
Perl's regular expression engine now contains support for matching on the
intersection of two Unicode character classes. You can also now refer to
user-defined character classes from within other user defined character
classes.
=head1 Modules and Pragmata
=over 4
=item *
Carp improved to work nicely with Safe. Carp's message reporting should now
be anomaly free - it will always print out line number information.
=item *
CGI upgraded to version 3.05
=item *
charnames now avoids clobbering $_
=item *
Digest upgraded to version 1.08
=item *
Encode upgraded to version 2.01
=item *
FileCache upgraded to version 1.04
=item *
libnet upgraded to version 1.19
=item *
Pod::Parser upgraded to version 1.28
=item *
Pod::Perldoc upgraded to version 3.13
=item *
Pod::LaTeX upgraded to version 0.57
=item *
Safe now works properly with Carp
=item *
Scalar-List-Utils upgraded to version 1.14
=item *
Shell's documentation has been re-written, and its historical partial
auto-quoting of command arguments can now be disabled.
=item *
Test upgraded to version 1.25
=item *
Test::Harness upgraded to version 2.42
=item *
Time::Local upgraded to version 1.10
=item *
Unicode::Collate upgraded to version 0.40
=item *
Unicode::Normalize upgraded to version 0.30
=back
=head1 Utility Changes
=head2 Perl's debugger
The debugger can now emulate stepping backwards, by restarting and rerunning
all bar the last command from a saved command history.
=head2 h2ph
F<h2ph> is now able to understand a very limited set of C inline functions
-- basically, the inline functions that look like CPP macros. This has
been introduced to deal with some of the headers of the newest versions of
the glibc. The standard warning still applies; to quote F<h2ph>'s
documentation, I<you may need to dicker with the files produced>.
=head1 Installation and Configuration Improvements
Perl 5.8.5 should build cleanly from source on LynxOS.
=head1 Selected Bug Fixes
=over 4
=item *
The in-place sort optimisation introduced in 5.8.4 had a bug. For example,
in code such as
@a = sort ($b, @a)
the result would omit the value $b. This is now fixed.
=item *
The optimisation for unnecessary assignments introduced in 5.8.4 could give
spurious warnings. This has been fixed.
=item *
Perl should now correctly detect and read BOM-marked and (BOMless) UTF-16
scripts of either endianness.
=item *
Creating a new thread when weak references exist was buggy, and would often
cause warnings at interpreter destruction time. The known bug is now fixed.
=item *
Several obscure bugs involving manipulating Unicode strings with C<substr> have
been fixed.
=item *
Previously if Perl's file globbing function encountered a directory that it
did not have permission to open it would return immediately, leading to
unexpected truncation of the list of results. This has been fixed, to be
consistent with Unix shells' globbing behaviour.
=item *
Thread creation time could vary wildly between identical runs. This was caused
by a poor hashing algorithm in the thread cloning routines, which has now
been fixed.
=item *
The internals of the ithreads implementation were not checking if OS-level
thread creation had failed. threads->create() now returns C<undef> in if
thread creation fails instead of crashing perl.
=back
=head1 New or Changed Diagnostics
=over 4
=item *
Perl -V has several improvements
=over 4
=item *
correctly outputs local patch names that contain embedded code snippets
or other characters that used to confuse it.
=item *
arguments to -V that look like regexps will give multiple lines of output.
=item *
a trailing colon suppresses the linefeed and ';' terminator, allowing
embedding of queries into shell commands.
=item *
a leading colon removes the 'name=' part of the response, allowing mapping to
any name.
=back
=item *
When perl fails to find the specified script, it now outputs a second line
suggesting that the user use the C<-S> flag:
$ perl5.8.5 missing.pl
Can't open perl script "missing.pl": No such file or directory.
Use -S to search $PATH for it.
=back
=head1 Changed Internals
The Unicode character class files used by the regular expression engine are
now built at build time from the supplied Unicode consortium data files,
instead of being shipped prebuilt. This makes the compressed Perl source
tarball about 200K smaller. A side effect is that the layout of files inside
lib/unicore has changed.
=head1 Known Problems
The regression test F<t/uni/class.t> is now performing considerably more
tests, and can take several minutes to run even on a fast machine.
=head1 Platform Specific Problems
This release is known not to build on Windows 95.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles
recently posted to the comp.lang.perl.misc newsgroup and the perl
bug database at http://bugs.perl.org. There may also be
information at http://www.perl.org, the Perl Home Page.
If you believe you have an unreported bug, please run the B<perlbug>
program included with your release. Be sure to trim your bug down
to a tiny but sufficient test case. Your bug report, along with the
output of C<perl -V>, will be sent off to perlbug@perl.org to be
analysed by the Perl porting team. You can browse and search
the Perl 5 bugs at http://bugs.perl.org/
=head1 SEE ALSO
The F<Changes> file for exhaustive details on what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,170 @@
=head1 NAME
perl586delta - what is new for perl v5.8.6
=head1 DESCRIPTION
This document describes differences between the 5.8.5 release and
the 5.8.6 release.
=head1 Incompatible Changes
There are no changes incompatible with 5.8.5.
=head1 Core Enhancements
The perl interpreter is now more tolerant of UTF-16-encoded scripts.
On Win32, Perl can now use non-IFS compatible LSPs, which allows Perl to
work in conjunction with firewalls such as McAfee Guardian. For full details
see the file F<README.win32>, particularly if you're running Win95.
=head1 Modules and Pragmata
=over 4
=item *
With the C<base> pragma, an intermediate class with no fields used to messes
up private fields in the base class. This has been fixed.
=item *
Cwd upgraded to version 3.01 (as part of the new PathTools distribution)
=item *
Devel::PPPort upgraded to version 3.03
=item *
File::Spec upgraded to version 3.01 (as part of the new PathTools distribution)
=item *
Encode upgraded to version 2.08
=item *
ExtUtils::MakeMaker remains at version 6.17, as later stable releases currently
available on CPAN have some issues with core modules on some core platforms.
=item *
I18N::LangTags upgraded to version 0.35
=item *
Math::BigInt upgraded to version 1.73
=item *
Math::BigRat upgraded to version 0.13
=item *
MIME::Base64 upgraded to version 3.05
=item *
POSIX::sigprocmask function can now retrieve the current signal mask without
also setting it.
=item *
Time::HiRes upgraded to version 1.65
=back
=head1 Utility Changes
Perl has a new -dt command-line flag, which enables threads support in the
debugger.
=head1 Performance Enhancements
C<reverse sort ...> is now optimized to sort in reverse, avoiding the
generation of a temporary intermediate list.
C<for (reverse @foo)> now iterates in reverse, avoiding the generation of a
temporary reversed list.
=head1 Selected Bug Fixes
The regexp engine is now more robust when given invalid utf8 input, as is
sometimes generated by buggy XS modules.
C<foreach> on threads::shared array used to be able to crash Perl. This bug
has now been fixed.
A regexp in C<STDOUT>'s destructor used to coredump, because the regexp pad
was already freed. This has been fixed.
C<goto &> is now more robust - bugs in deep recursion and chained C<goto &>
have been fixed.
Using C<delete> on an array no longer leaks memory. A C<pop> of an item from a
shared array reference no longer causes a leak.
C<eval_sv()> failing a taint test could corrupt the stack - this has been
fixed.
On platforms with 64 bit pointers numeric comparison operators used to
erroneously compare the addresses of references that are overloaded, rather
than using the overloaded values. This has been fixed.
C<read> into a UTF8-encoded buffer with an offset off the end of the buffer
no longer mis-calculates buffer lengths.
Although Perl has promised since version 5.8 that C<sort()> would be
stable, the two cases C<sort {$b cmp $a}> and C<< sort {$b <=> $a} >> could
produce non-stable sorts. This is corrected in perl5.8.6.
Localising C<$^D> no longer generates a diagnostic message about valid -D
flags.
=head1 New or Changed Diagnostics
For -t and -T,
Too late for "-T" option
has been changed to the more informative
"-T" is on the #! line, it must also be used on the command line
=head1 Changed Internals
From now on all applications embedding perl will behave as if perl
were compiled with -DPERL_USE_SAFE_PUTENV. See "Environment access" in
the F<INSTALL> file for details.
Most C<C> source files now have comments at the top explaining their purpose,
which should help anyone wishing to get an overview of the implementation.
=head1 New Tests
There are significantly more tests for the C<B> suite of modules.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles
recently posted to the comp.lang.perl.misc newsgroup and the perl
bug database at http://bugs.perl.org. There may also be
information at http://www.perl.org, the Perl Home Page.
If you believe you have an unreported bug, please run the B<perlbug>
program included with your release. Be sure to trim your bug down
to a tiny but sufficient test case. Your bug report, along with the
output of C<perl -V>, will be sent off to perlbug@perl.org to be
analysed by the Perl porting team. You can browse and search
the Perl 5 bugs at http://bugs.perl.org/
=head1 SEE ALSO
The F<Changes> file for exhaustive details on what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,379 @@
=head1 NAME
perl587delta - what is new for perl v5.8.7
=head1 DESCRIPTION
This document describes differences between the 5.8.6 release and
the 5.8.7 release.
=head1 Incompatible Changes
There are no changes incompatible with 5.8.6.
=head1 Core Enhancements
=head2 Unicode Character Database 4.1.0
The copy of the Unicode Character Database included in Perl 5.8 has
been updated to 4.1.0 from 4.0.1. See
L<http://www.unicode.org/versions/Unicode4.1.0/#NotableChanges> for the
notable changes.
=head2 suidperl less insecure
A pair of exploits in C<suidperl> involving debugging code have been closed.
For new projects the core perl team strongly recommends that you use
dedicated, single purpose security tools such as C<sudo> in preference to
C<suidperl>.
=head2 Optional site customization script
The perl interpreter can be built to allow the use of a site customization
script. By default this is not enabled, to be consistent with previous perl
releases. To use this, add C<-Dusesitecustomize> to the command line flags
when running the C<Configure> script. See also L<perlrun/-f>.
=head2 C<Config.pm> is now much smaller.
C<Config.pm> is now about 3K rather than 32K, with the infrequently used
code and C<%Config> values loaded on demand. This is transparent to the
programmer, but means that most code will save parsing and loading 29K of
script (for example, code that uses C<File::Find>).
=head1 Modules and Pragmata
=over 4
=item *
B upgraded to version 1.09
=item *
base upgraded to version 2.07
=item *
bignum upgraded to version 0.17
=item *
bytes upgraded to version 1.02
=item *
Carp upgraded to version 1.04
=item *
CGI upgraded to version 3.10
=item *
Class::ISA upgraded to version 0.33
=item *
Data::Dumper upgraded to version 2.121_02
=item *
DB_File upgraded to version 1.811
=item *
Devel::PPPort upgraded to version 3.06
=item *
Digest upgraded to version 1.10
=item *
Encode upgraded to version 2.10
=item *
FileCache upgraded to version 1.05
=item *
File::Path upgraded to version 1.07
=item *
File::Temp upgraded to version 0.16
=item *
IO::File upgraded to version 1.11
=item *
IO::Socket upgraded to version 1.28
=item *
Math::BigInt upgraded to version 1.77
=item *
Math::BigRat upgraded to version 0.15
=item *
overload upgraded to version 1.03
=item *
PathTools upgraded to version 3.05
=item *
Pod::HTML upgraded to version 1.0503
=item *
Pod::Perldoc upgraded to version 3.14
=item *
Pod::LaTeX upgraded to version 0.58
=item *
Pod::Parser upgraded to version 1.30
=item *
Symbol upgraded to version 1.06
=item *
Term::ANSIColor upgraded to version 1.09
=item *
Test::Harness upgraded to version 2.48
=item *
Test::Simple upgraded to version 0.54
=item *
Text::Wrap upgraded to version 2001.09293, to fix a bug when wrap() was
called with a non-space separator.
=item *
threads::shared upgraded to version 0.93
=item *
Time::HiRes upgraded to version 1.66
=item *
Time::Local upgraded to version 1.11
=item *
Unicode::Normalize upgraded to version 0.32
=item *
utf8 upgraded to version 1.05
=item *
Win32 upgraded to version 0.24, which provides Win32::GetFileVersion
=back
=head1 Utility Changes
=head2 find2perl enhancements
C<find2perl> has new options C<-iname>, C<-path> and C<-ipath>.
=head1 Performance Enhancements
The internal pointer mapping hash used during ithreads cloning now uses an
arena for memory allocation. In tests this reduced ithreads cloning time by
about 10%.
=head1 Installation and Configuration Improvements
=over 4
=item *
The Win32 "dmake" makefile.mk has been updated to make it compatible
with the latest versions of dmake.
=item *
C<PERL_MALLOC>, C<DEBUG_MSTATS>, C<PERL_HASH_SEED_EXPLICIT> and C<NO_HASH_SEED>
should now work in Win32 makefiles.
=back
=head1 Selected Bug Fixes
=over 4
=item *
The socket() function on Win32 has been fixed so that it is able to use
transport providers which specify a protocol of 0 (meaning any protocol
is allowed) once more. (This was broken in 5.8.6, and typically caused
the use of ICMP sockets to fail.)
=item *
Another obscure bug involving C<substr> and UTF-8 caused by bad internal
offset caching has been identified and fixed.
=item *
A bug involving the loading of UTF-8 tables by the regexp engine has been
fixed - code such as C<"\x{100}" =~ /[[:print:]]/> will no longer give
corrupt results.
=item *
Case conversion operations such as C<uc> on a long Unicode string could
exhaust memory. This has been fixed.
=item *
C<index>/C<rindex> were buggy for some combinations of Unicode and
non-Unicode data. This has been fixed.
=item *
C<read> (and presumably C<sysread>) would expose the UTF-8 internals when
reading from a byte oriented file handle into a UTF-8 scalar. This has
been fixed.
=item *
Several C<pack>/C<unpack> bug fixes:
=over 4
=item *
Checksums with C<b> or C<B> formats were broken.
=item *
C<unpack> checksums could overflow with the C<C> format.
=item *
C<U0> and C<C0> are now scoped to C<()> C<pack> sub-templates.
=item *
Counted length prefixes now don't change C<C0>/C<U0> mode.
=item *
C<pack> C<Z0> used to destroy the preceding character.
=item *
C<P>/C<p> C<pack> formats used to only recognise literal C<undef>
=back
=item *
Using closures with ithreads could cause perl to crash. This was due to
failure to correctly lock internal OP structures, and has been fixed.
=item *
The return value of C<close> now correctly reflects any file errors that
occur while flushing the handle's data, instead of just giving failure if
the actual underlying file close operation failed.
=item *
C<not() || 1> used to segfault. C<not()> now behaves like C<not(0)>, which was
the pre 5.6.0 behaviour.
=item *
C<h2ph> has various enhancements to cope with constructs in header files that
used to result in incorrect or invalid output.
=back
=head1 New or Changed Diagnostics
There is a new taint error, "%ENV is aliased to %s". This error is thrown
when taint checks are enabled and when C<*ENV> has been aliased, so that
C<%ENV> has no env-magic anymore and hence the environment cannot be verified
as taint-free.
The internals of C<pack> and C<unpack> have been updated. All legitimate
templates should work as before, but there may be some changes in the error
reported for complex failure cases. Any behaviour changes for non-error cases
are bugs, and should be reported.
=head1 Changed Internals
There has been a fair amount of refactoring of the C<C> source code, partly to
make it tidier and more maintainable. The resulting object code and the
C<perl> binary may well be smaller than 5.8.6, and hopefully faster in some
cases, but apart from this there should be no user-detectable changes.
C<${^UTF8LOCALE}> has been added to give perl space access to C<PL_utf8locale>.
The size of the arenas used to allocate SV heads and most SV bodies can now
be changed at compile time. The old size was 1008 bytes, the new default size
is 4080 bytes.
=head1 Known Problems
Unicode strings returned from overloaded operators can be buggy. This is a
long standing bug reported since 5.8.6 was released, but we do not yet have
a suitable fix for it.
=head1 Platform Specific Problems
On UNICOS, lib/Math/BigInt/t/bigintc.t hangs burning CPU.
ext/B/t/bytecode.t and ext/Socket/t/socketpair.t both fail tests.
These are unlikely to be resolved, as our valiant UNICOS porter's last
Cray is being decommissioned.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles
recently posted to the comp.lang.perl.misc newsgroup and the perl
bug database at http://bugs.perl.org. There may also be
information at http://www.perl.org, the Perl Home Page.
If you believe you have an unreported bug, please run the B<perlbug>
program included with your release. Be sure to trim your bug down
to a tiny but sufficient test case. Your bug report, along with the
output of C<perl -V>, will be sent off to perlbug@perl.org to be
analysed by the Perl porting team. You can browse and search
the Perl 5 bugs at http://bugs.perl.org/
=head1 SEE ALSO
The F<Changes> file for exhaustive details on what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,516 @@
If you read this file _as_is_, just ignore the funny characters you see.
It is written in the POD format (see pod/perlpod.pod) which is specially
designed to be readable as is.
=head1 NAME
perlaix - Perl version 5 on IBM AIX (UNIX) systems
=head1 DESCRIPTION
This document describes various features of IBM's UNIX operating
system AIX that will affect how Perl version 5 (hereafter just Perl)
is compiled and/or runs.
=head2 Compiling Perl 5 on AIX
For information on compilers on older versions of AIX, see L</Compiling
Perl 5 on older AIX versions up to 4.3.3>.
When compiling Perl, you must use an ANSI C compiler. AIX does not ship
an ANSI compliant C compiler with AIX by default, but binary builds of
gcc for AIX are widely available. A version of gcc is also included in
the AIX Toolbox which is shipped with AIX.
=head2 Supported Compilers
Currently all versions of IBM's "xlc", "xlc_r", "cc", "cc_r" or
"vac" ANSI/C compiler will work for building Perl if that compiler
works on your system.
If you plan to link Perl to any module that requires thread-support,
like DBD::Oracle, it is better to use the _r version of the compiler.
This will not build a threaded Perl, but a thread-enabled Perl. See
also L</Threaded Perl> later on.
As of writing (2010-09) only the I<IBM XL C for AIX> or I<IBM XL C/C++
for AIX> compiler is supported by IBM on AIX 5L/6.1/7.1.
The following compiler versions are currently supported by IBM:
IBM XL C and IBM XL C/C++ V8, V9, V10, V11
The XL C for AIX is integrated in the XL C/C++ for AIX compiler and
therefore also supported.
If you choose XL C/C++ V9 you need APAR IZ35785 installed
otherwise the integrated SDBM_File do not compile correctly due
to an optimization bug. You can circumvent this problem by
adding -qipa to the optimization flags (-Doptimize='-O -qipa').
The PTF for APAR IZ35785 which solves this problem is available
from IBM (April 2009 PTF for XL C/C++ Enterprise Edition for AIX, V9.0).
If you choose XL C/C++ V11 you need the April 2010 PTF (or newer)
installed otherwise you will not get a working Perl version.
Perl can be compiled with either IBM's ANSI C compiler or with gcc.
The former is recommended, as not only it can compile Perl with no
difficulty, but also can take advantage of features listed later
that require the use of IBM compiler-specific command-line flags.
If you decide to use gcc, make sure your installation is recent and
complete, and be sure to read the Perl INSTALL file for more gcc-specific
details. Please report any hoops you had to jump through to the
development team.
=head2 Incompatibility with AIX Toolbox lib gdbm
If the AIX Toolbox version of lib gdbm < 1.8.3-5 is installed on your
system then Perl will not work. This library contains the header files
/opt/freeware/include/gdbm/dbm.h|ndbm.h which conflict with the AIX
system versions. The lib gdbm will be automatically removed from the
wanted libraries if the presence of one of these two header files is
detected. If you want to build Perl with GDBM support then please install
at least gdbm-devel-1.8.3-5 (or higher).
=head2 Perl 5 was successfully compiled and tested on:
Perl | AIX Level | Compiler Level | w th | w/o th
-------+---------------------+-------------------------+------+-------
5.12.2 |5.1 TL9 32 bit | XL C/C++ V7 | OK | OK
5.12.2 |5.1 TL9 64 bit | XL C/C++ V7 | OK | OK
5.12.2 |5.2 TL10 SP8 32 bit | XL C/C++ V8 | OK | OK
5.12.2 |5.2 TL10 SP8 32 bit | gcc 3.2.2 | OK | OK
5.12.2 |5.2 TL10 SP8 64 bit | XL C/C++ V8 | OK | OK
5.12.2 |5.3 TL8 SP8 32 bit | XL C/C++ V9 + IZ35785 | OK | OK
5.12.2 |5.3 TL8 SP8 32 bit | gcc 4.2.4 | OK | OK
5.12.2 |5.3 TL8 SP8 64 bit | XL C/C++ V9 + IZ35785 | OK | OK
5.12.2 |5.3 TL10 SP3 32 bit | XL C/C++ V11 + Apr 2010 | OK | OK
5.12.2 |5.3 TL10 SP3 64 bit | XL C/C++ V11 + Apr 2010 | OK | OK
5.12.2 |6.1 TL1 SP7 32 bit | XL C/C++ V10 | OK | OK
5.12.2 |6.1 TL1 SP7 64 bit | XL C/C++ V10 | OK | OK
5.13 |7.1 TL0 SP1 32 bit | XL C/C++ V11 + Jul 2010 | OK | OK
5.13 |7.1 TL0 SP1 64 bit | XL C/C++ V11 + Jul 2010 | OK | OK
w th = with thread support
w/o th = without thread support
OK = tested
Successfully tested means that all "make test" runs finish with a
result of 100% OK. All tests were conducted with -Duseshrplib set.
All tests were conducted on the oldest supported AIX technology level
with the latest support package applied. If the tested AIX version is
out of support (AIX 4.3.3, 5.1, 5.2) then the last available support
level was used.
=head2 Building Dynamic Extensions on AIX
Starting from Perl 5.7.2 (and consequently 5.8.x / 5.10.x / 5.12.x)
and AIX 4.3 or newer Perl uses the AIX native dynamic loading interface
in the so called runtime linking mode instead of the emulated interface
that was used in Perl releases 5.6.1 and earlier or, for AIX releases
4.2 and earlier. This change does break backward compatibility with
compiled modules from earlier Perl releases. The change was made to make
Perl more compliant with other applications like Apache/mod_perl which are
using the AIX native interface. This change also enables the use of
C++ code with static constructors and destructors in Perl extensions,
which was not possible using the emulated interface.
It is highly recommended to use the new interface.
=head2 Using Large Files with Perl
Should yield no problems.
=head2 Threaded Perl
Should yield no problems with AIX 5.1 / 5.2 / 5.3 / 6.1 / 7.1.
IBM uses the AIX system Perl (V5.6.0 on AIX 5.1 and V5.8.2 on
AIX 5.2 / 5.3 and 6.1; V5.8.8 on AIX 5.3 TL11 and AIX 6.1 TL4; V5.10.1
on AIX 7.1) for some AIX system scripts. If you switch the links in
/usr/bin from the AIX system Perl (/usr/opt/perl5) to the newly build
Perl then you get the same features as with the IBM AIX system Perl if
the threaded options are used.
The threaded Perl build works also on AIX 5.1 but the IBM Perl
build (Perl v5.6.0) is not threaded on AIX 5.1.
Perl 5.12 an newer is not compatible with the IBM fileset perl.libext.
=head2 64-bit Perl
If your AIX system is installed with 64-bit support, you can expect 64-bit
configurations to work. If you want to use 64-bit Perl on AIX 6.1
you need an APAR for a libc.a bug which affects (n)dbm_XXX functions.
The APAR number for this problem is IZ39077.
If you need more memory (larger data segment) for your Perl programs you
can set:
/etc/security/limits
default: (or your user)
data = -1 (default is 262144 * 512 byte)
With the default setting the size is limited to 128MB.
The -1 removes this limit. If the "make test" fails please change
your /etc/security/limits as stated above.
=head2 Long doubles
IBM calls its implementation of long doubles 128-bit, but it is not
the IEEE 128-bit ("quadruple precision") which would give 116 bit of
mantissa (nor it is implemented in hardware), instead it's a special
software implementation called "double-double", which gives 106 bits
of mantissa.
There seem to be various problems in this long double implementation.
If Configure detects this brokenness, it will disable the long double support.
This can be overridden with explicit C<-Duselongdouble> (or C<-Dusemorebits>,
which enables both long doubles and 64 bit integers). If you decide to
enable long doubles, for most of the broken things Perl has implemented
workarounds, but the handling of the special values infinity and NaN
remains badly broken: for example infinity plus zero results in NaN.
=head2 Recommended Options AIX 5.1/5.2/5.3/6.1 and 7.1 (threaded/32-bit)
With the following options you get a threaded Perl version which
passes all make tests in threaded 32-bit mode, which is the default
configuration for the Perl builds that AIX ships with.
rm config.sh
./Configure \
-d \
-Dcc=cc_r \
-Duseshrplib \
-Dusethreads \
-Dprefix=/usr/opt/perl5_32
The -Dprefix option will install Perl in a directory parallel to the
IBM AIX system Perl installation.
=head2 Recommended Options AIX 5.1/5.2/5.3/6.1 and 7.1 (32-bit)
With the following options you get a Perl version which passes
all make tests in 32-bit mode.
rm config.sh
./Configure \
-d \
-Dcc=cc_r \
-Duseshrplib \
-Dprefix=/usr/opt/perl5_32
The -Dprefix option will install Perl in a directory parallel to the
IBM AIX system Perl installation.
=head2 Recommended Options AIX 5.1/5.2/5.3/6.1 and 7.1 (threaded/64-bit)
With the following options you get a threaded Perl version which
passes all make tests in 64-bit mode.
export OBJECT_MODE=64 / setenv OBJECT_MODE 64 (depending on your shell)
rm config.sh
./Configure \
-d \
-Dcc=cc_r \
-Duseshrplib \
-Dusethreads \
-Duse64bitall \
-Dprefix=/usr/opt/perl5_64
=head2 Recommended Options AIX 5.1/5.2/5.3/6.1 and 7.1 (64-bit)
With the following options you get a Perl version which passes all
make tests in 64-bit mode.
export OBJECT_MODE=64 / setenv OBJECT_MODE 64 (depending on your shell)
rm config.sh
./Configure \
-d \
-Dcc=cc_r \
-Duseshrplib \
-Duse64bitall \
-Dprefix=/usr/opt/perl5_64
The -Dprefix option will install Perl in a directory parallel to the
IBM AIX system Perl installation.
If you choose gcc to compile 64-bit Perl then you need to add the
following option:
-Dcc='gcc -maix64'
=head2 Compiling Perl 5 on AIX 7.1.0
A regression in AIX 7 causes a failure in make test in Time::Piece during
daylight savings time. APAR IV16514 provides the fix for this. A quick
test to see if it's required, assuming it is currently daylight savings
in Eastern Time, would be to run C< TZ=EST5 date +%Z >. This will come
back with C<EST> normally, but nothing if you have the problem.
=head2 Compiling Perl 5 on older AIX versions up to 4.3.3
Due to the fact that AIX 4.3.3 reached end-of-service in December 31,
2003 this information is provided as is. The Perl versions prior to
Perl 5.8.9 could be compiled on AIX up to 4.3.3 with the following
settings (your mileage may vary):
When compiling Perl, you must use an ANSI C compiler. AIX does not ship
an ANSI compliant C-compiler with AIX by default, but binary builds of
gcc for AIX are widely available.
At the moment of writing, AIX supports two different native C compilers,
for which you have to pay: B<xlC> and B<vac>. If you decide to use either
of these two (which is quite a lot easier than using gcc), be sure to
upgrade to the latest available patch level. Currently:
xlC.C 3.1.4.10 or 3.6.6.0 or 4.0.2.2 or 5.0.2.9 or 6.0.0.3
vac.C 4.4.0.3 or 5.0.2.6 or 6.0.0.1
note that xlC has the OS version in the name as of version 4.0.2.0, so
you will find xlC.C for AIX-5.0 as package
xlC.aix50.rte 5.0.2.0 or 6.0.0.3
subversions are not the same "latest" on all OS versions. For example,
the latest xlC-5 on aix41 is 5.0.2.9, while on aix43, it is 5.0.2.7.
Perl can be compiled with either IBM's ANSI C compiler or with gcc.
The former is recommended, as not only can it compile Perl with no
difficulty, but also can take advantage of features listed later that
require the use of IBM compiler-specific command-line flags.
The IBM's compiler patch levels 5.0.0.0 and 5.0.1.0 have compiler
optimization bugs that affect compiling perl.c and regcomp.c,
respectively. If Perl's configuration detects those compiler patch
levels, optimization is turned off for the said source code files.
Upgrading to at least 5.0.2.0 is recommended.
If you decide to use gcc, make sure your installation is recent and
complete, and be sure to read the Perl INSTALL file for more gcc-specific
details. Please report any hoops you had to jump through to the development
team.
=head2 OS level
Before installing the patches to the IBM C-compiler you need to know the
level of patching for the Operating System. IBM's command 'oslevel' will
show the base, but is not always complete (in this example oslevel shows
4.3.NULL, whereas the system might run most of 4.3.THREE):
# oslevel
4.3.0.0
# lslpp -l | grep 'bos.rte '
bos.rte 4.3.3.75 COMMITTED Base Operating System Runtime
bos.rte 4.3.2.0 COMMITTED Base Operating System Runtime
#
The same might happen to AIX 5.1 or other OS levels. As a side note, Perl
cannot be built without bos.adt.syscalls and bos.adt.libm installed
# lslpp -l | egrep "syscalls|libm"
bos.adt.libm 5.1.0.25 COMMITTED Base Application Development
bos.adt.syscalls 5.1.0.36 COMMITTED System Calls Application
#
=head2 Building Dynamic Extensions on AIX E<lt> 5L
AIX supports dynamically loadable objects as well as shared libraries.
Shared libraries by convention end with the suffix .a, which is a bit
misleading, as an archive can contain static as well as dynamic members.
For Perl dynamically loaded objects we use the .so suffix also used on
many other platforms.
Note that starting from Perl 5.7.2 (and consequently 5.8.0) and AIX 4.3
or newer Perl uses the AIX native dynamic loading interface in the so
called runtime linking mode instead of the emulated interface that was
used in Perl releases 5.6.1 and earlier or, for AIX releases 4.2 and
earlier. This change does break backward compatibility with compiled
modules from earlier Perl releases. The change was made to make Perl
more compliant with other applications like Apache/mod_perl which are
using the AIX native interface. This change also enables the use of C++
code with static constructors and destructors in Perl extensions, which
was not possible using the emulated interface.
=head2 The IBM ANSI C Compiler
All defaults for Configure can be used.
If you've chosen to use vac 4, be sure to run 4.4.0.3. Older versions
will turn up nasty later on. For vac 5 be sure to run at least 5.0.1.0,
but vac 5.0.2.6 or up is highly recommended. Note that since IBM has
removed vac 5.0.2.1 through 5.0.2.5 from the software depot, these
versions should be considered obsolete.
Here's a brief lead of how to upgrade the compiler to the latest
level. Of course this is subject to changes. You can only upgrade
versions from ftp-available updates if the first three digit groups
are the same (in where you can skip intermediate unlike the patches
in the developer snapshots of Perl), or to one version up where the
"base" is available. In other words, the AIX compiler patches are
cumulative.
vac.C.4.4.0.1 => vac.C.4.4.0.3 is OK (vac.C.4.4.0.2 not needed)
xlC.C.3.1.3.3 => xlC.C.3.1.4.10 is NOT OK (xlC.C.3.1.4.0 is not
available)
# ftp ftp.software.ibm.com
Connected to service.boulder.ibm.com.
: welcome message ...
Name (ftp.software.ibm.com:merijn): anonymous
331 Guest login ok, send your complete e-mail address as password.
Password:
... accepted login stuff
ftp> cd /aix/fixes/v4/
ftp> dir other other.ll
output to local-file: other.ll? y
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
226 Transfer complete.
ftp> dir xlc xlc.ll
output to local-file: xlc.ll? y
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
226 Transfer complete.
ftp> bye
... goodbye messages
# ls -l *.ll
-rw-rw-rw- 1 merijn system 1169432 Nov 2 17:29 other.ll
-rw-rw-rw- 1 merijn system 29170 Nov 2 17:29 xlc.ll
On AIX 4.2 using xlC, we continue:
# lslpp -l | fgrep 'xlC.C '
xlC.C 3.1.4.9 COMMITTED C for AIX Compiler
xlC.C 3.1.4.0 COMMITTED C for AIX Compiler
# grep 'xlC.C.3.1.4.*.bff' xlc.ll
-rw-r--r-- 1 45776101 1 6286336 Jul 22 1996 xlC.C.3.1.4.1.bff
-rw-rw-r-- 1 45776101 1 6173696 Aug 24 1998 xlC.C.3.1.4.10.bff
-rw-r--r-- 1 45776101 1 6319104 Aug 14 1996 xlC.C.3.1.4.2.bff
-rw-r--r-- 1 45776101 1 6316032 Oct 21 1996 xlC.C.3.1.4.3.bff
-rw-r--r-- 1 45776101 1 6315008 Dec 20 1996 xlC.C.3.1.4.4.bff
-rw-rw-r-- 1 45776101 1 6178816 Mar 28 1997 xlC.C.3.1.4.5.bff
-rw-rw-r-- 1 45776101 1 6188032 May 22 1997 xlC.C.3.1.4.6.bff
-rw-rw-r-- 1 45776101 1 6191104 Sep 5 1997 xlC.C.3.1.4.7.bff
-rw-rw-r-- 1 45776101 1 6185984 Jan 13 1998 xlC.C.3.1.4.8.bff
-rw-rw-r-- 1 45776101 1 6169600 May 27 1998 xlC.C.3.1.4.9.bff
# wget ftp://ftp.software.ibm.com/aix/fixes/v4/xlc/xlC.C.3.1.4.10.bff
#
On AIX 4.3 using vac, we continue:
# lslpp -l | grep 'vac.C '
vac.C 5.0.2.2 COMMITTED C for AIX Compiler
vac.C 5.0.2.0 COMMITTED C for AIX Compiler
# grep 'vac.C.5.0.2.*.bff' other.ll
-rw-rw-r-- 1 45776101 1 13592576 Apr 16 2001 vac.C.5.0.2.0.bff
-rw-rw-r-- 1 45776101 1 14133248 Apr 9 2002 vac.C.5.0.2.3.bff
-rw-rw-r-- 1 45776101 1 14173184 May 20 2002 vac.C.5.0.2.4.bff
-rw-rw-r-- 1 45776101 1 14192640 Nov 22 2002 vac.C.5.0.2.6.bff
# wget ftp://ftp.software.ibm.com/aix/fixes/v4/other/vac.C.5.0.2.6.bff
#
Likewise on all other OS levels. Then execute the following command, and
fill in its choices
# smit install_update
-> Install and Update from LATEST Available Software
* INPUT device / directory for software [ vac.C.5.0.2.6.bff ]
[ OK ]
[ OK ]
Follow the messages ... and you're done.
If you like a more web-like approach, a good start point can be
L<http://www14.software.ibm.com/webapp/download/downloadaz.jsp> and click
"C for AIX", and follow the instructions.
=head2 The usenm option
If linking miniperl
cc -o miniperl ... miniperlmain.o opmini.o perl.o ... -lm -lc ...
causes error like this
ld: 0711-317 ERROR: Undefined symbol: .aintl
ld: 0711-317 ERROR: Undefined symbol: .copysignl
ld: 0711-317 ERROR: Undefined symbol: .syscall
ld: 0711-317 ERROR: Undefined symbol: .eaccess
ld: 0711-317 ERROR: Undefined symbol: .setresuid
ld: 0711-317 ERROR: Undefined symbol: .setresgid
ld: 0711-317 ERROR: Undefined symbol: .setproctitle
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
you could retry with
make realclean
rm config.sh
./Configure -Dusenm ...
which makes Configure to use the C<nm> tool when scanning for library
symbols, which usually is not done in AIX.
Related to this, you probably should not use the C<-r> option of
Configure in AIX, because that affects of how the C<nm> tool is used.
=head2 Using GNU's gcc for building Perl
Using gcc-3.x (tested with 3.0.4, 3.1, and 3.2) now works out of the box,
as do recent gcc-2.9 builds available directly from IBM as part of their
Linux compatibility packages, available here:
http://www.ibm.com/servers/aix/products/aixos/linux/
=head2 Using Large Files with Perl E<lt> 5L
Should yield no problems.
=head2 Threaded Perl E<lt> 5L
Threads seem to work OK, though at the moment not all tests pass when
threads are used in combination with 64-bit configurations.
You may get a warning when doing a threaded build:
"pp_sys.c", line 4640.39: 1506-280 (W) Function argument assignment
between types "unsigned char*" and "const void*" is not allowed.
The exact line number may vary, but if the warning (W) comes from a line
line this
hent = PerlSock_gethostbyaddr(addr, (Netdb_hlen_t) addrlen, addrtype);
in the "pp_ghostent" function, you may ignore it safely. The warning
is caused by the reentrant variant of gethostbyaddr() having a slightly
different prototype than its non-reentrant variant, but the difference
is not really significant here.
=head2 64-bit Perl E<lt> 5L
If your AIX is installed with 64-bit support, you can expect 64-bit
configurations to work. In combination with threads some tests might
still fail.
=head2 AIX 4.2 and extensions using C++ with statics
In AIX 4.2 Perl extensions that use C++ functions that use statics
may have problems in that the statics are not getting initialized.
In newer AIX releases this has been solved by linking Perl with
the libC_r library, but unfortunately in AIX 4.2 the said library
has an obscure bug where the various functions related to time
(such as time() and gettimeofday()) return broken values, and
therefore in AIX 4.2 Perl is not linked against the libC_r.
=head1 AUTHORS
Rainer Tammer <tammer@tammer.net>
=cut

View File

@@ -0,0 +1,223 @@
If you read this file _as_is_, just ignore the funny characters you
see. It is written in the POD format (see perlpod manpage) which is
specially designed to be readable as is.
=head1 NAME
perlamiga - Perl under AmigaOS 4.1
=head1 NOTE
This is a port of Perl 5.22.1, it is a fresh port and not in any way
compatible with my previous ports of Perl 5.8 and 5.16.3. This means
you will need to reinstall / rebuild any third party modules you have
installed.
newlib.library version 53.28 or greater is required.
=head1 SYNOPSIS
Once perl is installed you can read this document in the following way
sh -c "perldoc perlamiga"
or you may read I<as is>: either as F<README.amiga>, or F<pod/perlamiga.pod>.
=cut
NAME
SYNOPSIS
DESCRIPTION
- Prerequisites
- Starting Perl programs under AmigaOS
- Shortcomings of Perl under AmigaOS
INSTALLATION
CHANGES
=head1 DESCRIPTION
=head2 Prerequisites for running Perl 5.22.1 under AmigaOS 4.1
=over 6
=item B<AmigaOS 4.1 update 6 with all updates applied as of 9th October 2013>
The most important of which is:
=item B<newlib.library version 53.28 or greater>
=item B<AmigaOS SDK>
Perl installs into the SDK directory structure and expects many of the
build tools present in the SDK to be available. So for the best results
install the SDK first.
=item B<abc-shell>
If you do not have the SDK installed you must at least have abc-shell
installed or some other suitable sh port. This is required to run
external commands and should be available as 'sh' in your path.
=back
=head2 Starting Perl programs under AmigaOS 4.1
Perl may be run from the AmigaOS shell but for best results should be
run under abc-shell. (abc-shell handles file globbing, pattern
expansion, and sets up environment variables in the UN*Xy way that
Perl expects.)
For example:
New Shell process 10
10.AmigaOS4:> sh
/AmigaOS4>perl path:to/myprog arg1 arrg2 arg3
Abc-shell can also launch programs via the #! syntax at the start of
the program file, it's best use the form #!SDK:Local/C/perl so that
the AmigaOS shell may also find perl in the same way. AmigaOS requires
the script bit to be set for this to work
10.AmigaOS4:> sh
/AmigaOS4>myprog arg1 arrg2 arg3
=head2 Limitations of Perl under AmigaOS 4.1
=over 6
=item B<Nested Piped programs can crash when run from older abc-shells>
abc-shell version 53.2 has a bug that can cause crashes in the
subprocesses used to run piped programs, if a later version is
available you should install it instead.
=item B<Incorrect or unexpected command line unescaping>
newlib.library 53.30 and earlier incorrectly unescape slashed escape
sequences e.g. \" \n \t etc requiring unusual extra escaping.
=item B<Starting subprocesses via open has limitations>
open FH, "command |"
Subprocesses started with open use a minimal popen() routine and
therefore they do not return pids usable with waitpid etc.
=item If you find any other limitations or bugs then let me know.
Please report bugs in this version of perl to andy@broad.ology.org.uk
in the first instance.
=back
=head1 INSTALLATION
This guide assumes you have obtained a prebuilt archive from os4depot.net.
Unpack the main archive to a temporary location (RAM: is fine).
Execute the provided install script from shell or via its icon.
You B<must not> attempt to install by hand.
Once installed you may delete the temporary archive.
This approach will preserve links in the installation without creating
duplicate binaries.
If you have the earlier ports perl 5.16 or 5.8 installed you may like
to rename your perl executable to perl516 or perl58 or something
similar before the installation of 5.22.1, this will allow you to use
both versions at the same time.
=head1 Amiga Specific Modules
=head2 Amiga::ARexx
The Amiga::ARexx module allows you to easily create a perl based ARexx
host or to send ARexx commands to other programs.
Try C<perldoc Amiga::ARexx> for more info.
=head2 Amiga::Exec
The Amiga::Exec module introduces support for Wait().
Try C<perldoc Amiga::Exec> for more info.
=head1 BUILDING
To build perl under AmigaOS from the patched sources you will need to
have a recent version of the SDK. Version 53.29 is recommended,
earlier versions will probably work too.
With the help of Jarkko Hietaniemi the Configure system has been tweaked to
run under abc-shell so the recommend build process is as follows.
stack 2000000
sh Configure -de
gmake
This will build the default setup that installs under SDK:local/newlib/lib/
=head1 CHANGES
=over 6
=item B<August 2015>
=over 2
=item Port to Perl 5.22
=item Add handling of NIL: to afstat()
=item Fix inheritance of environment variables by subprocesses.
=item Fix exec, and exit in "forked" subprocesses.
=item Fix issue with newlib's unlink, which could cause infinite loops.
=item Add flock() emulation using IDOS->LockRecord thanks to Tony Cook
for the suggestion.
=item Fix issue where kill was using the wrong kind of process ID
=back
=item B<27th November 2013>
=over 2
=item Create new installation system based on installperl links
and Amiga protection bits now set correctly.
=item Pod now defaults to text.
=item File::Spec should now recognise an Amiga style absolute path as well
as an Unix style one. Relative paths must always be Unix style.
=back
=item B<20th November 2013>
=over 2
=item Configured to use SDK:Local/C/perl to start standard scripts
=item Added Amiga::Exec module with support for Wait() and AmigaOS signal numbers.
=back
=item B<10th October 13>
First release of port to 5.16.3.
=back
=head1 SEE ALSO
You like this port? See L<http://www.broad.ology.org.uk/amiga/>
for how you can help.
=cut

View File

@@ -0,0 +1,218 @@
If you read this file _as_is_, just ignore the funny characters you
see. It is written in the POD format (see pod/perlpod.pod) which is
specially designed to be readable as is.
=head1 NAME
perlandroid - Perl under Android
=head1 SYNOPSIS
The first portions of this document contains instructions
to cross-compile Perl for Android 2.0 and later, using the
binaries provided by Google. The latter portions describe how to build
perl native using one of the toolchains available on the Play Store.
=head1 DESCRIPTION
This document describes how to set up your host environment when
attempting to build Perl for Android.
=head1 Cross-compilation
These instructions assume an Unixish build environment on your host system;
they've been tested on Linux and OS X, and may work on Cygwin and MSYS.
While Google also provides an NDK for Windows, these steps won't work
native there, although it may be possible to cross-compile through different
means.
If your host system's architecture is 32 bits, remember to change the
C<x86_64>'s below to C<x86>'s. On a similar vein, the examples below
use the 4.8 toolchain; if you want to use something older or newer (for
example, the 4.4.3 toolchain included in the 8th revision of the NDK), just
change those to the relevant version.
=head2 Get the Android Native Development Kit (NDK)
You can download the NDK from L<https://developer.android.com/tools/sdk/ndk/index.html>.
You'll want the normal, non-legacy version.
=head2 Determine the architecture you'll be cross-compiling for
There's three possible options: arm-linux-androideabi for ARM,
mipsel-linux-android for MIPS, and simply x86 for x86.
As of 2014, most Android devices run on ARM, so that is generally a safe bet.
With those two in hand, you should add
$ANDROID_NDK/toolchains/$TARGETARCH-4.8/prebuilt/`uname | tr '[A-Z]' '[a-z]'`-x86_64/bin
to your C<PATH>, where C<$ANDROID_NDK> is the location where you unpacked the
NDK, and C<$TARGETARCH> is your target's architecture.
=head2 Set up a standalone toolchain
This creates a working sysroot that we can feed to Configure later.
$ export ANDROID_TOOLCHAIN=/tmp/my-toolchain-$TARGETARCH
$ export SYSROOT=$ANDROID_TOOLCHAIN/sysroot
$ $ANDROID_NDK/build/tools/make-standalone-toolchain.sh \
--platform=android-9 \
--install-dir=$ANDROID_TOOLCHAIN \
--system=`uname | tr '[A-Z]' '[a-z]'`-x86_64 \
--toolchain=$TARGETARCH-4.8
=head2 adb or ssh?
adb is the Android Debug Bridge. For our purposes, it's basically a way
of establishing an ssh connection to an Android device without having to
install anything on the device itself, as long as the device is either on
the same local network as the host, or it is connected to the host through
USB.
Perl can be cross-compiled using either adb or a normal ssh connection;
in general, if you can connect your device to the host using a USB port,
or if you don't feel like installing an sshd app on your device,
you may want to use adb, although you may be forced to switch to ssh if
your device is not rooted and you're unlucky -- more on that later.
Alternatively, if you're cross-compiling to an emulator, you'll have to
use adb.
=head3 adb
To use adb, download the Android SDK from L<https://developer.android.com/sdk/index.html>.
The "SDK Tools Only" version should suffice -- if you downloaded the ADT
Bundle, you can find the sdk under F<$ADT_BUNDLE/sdk/>.
Add F<$ANDROID_SDK/platform-tools> to your C<PATH>, which should give you access
to adb. You'll now have to find your device's name using C<adb devices>,
and later pass that to Configure through C<-Dtargethost=$DEVICE>.
However, before calling Configure, you need to check if using adb is a
viable choice in the first place. Because Android doesn't have a F</tmp>,
nor does it allow executables in the sdcard, we need to find somewhere in
the device for Configure to put some files in, as well as for the tests
to run in. If your device is rooted, then you're good. Try running these:
$ export TARGETDIR=/mnt/asec/perl
$ adb -s $DEVICE shell "echo sh -c '\"mkdir $TARGETDIR\"' | su --"
Which will create the directory we need, and you can move on to the next
step. F</mnt/asec> is mounted as a tmpfs in Android, but it's only
accessible to root.
If your device is not rooted, you may still be in luck. Try running this:
$ export TARGETDIR=/data/local/tmp/perl
$ adb -s $DEVICE shell "mkdir $TARGETDIR"
If the command works, you can move to the next step, but beware:
B<You'll have to remove the directory from the device once you are done!
Unlike F</mnt/asec>, F</data/local/tmp> may not get automatically garbage
collected once you shut off the phone>.
If neither of those work, then you can't use adb to cross-compile to your
device. Either try rooting it, or go for the ssh route.
=head3 ssh
To use ssh, you'll need to install and run a sshd app and set it up
properly. There are several paid and free apps that do this rather
easily, so you should be able to spot one on the store.
Remember that Perl requires a passwordless connection, so set up a
public key.
Note that several apps spew crap to stderr every time you
connect, which can throw off Configure. You may need to monkeypatch
the part of Configure that creates C<run-ssh> to have it discard stderr.
Since you're using ssh, you'll have to pass some extra arguments to
Configure:
-Dtargetrun=ssh -Dtargethost=$TARGETHOST -Dtargetuser=$TARGETUSER -Dtargetport=$TARGETPORT
=head2 Configure and beyond
With all of the previous done, you're now ready to call Configure.
If using adb, a "basic" Configure line will look like this:
$ ./Configure -des -Dusedevel -Dusecrosscompile -Dtargetrun=adb \
-Dcc=$TARGETARCH-gcc \
-Dsysroot=$SYSROOT \
-Dtargetdir=$TARGETDIR \
-Dtargethost=$DEVICE
If using ssh, it's not too different -- we just change targetrun to ssh,
and pass in targetuser and targetport. It ends up looking like this:
$ ./Configure -des -Dusedevel -Dusecrosscompile -Dtargetrun=ssh \
-Dcc=$TARGETARCH-gcc \
-Dsysroot=$SYSROOT \
-Dtargetdir=$TARGETDIR \
-Dtargethost="$TARGETHOST" \
-Dtargetuser=$TARGETUSER \
-Dtargetport=$TARGETPORT
Now you're ready to run C<make> and C<make test>!
As a final word of warning, if you're using adb, C<make test> may appear to
hang; this is because it doesn't output anything until it finishes
running all tests. You can check its progress by logging into the
device, moving to F<$TARGETDIR>, and looking at the file F<output.stdout>.
=head3 Notes
=over
=item *
If you are targetting x86 Android, you will have to change C<$TARGETARCH-gcc>
to C<i686-linux-android-gcc>.
=item *
On some older low-end devices -- think early 2.2 era -- some tests,
particularly F<t/re/uniprops.t>, may crash the phone, causing it to turn
itself off once, and then back on again.
=back
=head1 Native Builds
While Google doesn't provide a native toolchain for Android,
you can still get one from the Play Store.
=head2 CCTools
You may be able to get the CCTools app, which is free.
Keep in mind that you want a full toolchain;
some apps tend to default to installing only a barebones
version without some important utilities, like ar or nm.
Once you have the toolchain set up properly, the only
remaining hurdle is actually locating where in the device it was installed
in. For example, CCTools installs its toolchain in
F</data/data/com.pdaxrom.cctools/root/cctools>. With the path in hand,
compiling perl is little more than:
export SYSROOT=<location of the native toolchain>
export LD_LIBRARY_PATH="$SYSROOT/lib:`pwd`:`pwd`/lib:`pwd`/lib/auto:$LD_LIBRARY_PATH"
sh Configure -des -Dsysroot=$SYSROOT -Alibpth="/system/lib /vendor/lib"
=head2 Termux
L<Termux|https://termux.com/> provides an Android terminal emulator and Linux environment.
It comes with a cross-compiled perl already installed.
Natively compiling perl 5.30 or later should be as straightforward as:
sh Configure -des -Alibpth="/system/lib /vendor/lib"
This certainly works on Android 8.1 (Oreo) at least...
=head1 AUTHOR
Brian Fraser <fraserbn@gmail.com>
=cut

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,569 @@
=head1 NAME
perlapio - perl's IO abstraction interface.
=head1 SYNOPSIS
#define PERLIO_NOT_STDIO 0 /* For co-existence with stdio only */
#include <perlio.h> /* Usually via #include <perl.h> */
PerlIO *PerlIO_stdin(void);
PerlIO *PerlIO_stdout(void);
PerlIO *PerlIO_stderr(void);
PerlIO *PerlIO_open(const char *path,const char *mode);
PerlIO *PerlIO_fdopen(int fd, const char *mode);
PerlIO *PerlIO_reopen(const char *path, /* deprecated */
const char *mode, PerlIO *old);
int PerlIO_close(PerlIO *f);
int PerlIO_stdoutf(const char *fmt,...)
int PerlIO_puts(PerlIO *f,const char *string);
int PerlIO_putc(PerlIO *f,int ch);
SSize_t PerlIO_write(PerlIO *f,const void *buf,size_t numbytes);
int PerlIO_printf(PerlIO *f, const char *fmt,...);
int PerlIO_vprintf(PerlIO *f, const char *fmt, va_list args);
int PerlIO_flush(PerlIO *f);
int PerlIO_eof(PerlIO *f);
int PerlIO_error(PerlIO *f);
void PerlIO_clearerr(PerlIO *f);
int PerlIO_getc(PerlIO *d);
int PerlIO_ungetc(PerlIO *f,int ch);
SSize_t PerlIO_read(PerlIO *f, void *buf, size_t numbytes);
int PerlIO_fileno(PerlIO *f);
void PerlIO_setlinebuf(PerlIO *f);
Off_t PerlIO_tell(PerlIO *f);
int PerlIO_seek(PerlIO *f, Off_t offset, int whence);
void PerlIO_rewind(PerlIO *f);
int PerlIO_getpos(PerlIO *f, SV *save); /* prototype changed */
int PerlIO_setpos(PerlIO *f, SV *saved); /* prototype changed */
int PerlIO_fast_gets(PerlIO *f);
int PerlIO_has_cntptr(PerlIO *f);
SSize_t PerlIO_get_cnt(PerlIO *f);
char *PerlIO_get_ptr(PerlIO *f);
void PerlIO_set_ptrcnt(PerlIO *f, char *ptr, SSize_t count);
int PerlIO_canset_cnt(PerlIO *f); /* deprecated */
void PerlIO_set_cnt(PerlIO *f, int count); /* deprecated */
int PerlIO_has_base(PerlIO *f);
char *PerlIO_get_base(PerlIO *f);
SSize_t PerlIO_get_bufsiz(PerlIO *f);
PerlIO *PerlIO_importFILE(FILE *stdio, const char *mode);
FILE *PerlIO_exportFILE(PerlIO *f, const char *mode);
FILE *PerlIO_findFILE(PerlIO *f);
void PerlIO_releaseFILE(PerlIO *f,FILE *stdio);
int PerlIO_apply_layers(PerlIO *f, const char *mode,
const char *layers);
int PerlIO_binmode(PerlIO *f, int ptype, int imode,
const char *layers);
void PerlIO_debug(const char *fmt,...);
=for apidoc Amh|int |PerlIO_apply_layers|PerlIO *f|const char *mode|const char *layers
=for apidoc Amh|int |PerlIO_binmode|PerlIO *f|int ptype|int imode|const char *layers
=for apidoc ATmh|int |PerlIO_canset_cnt|PerlIO *f
=for apidoc Amh|void |PerlIO_debug|const char *fmt|...
=for apidoc ATmh|FILE *|PerlIO_exportFILE|PerlIO *f|const char *mode
=for apidoc ATmh|int |PerlIO_fast_gets|PerlIO *f
=for apidoc ATmh|PerlIO*|PerlIO_fdopen|int fd|const char *mode
=for apidoc ATmh|FILE *|PerlIO_findFILE|PerlIO *f
=for apidoc ATmh|int |PerlIO_getc|PerlIO *d
=for apidoc ATmh|int |PerlIO_getpos|PerlIO *f|SV *save
=for apidoc ATmh|int |PerlIO_has_base|PerlIO *f
=for apidoc ATmh|int |PerlIO_has_cntptr|PerlIO *f
=for apidoc ATmh|PerlIO*|PerlIO_importFILE|FILE *stdio|const char *mode
=for apidoc ATmh|PerlIO*|PerlIO_open|const char *path|const char *mode
=for apidoc Amh|int |PerlIO_printf|PerlIO *f|const char *fmt|...
=for apidoc ATmh|int |PerlIO_putc|PerlIO *f|int ch
=for apidoc ATmh|int |PerlIO_puts|PerlIO *f|const char *string
=for apidoc ATmh|void |PerlIO_releaseFILE|PerlIO *f|FILE *stdio
=for apidoc Amh|PerlIO *|PerlIO_reopen|const char *path|const char *mode|PerlIO *old
=for apidoc ATmh|void |PerlIO_rewind|PerlIO *f
=for apidoc ATmh|int |PerlIO_setpos|PerlIO *f|SV *saved
=for apidoc Amh|int |PerlIO_stdoutf|const char *fmt|...
=for apidoc ATmh|int |PerlIO_ungetc|PerlIO *f|int ch
=for apidoc ATmh|int |PerlIO_vprintf|PerlIO *f|const char *fmt|va_list args
=for apidoc PerlIO_stdin
=for apidoc PerlIO_stdout
=for apidoc PerlIO_stderr
=for apidoc PerlIO_close
=for apidoc PerlIO_write
=for apidoc PerlIO_flush
=for apidoc PerlIO_eof
=for apidoc PerlIO_error
=for apidoc PerlIO_clearerr
=for apidoc PerlIO_read
=for apidoc PerlIO_fileno
=for apidoc PerlIO_setlinebuf
=for apidoc PerlIO_tell
=for apidoc PerlIO_seek
=for apidoc PerlIO_get_cnt
=for apidoc PerlIO_get_ptr
=for apidoc PerlIO_set_ptrcnt
=for apidoc PerlIO_set_cnt
=for apidoc PerlIO_get_base
=for apidoc PerlIO_get_bufsiz
=head1 DESCRIPTION
Perl's source code, and extensions that want maximum portability,
should use the above functions instead of those defined in ANSI C's
I<stdio.h>. The perl headers (in particular "perlio.h") will
C<#define> them to the I/O mechanism selected at Configure time.
The functions are modeled on those in I<stdio.h>, but parameter order
has been "tidied up a little".
C<PerlIO *> takes the place of FILE *. Like FILE * it should be
treated as opaque (it is probably safe to assume it is a pointer to
something).
There are currently two implementations:
=over 4
=item 1. USE_STDIO
All above are #define'd to stdio functions or are trivial wrapper
functions which call stdio. In this case I<only> PerlIO * is a FILE *.
This has been the default implementation since the abstraction was
introduced in perl5.003_02.
=item 2. USE_PERLIO
Introduced just after perl5.7.0, this is a re-implementation of the
above abstraction which allows perl more control over how IO is done
as it decouples IO from the way the operating system and C library
choose to do things. For USE_PERLIO PerlIO * has an extra layer of
indirection - it is a pointer-to-a-pointer. This allows the PerlIO *
to remain with a known value while swapping the implementation around
underneath I<at run time>. In this case all the above are true (but
very simple) functions which call the underlying implementation.
This is the only implementation for which C<PerlIO_apply_layers()>
does anything "interesting".
The USE_PERLIO implementation is described in L<perliol>.
=back
Because "perlio.h" is a thin layer (for efficiency) the semantics of
these functions are somewhat dependent on the underlying implementation.
Where these variations are understood they are noted below.
Unless otherwise noted, functions return 0 on success, or a negative
value (usually C<EOF> which is usually -1) and set C<errno> on error.
=over 4
=item B<PerlIO_stdin()>, B<PerlIO_stdout()>, B<PerlIO_stderr()>
Use these rather than C<stdin>, C<stdout>, C<stderr>. They are written
to look like "function calls" rather than variables because this makes
it easier to I<make them> function calls if platform cannot export data
to loaded modules, or if (say) different "threads" might have different
values.
=item B<PerlIO_open(path, mode)>, B<PerlIO_fdopen(fd,mode)>
These correspond to fopen()/fdopen() and the arguments are the same.
Return C<NULL> and set C<errno> if there is an error. There may be an
implementation limit on the number of open handles, which may be lower
than the limit on the number of open files - C<errno> may not be set
when C<NULL> is returned if this limit is exceeded.
=item B<PerlIO_reopen(path,mode,f)>
While this currently exists in both implementations, perl itself
does not use it. I<As perl does not use it, it is not well tested.>
Perl prefers to C<dup> the new low-level descriptor to the descriptor
used by the existing PerlIO. This may become the behaviour of this
function in the future.
=item B<PerlIO_printf(f,fmt,...)>, B<PerlIO_vprintf(f,fmt,a)>
These are fprintf()/vfprintf() equivalents.
=item B<PerlIO_stdoutf(fmt,...)>
This is printf() equivalent. printf is #defined to this function,
so it is (currently) legal to use C<printf(fmt,...)> in perl sources.
=item B<PerlIO_read(f,buf,count)>, B<PerlIO_write(f,buf,count)>
These correspond functionally to fread() and fwrite() but the
arguments and return values are different. The PerlIO_read() and
PerlIO_write() signatures have been modeled on the more sane low level
read() and write() functions instead: The "file" argument is passed
first, there is only one "count", and the return value can distinguish
between error and C<EOF>.
Returns a byte count if successful (which may be zero or
positive), returns negative value and sets C<errno> on error.
Depending on implementation C<errno> may be C<EINTR> if operation was
interrupted by a signal.
=item B<PerlIO_close(f)>
Depending on implementation C<errno> may be C<EINTR> if operation was
interrupted by a signal.
=item B<PerlIO_puts(f,s)>, B<PerlIO_putc(f,c)>
These correspond to fputs() and fputc().
Note that arguments have been revised to have "file" first.
=item B<PerlIO_ungetc(f,c)>
This corresponds to ungetc(). Note that arguments have been revised
to have "file" first. Arranges that next read operation will return
the byte B<c>. Despite the implied "character" in the name only
values in the range 0..0xFF are defined. Returns the byte B<c> on
success or -1 (C<EOF>) on error. The number of bytes that can be
"pushed back" may vary, only 1 character is certain, and then only if
it is the last character that was read from the handle.
=item B<PerlIO_getc(f)>
This corresponds to getc().
Despite the c in the name only byte range 0..0xFF is supported.
Returns the character read or -1 (C<EOF>) on error.
=item B<PerlIO_eof(f)>
This corresponds to feof(). Returns a true/false indication of
whether the handle is at end of file. For terminal devices this may
or may not be "sticky" depending on the implementation. The flag is
cleared by PerlIO_seek(), or PerlIO_rewind().
=item B<PerlIO_error(f)>
This corresponds to ferror(). Returns a true/false indication of
whether there has been an IO error on the handle.
=item B<PerlIO_fileno(f)>
This corresponds to fileno(), note that on some platforms, the meaning
of "fileno" may not match Unix. Returns -1 if the handle has no open
descriptor associated with it.
=item B<PerlIO_clearerr(f)>
This corresponds to clearerr(), i.e., clears 'error' and (usually)
'eof' flags for the "stream". Does not return a value.
=item B<PerlIO_flush(f)>
This corresponds to fflush(). Sends any buffered write data to the
underlying file. If called with C<NULL> this may flush all open
streams (or core dump with some USE_STDIO implementations). Calling
on a handle open for read only, or on which last operation was a read
of some kind may lead to undefined behaviour on some USE_STDIO
implementations. The USE_PERLIO (layers) implementation tries to
behave better: it flushes all open streams when passed C<NULL>, and
attempts to retain data on read streams either in the buffer or by
seeking the handle to the current logical position.
=item B<PerlIO_seek(f,offset,whence)>
This corresponds to fseek(). Sends buffered write data to the
underlying file, or discards any buffered read data, then positions
the file descriptor as specified by B<offset> and B<whence> (sic).
This is the correct thing to do when switching between read and write
on the same handle (see issues with PerlIO_flush() above). Offset is
of type C<Off_t> which is a perl Configure value which may not be same
as stdio's C<off_t>.
=item B<PerlIO_tell(f)>
This corresponds to ftell(). Returns the current file position, or
(Off_t) -1 on error. May just return value system "knows" without
making a system call or checking the underlying file descriptor (so
use on shared file descriptors is not safe without a
PerlIO_seek()). Return value is of type C<Off_t> which is a perl
Configure value which may not be same as stdio's C<off_t>.
=item B<PerlIO_getpos(f,p)>, B<PerlIO_setpos(f,p)>
These correspond (loosely) to fgetpos() and fsetpos(). Rather than
stdio's Fpos_t they expect a "Perl Scalar Value" to be passed. What is
stored there should be considered opaque. The layout of the data may
vary from handle to handle. When not using stdio or if platform does
not have the stdio calls then they are implemented in terms of
PerlIO_tell() and PerlIO_seek().
=item B<PerlIO_rewind(f)>
This corresponds to rewind(). It is usually defined as being
PerlIO_seek(f,(Off_t)0L, SEEK_SET);
PerlIO_clearerr(f);
=item B<PerlIO_tmpfile()>
This corresponds to tmpfile(), i.e., returns an anonymous PerlIO or
NULL on error. The system will attempt to automatically delete the
file when closed. On Unix the file is usually C<unlink>-ed just after
it is created so it does not matter how it gets closed. On other
systems the file may only be deleted if closed via PerlIO_close()
and/or the program exits via C<exit>. Depending on the implementation
there may be "race conditions" which allow other processes access to
the file, though in general it will be safer in this regard than
ad. hoc. schemes.
=item B<PerlIO_setlinebuf(f)>
This corresponds to setlinebuf(). Does not return a value. What
constitutes a "line" is implementation dependent but usually means
that writing "\n" flushes the buffer. What happens with things like
"this\nthat" is uncertain. (Perl core uses it I<only> when "dumping";
it has nothing to do with $| auto-flush.)
=back
=head2 Co-existence with stdio
There is outline support for co-existence of PerlIO with stdio.
Obviously if PerlIO is implemented in terms of stdio there is no
problem. However in other cases then mechanisms must exist to create a
FILE * which can be passed to library code which is going to use stdio
calls.
The first step is to add this line:
#define PERLIO_NOT_STDIO 0
I<before> including any perl header files. (This will probably become
the default at some point). That prevents "perlio.h" from attempting
to #define stdio functions onto PerlIO functions.
XS code is probably better using "typemap" if it expects FILE *
arguments. The standard typemap will be adjusted to comprehend any
changes in this area.
=over 4
=item B<PerlIO_importFILE(f,mode)>
Used to get a PerlIO * from a FILE *.
The mode argument should be a string as would be passed to
fopen/PerlIO_open. If it is NULL then - for legacy support - the code
will (depending upon the platform and the implementation) either
attempt to empirically determine the mode in which I<f> is open, or
use "r+" to indicate a read/write stream.
Once called the FILE * should I<ONLY> be closed by calling
C<PerlIO_close()> on the returned PerlIO *.
The PerlIO is set to textmode. Use PerlIO_binmode if this is
not the desired mode.
This is B<not> the reverse of PerlIO_exportFILE().
=item B<PerlIO_exportFILE(f,mode)>
Given a PerlIO * create a 'native' FILE * suitable for passing to code
expecting to be compiled and linked with ANSI C I<stdio.h>. The mode
argument should be a string as would be passed to fopen/PerlIO_open.
If it is NULL then - for legacy support - the FILE * is opened in same
mode as the PerlIO *.
The fact that such a FILE * has been 'exported' is recorded, (normally
by pushing a new :stdio "layer" onto the PerlIO *), which may affect
future PerlIO operations on the original PerlIO *. You should not
call C<fclose()> on the file unless you call C<PerlIO_releaseFILE()>
to disassociate it from the PerlIO *. (Do not use PerlIO_importFILE()
for doing the disassociation.)
Calling this function repeatedly will create a FILE * on each call
(and will push an :stdio layer each time as well).
=item B<PerlIO_releaseFILE(p,f)>
Calling PerlIO_releaseFILE informs PerlIO that all use of FILE * is
complete. It is removed from the list of 'exported' FILE *s, and the
associated PerlIO * should revert to its original behaviour.
Use this to disassociate a file from a PerlIO * that was associated
using PerlIO_exportFILE().
=item B<PerlIO_findFILE(f)>
Returns a native FILE * used by a stdio layer. If there is none, it
will create one with PerlIO_exportFILE. In either case the FILE *
should be considered as belonging to PerlIO subsystem and should
only be closed by calling C<PerlIO_close()>.
=back
=head2 "Fast gets" Functions
In addition to standard-like API defined so far above there is an
"implementation" interface which allows perl to get at internals of
PerlIO. The following calls correspond to the various FILE_xxx macros
determined by Configure - or their equivalent in other
implementations. This section is really of interest to only those
concerned with detailed perl-core behaviour, implementing a PerlIO
mapping or writing code which can make use of the "read ahead" that
has been done by the IO system in the same way perl does. Note that
any code that uses these interfaces must be prepared to do things the
traditional way if a handle does not support them.
=over 4
=item B<PerlIO_fast_gets(f)>
Returns true if implementation has all the interfaces required to
allow perl's C<sv_gets> to "bypass" normal IO mechanism. This can
vary from handle to handle.
PerlIO_fast_gets(f) = PerlIO_has_cntptr(f) && \
PerlIO_canset_cnt(f) && \
'Can set pointer into buffer'
=item B<PerlIO_has_cntptr(f)>
Implementation can return pointer to current position in the "buffer"
and a count of bytes available in the buffer. Do not use this - use
PerlIO_fast_gets.
=item B<PerlIO_get_cnt(f)>
Return count of readable bytes in the buffer. Zero or negative return
means no more bytes available.
=item B<PerlIO_get_ptr(f)>
Return pointer to next readable byte in buffer, accessing via the
pointer (dereferencing) is only safe if PerlIO_get_cnt() has returned
a positive value. Only positive offsets up to value returned by
PerlIO_get_cnt() are allowed.
=item B<PerlIO_set_ptrcnt(f,p,c)>
Set pointer into buffer, and a count of bytes still in the
buffer. Should be used only to set pointer to within range implied by
previous calls to C<PerlIO_get_ptr> and C<PerlIO_get_cnt>. The two
values I<must> be consistent with each other (implementation may only
use one or the other or may require both).
=item B<PerlIO_canset_cnt(f)>
Implementation can adjust its idea of number of bytes in the buffer.
Do not use this - use PerlIO_fast_gets.
=item B<PerlIO_set_cnt(f,c)>
Obscure - set count of bytes in the buffer. Deprecated. Only usable
if PerlIO_canset_cnt() returns true. Currently used in only doio.c to
force count less than -1 to -1. Perhaps should be PerlIO_set_empty or
similar. This call may actually do nothing if "count" is deduced from
pointer and a "limit". Do not use this - use PerlIO_set_ptrcnt().
=item B<PerlIO_has_base(f)>
Returns true if implementation has a buffer, and can return pointer
to whole buffer and its size. Used by perl for B<-T> / B<-B> tests.
Other uses would be very obscure...
=item B<PerlIO_get_base(f)>
Return I<start> of buffer. Access only positive offsets in the buffer
up to the value returned by PerlIO_get_bufsiz().
=item B<PerlIO_get_bufsiz(f)>
Return the I<total number of bytes> in the buffer, this is neither the
number that can be read, nor the amount of memory allocated to the
buffer. Rather it is what the operating system and/or implementation
happened to C<read()> (or whatever) last time IO was requested.
=back
=head2 Other Functions
=over 4
=item PerlIO_apply_layers(f,mode,layers)
The new interface to the USE_PERLIO implementation. The layers ":crlf"
and ":raw" are only ones allowed for other implementations and those
are silently ignored. (As of perl5.8 ":raw" is deprecated.) Use
PerlIO_binmode() below for the portable case.
=item PerlIO_binmode(f,ptype,imode,layers)
The hook used by perl's C<binmode> operator.
B<ptype> is perl's character for the kind of IO:
=over 8
=item 'E<lt>' read
=item 'E<gt>' write
=item '+' read/write
=back
B<imode> is C<O_BINARY> or C<O_TEXT>.
B<layers> is a string of layers to apply, only ":crlf" makes sense in
the non USE_PERLIO case. (As of perl5.8 ":raw" is deprecated in favour
of passing NULL.)
Portable cases are:
PerlIO_binmode(f,ptype,O_BINARY,NULL);
and
PerlIO_binmode(f,ptype,O_TEXT,":crlf");
On Unix these calls probably have no effect whatsoever. Elsewhere
they alter "\n" to CR,LF translation and possibly cause a special text
"end of file" indicator to be written or honoured on read. The effect
of making the call after doing any IO to the handle depends on the
implementation. (It may be ignored, affect any data which is already
buffered as well, or only apply to subsequent data.)
=item PerlIO_debug(fmt,...)
PerlIO_debug is a printf()-like function which can be used for
debugging. No return value. Its main use is inside PerlIO where using
real printf, warn() etc. would recursively call PerlIO and be a
problem.
PerlIO_debug writes to the file named by $ENV{'PERLIO_DEBUG'} or defaults
to stderr if the environment variable is not defined. Typical
use might be
Bourne shells (sh, ksh, bash, zsh, ash, ...):
PERLIO_DEBUG=/tmp/perliodebug.log ./perl -Di somescript some args
Csh/Tcsh:
setenv PERLIO_DEBUG /tmp/perliodebug.log
./perl -Di somescript some args
If you have the "env" utility:
env PERLIO_DEBUG=/tmp/perliodebug.log ./perl -Di somescript args
Win32:
set PERLIO_DEBUG=perliodebug.log
perl -Di somescript some args
On a Perl built without C<-DDEBUGGING>, or when the C<-Di> command-line switch
is not specified, or under taint, PerlIO_debug() is a no-op.
=back

View File

@@ -0,0 +1,224 @@
=head1 NAME
perlartistic - the Perl Artistic License
=head1 SYNOPSIS
You can refer to this document in Pod via "L<perlartistic>"
Or you can see this document by entering "perldoc perlartistic"
=head1 DESCRIPTION
Perl is free software; you can redistribute it and/or modify
it under the terms of either:
a) the GNU General Public License as published by the Free
Software Foundation; either version 1, or (at your option) any
later version, or
b) the "Artistic License" which comes with this Kit.
This is B<"The Artistic License">.
It's here so that modules, programs, etc., that want to declare
this as their distribution license can link to it.
For the GNU General Public License, see L<perlgpl>.
=head1 The "Artistic License"
=head2 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.
=head2 Definitions
=over
=item "Package"
refers to the collection of files distributed by the
Copyright Holder, and derivatives of that collection of files created
through textual modification.
=item "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.
=item "Copyright Holder"
is whoever is named in the copyright or
copyrights for the package.
=item "You"
is you, if you're thinking about copying or distributing this Package.
=item "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.)
=item "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.
=back
=head2 Conditions
=over
=item 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.
=item 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.
=item 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:
=over
=item 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.
=item b)
use the modified Package only within your corporation or organization.
=item 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.
=item d)
make other distribution arrangements with the Copyright Holder.
=back
=item 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:
=over
=item 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.
=item b)
accompany the distribution with the machine-readable source of the
Package with your modifications.
=item 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.
=item d)
make other distribution arrangements with the Copyright Holder.
=back
=item 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.
=item 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.
=item 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.
=item 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.
=item 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.
=item 10.
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
=back
The End
=cut

View File

@@ -0,0 +1,321 @@
=head1 NAME
perlbook - Books about and related to Perl
=head1 DESCRIPTION
There are many books on Perl and Perl-related. A few of these are
good, some are OK, but many aren't worth your money. There is a list
of these books, some with extensive reviews, at
L<https://www.perl.org/books/library.html> . We list some of the books here, and while
listing a book implies our
endorsement, don't think that not including a book means anything.
Most of these books are available online through Safari Books Online
( L<http://safaribooksonline.com/> ).
=head2 The most popular books
The major reference book on Perl, written by the creator of Perl, is
I<Programming Perl>:
=over 4
=item I<Programming Perl> (the "Camel Book"):
by Tom Christiansen, brian d foy, Larry Wall with Jon Orwant
ISBN 978-0-596-00492-7 [4th edition February 2012]
ISBN 978-1-4493-9890-3 [ebook]
https://oreilly.com/catalog/9780596004927
=back
The Ram is a cookbook with hundreds of examples of using Perl to
accomplish specific tasks:
=over 4
=item I<The Perl Cookbook> (the "Ram Book"):
by Tom Christiansen and Nathan Torkington,
with Foreword by Larry Wall
ISBN 978-0-596-00313-5 [2nd Edition August 2003]
ISBN 978-0-596-15888-0 [ebook]
https://oreilly.com/catalog/9780596003135/
=back
If you want to learn the basics of Perl, you might start with the
Llama book, which assumes that you already know a little about
programming:
=over 4
=item I<Learning Perl> (the "Llama Book")
by Randal L. Schwartz, Tom Phoenix, and brian d foy
ISBN 978-1-4493-0358-7 [6th edition June 2011]
ISBN 978-1-4493-0458-4 [ebook]
https://www.learning-perl.com/
=back
The tutorial started in the Llama continues in the Alpaca, which
introduces the intermediate features of references, data structures,
object-oriented programming, and modules:
=over 4
=item I<Intermediate Perl> (the "Alpaca Book")
by Randal L. Schwartz and brian d foy, with Tom Phoenix
foreword by Damian Conway
ISBN 978-1-4493-9309-0 [2nd edition August 2012]
ISBN 978-1-4493-0459-1 [ebook]
https://www.intermediateperl.com/
=back
=head2 References
You might want to keep these desktop references close by your keyboard:
=over 4
=item I<Perl 5 Pocket Reference>
by Johan Vromans
ISBN 978-1-4493-0370-9 [5th edition July 2011]
ISBN 978-1-4493-0813-1 [ebook]
https://oreilly.com/catalog/0636920018476/
=item I<Perl Debugger Pocket Reference>
by Richard Foley
ISBN 978-0-596-00503-0 [1st edition January 2004]
ISBN 978-0-596-55625-9 [ebook]
https://oreilly.com/catalog/9780596005030/
=item I<Regular Expression Pocket Reference>
by Tony Stubblebine
ISBN 978-0-596-51427-3 [2nd edition July 2007]
ISBN 978-0-596-55782-9 [ebook]
https://oreilly.com/catalog/9780596514273/
=back
=head2 Tutorials
=over 4
=item I<Beginning Perl>
(There are 2 books with this title)
by Curtis 'Ovid' Poe
ISBN 978-1-118-01384-7
http://www.wrox.com/WileyCDA/WroxTitle/productCd-1118013840.html
by James Lee
ISBN 1-59059-391-X [3rd edition April 2010 & ebook]
https://www.apress.com/9781430227939
=item I<Learning Perl> (the "Llama Book")
by Randal L. Schwartz, Tom Phoenix, and brian d foy
ISBN 978-1-4493-0358-7 [6th edition June 2011]
ISBN 978-1-4493-0458-4 [ebook]
https://www.learning-perl.com/
=item I<Intermediate Perl> (the "Alpaca Book")
by Randal L. Schwartz and brian d foy, with Tom Phoenix
foreword by Damian Conway
ISBN 978-1-4493-9309-0 [2nd edition August 2012]
ISBN 978-1-4493-0459-1 [ebook]
https://www.intermediateperl.com/
=item I<Mastering Perl>
by brian d foy
ISBN 9978-1-4493-9311-3 [2st edition January 2014]
ISBN 978-1-4493-6487-8 [ebook]
https://www.masteringperl.org/
=item I<Effective Perl Programming>
by Joseph N. Hall, Joshua A. McAdams, brian d foy
ISBN 0-321-49694-9 [2nd edition 2010]
https://www.effectiveperlprogramming.com/
=back
=head2 Task-Oriented
=over 4
=item I<Writing Perl Modules for CPAN>
by Sam Tregar
ISBN 1-59059-018-X [1st edition August 2002 & ebook]
https://www.apress.com/9781590590188
=item I<The Perl Cookbook>
by Tom Christiansen and Nathan Torkington,
with Foreword by Larry Wall
ISBN 978-0-596-00313-5 [2nd Edition August 2003]
ISBN 978-0-596-15888-0 [ebook]
https://oreilly.com/catalog/9780596003135/
=item I<Automating System Administration with Perl>
by David N. Blank-Edelman
ISBN 978-0-596-00639-6 [2nd edition May 2009]
ISBN 978-0-596-80251-6 [ebook]
https://oreilly.com/catalog/9780596006396
=item I<Real World SQL Server Administration with Perl>
by Linchi Shea
ISBN 1-59059-097-X [1st edition July 2003 & ebook]
https://www.apress.com/9781590590973
=back
=head2 Special Topics
=over 4
=item I<Regular Expressions Cookbook>
by Jan Goyvaerts and Steven Levithan
ISBN 978-1-4493-1943-4 [2nd edition August 2012]
ISBN 978-1-4493-2747-7 [ebook]
https://shop.oreilly.com/product/0636920023630.do
=item I<Programming the Perl DBI>
by Tim Bunce and Alligator Descartes
ISBN 978-1-56592-699-8 [February 2000]
ISBN 978-1-4493-8670-2 [ebook]
https://oreilly.com/catalog/9781565926998
=item I<Perl Best Practices>
by Damian Conway
ISBN 978-0-596-00173-5 [1st edition July 2005]
ISBN 978-0-596-15900-9 [ebook]
https://oreilly.com/catalog/9780596001735
=item I<Higher-Order Perl>
by Mark-Jason Dominus
ISBN 1-55860-701-3 [1st edition March 2005]
free ebook https://hop.perl.plover.com/book/
https://hop.perl.plover.com/
=item I<Mastering Regular Expressions>
by Jeffrey E. F. Friedl
ISBN 978-0-596-52812-6 [3rd edition August 2006]
ISBN 978-0-596-55899-4 [ebook]
https://oreilly.com/catalog/9780596528126
=item I<Network Programming with Perl>
by Lincoln Stein
ISBN 0-201-61571-1 [1st edition 2001]
https://www.pearsonhighered.com/educator/product/Network-Programming-with-Perl/9780201615715.page
=item I<Perl Template Toolkit>
by Darren Chamberlain, Dave Cross, and Andy Wardley
ISBN 978-0-596-00476-7 [December 2003]
ISBN 978-1-4493-8647-4 [ebook]
https://oreilly.com/catalog/9780596004767
=item I<Object Oriented Perl>
by Damian Conway
with foreword by Randal L. Schwartz
ISBN 1-884777-79-1 [1st edition August 1999 & ebook]
https://www.manning.com/conway/
=item I<Data Munging with Perl>
by Dave Cross
ISBN 1-930110-00-6 [1st edition 2001 & ebook]
https://www.manning.com/cross
=item I<Mastering Perl/Tk>
by Steve Lidie and Nancy Walsh
ISBN 978-1-56592-716-2 [1st edition January 2002]
ISBN 978-0-596-10344-6 [ebook]
https://oreilly.com/catalog/9781565927162
=item I<Extending and Embedding Perl>
by Tim Jenness and Simon Cozens
ISBN 1-930110-82-0 [1st edition August 2002 & ebook]
https://www.manning.com/jenness
=item I<Pro Perl Debugging>
by Richard Foley with Andy Lester
ISBN 1-59059-454-1 [1st edition July 2005 & ebook]
https://www.apress.com/9781590594544
=back
=head2 Free (as in beer) books
Some of these books are available as free downloads.
I<Higher-Order Perl>: L<https://hop.perl.plover.com/>
I<Modern Perl>: L<http://onyxneon.com/books/modern_perl/>
=head2 Other interesting, non-Perl books
You might notice several familiar Perl concepts in this collection of
ACM columns from Jon Bentley. The similarity to the title of the major
Perl book (which came later) is not completely accidental:
=over 4
=item I<Programming Pearls>
by Jon Bentley
ISBN 978-0-201-65788-3 [2 edition, October 1999]
=item I<More Programming Pearls>
by Jon Bentley
ISBN 0-201-11889-0 [January 1988]
=back
=head2 A note on freshness
Each version of Perl comes with the documentation that was current at
the time of release. This poses a problem for content such as book
lists. There are probably very nice books published after this list
was included in your Perl release, and you can check the latest
released version at L<https://perldoc.perl.org/perlbook.html> .
Some of the books we've listed appear almost ancient in internet
scale, but we've included those books because they still describe the
current way of doing things. Not everything in Perl changes every day.
Many of the beginner-level books, too, go over basic features and
techniques that are still valid today. In general though, we try to
limit this list to books published in the past five years.
=head2 Get your book listed
If your Perl book isn't listed and you think it should be, let us know.
L<mailto:perl5-porters@perl.org>
=cut

View File

@@ -0,0 +1,15 @@
=encoding utf8
=head1 NAME
perlboot - Links to information on object-oriented programming in Perl
=head1 DESCRIPTION
For information on OO programming with Perl, please see L<perlootut>
and L<perlobj>.
(The above documents supersede the tutorial that was formerly here in
perlboot.)
=cut

View File

@@ -0,0 +1,15 @@
=encoding utf8
=head1 NAME
perlbot - Links to information on object-oriented programming in Perl
=head1 DESCRIPTION
For information on OO programming with Perl, please see L<perlootut>
and L<perlobj>.
(The above documents supersede the collection of tricks that was formerly here
in perlbot.)
=cut

View File

@@ -0,0 +1,243 @@
This document is written in pod format hence there are punctuation
characters in odd places. Do not worry, you've apparently got the
ASCII->EBCDIC translation worked out correctly. You can read more
about pod in pod/perlpod.pod or the short summary in the INSTALL file.
=head1 NAME
perlbs2000 - building and installing Perl for BS2000.
B<This document needs to be updated, but we don't know what it should say.
Please submit comments to L<https://github.com/Perl/perl5/issues>.>
=head1 SYNOPSIS
This document will help you Configure, build, test and install Perl
on BS2000 in the POSIX subsystem.
=head1 DESCRIPTION
This is a ported perl for the POSIX subsystem in BS2000 VERSION OSD
V3.1A or later. It may work on other versions, but we started porting
and testing it with 3.1A and are currently using Version V4.0A.
You may need the following GNU programs in order to install perl:
=head2 gzip on BS2000
We used version 1.2.4, which could be installed out of the box with
one failure during 'make check'.
=head2 bison on BS2000
The yacc coming with BS2000 POSIX didn't work for us. So we had to
use bison. We had to make a few changes to perl in order to use the
pure (reentrant) parser of bison. We used version 1.25, but we had to
add a few changes due to EBCDIC. See below for more details
concerning yacc.
=head2 Unpacking Perl Distribution on BS2000
To extract an ASCII tar archive on BS2000 POSIX you need an ASCII
filesystem (we used the mountpoint /usr/local/ascii for this). Now
you extract the archive in the ASCII filesystem without
I/O-conversion:
cd /usr/local/ascii
export IO_CONVERSION=NO
gunzip < /usr/local/src/perl.tar.gz | pax -r
You may ignore the error message for the first element of the archive
(this doesn't look like a tar archive / skipping to next file...),
it's only the directory which will be created automatically anyway.
After extracting the archive you copy the whole directory tree to your
EBCDIC filesystem. B<This time you use I/O-conversion>:
cd /usr/local/src
IO_CONVERSION=YES
cp -r /usr/local/ascii/perl5.005_02 ./
=head2 Compiling Perl on BS2000
There is a "hints" file for BS2000 called hints.posix-bc (because
posix-bc is the OS name given by `uname`) that specifies the correct
values for most things. The major problem is (of course) the EBCDIC
character set. We have german EBCDIC version.
Because of our problems with the native yacc we used GNU bison to
generate a pure (=reentrant) parser for perly.y. So our yacc is
really the following script:
-----8<-----/usr/local/bin/yacc-----8<-----
#! /usr/bin/sh
# Bison as a reentrant yacc:
# save parameters:
params=""
while [[ $# -gt 1 ]]; do
params="$params $1"
shift
done
# add flag %pure_parser:
tmpfile=/tmp/bison.$$.y
echo %pure_parser > $tmpfile
cat $1 >> $tmpfile
# call bison:
echo "/usr/local/bin/bison --yacc $params $1\t\t\t(Pure Parser)"
/usr/local/bin/bison --yacc $params $tmpfile
# cleanup:
rm -f $tmpfile
-----8<----------8<-----
We still use the normal yacc for a2p.y though!!! We made a softlink
called byacc to distinguish between the two versions:
ln -s /usr/bin/yacc /usr/local/bin/byacc
We build perl using GNU make. We tried the native make once and it
worked too.
=head2 Testing Perl on BS2000
We still got a few errors during C<make test>. Some of them are the
result of using bison. Bison prints I<parser error> instead of I<syntax
error>, so we may ignore them. The following list shows
our errors, your results may differ:
op/numconvert.......FAILED tests 1409-1440
op/regexp...........FAILED tests 483, 496
op/regexp_noamp.....FAILED tests 483, 496
pragma/overload.....FAILED tests 152-153, 170-171
pragma/warnings.....FAILED tests 14, 82, 129, 155, 192, 205, 207
lib/bigfloat........FAILED tests 351-352, 355
lib/bigfltpm........FAILED tests 354-355, 358
lib/complex.........FAILED tests 267, 487
lib/dumper..........FAILED tests 43, 45
Failed 11/231 test scripts, 95.24% okay. 57/10595 subtests failed, 99.46% okay.
=head2 Installing Perl on BS2000
We have no nroff on BS2000 POSIX (yet), so we ignored any errors while
installing the documentation.
=head2 Using Perl in the Posix-Shell of BS2000
BS2000 POSIX doesn't support the shebang notation
(C<#!/usr/local/bin/perl>), so you have to use the following lines
instead:
: # use perl
eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}'
if $running_under_some_shell;
=head2 Using Perl in "native" BS2000
We don't have much experience with this yet, but try the following:
Copy your Perl executable to a BS2000 LLM using bs2cp:
C<bs2cp /usr/local/bin/perl 'bs2:perl(perl,l)'>
Now you can start it with the following (SDF) command:
C</START-PROG FROM-FILE=*MODULE(PERL,PERL),PROG-MODE=*ANY,RUN-MODE=*ADV>
First you get the BS2000 commandline prompt ('*'). Here you may enter
your parameters, e.g. C<-e 'print "Hello World!\\n";'> (note the
double backslash!) or C<-w> and the name of your Perl script.
Filenames starting with C</> are searched in the Posix filesystem,
others are searched in the BS2000 filesystem. You may even use
wildcards if you put a C<%> in front of your filename (e.g. C<-w
checkfiles.pl %*.c>). Read your C/C++ manual for additional
possibilities of the commandline prompt (look for
PARAMETER-PROMPTING).
=head2 Floating point anomalies on BS2000
There appears to be a bug in the floating point implementation on BS2000 POSIX
systems such that calling int() on the product of a number and a small
magnitude number is not the same as calling int() on the quotient of
that number and a large magnitude number. For example, in the following
Perl code:
my $x = 100000.0;
my $y = int($x * 1e-5) * 1e5; # '0'
my $z = int($x / 1e+5) * 1e5; # '100000'
print "\$y is $y and \$z is $z\n"; # $y is 0 and $z is 100000
Although one would expect the quantities $y and $z to be the same and equal
to 100000 they will differ and instead will be 0 and 100000 respectively.
=head2 Using PerlIO and different encodings on ASCII and EBCDIC partitions
Since version 5.8 Perl uses the new PerlIO on BS2000. This enables
you using different encodings per IO channel. For example you may use
use Encode;
open($f, ">:encoding(ascii)", "test.ascii");
print $f "Hello World!\n";
open($f, ">:encoding(posix-bc)", "test.ebcdic");
print $f "Hello World!\n";
open($f, ">:encoding(latin1)", "test.latin1");
print $f "Hello World!\n";
open($f, ">:encoding(utf8)", "test.utf8");
print $f "Hello World!\n";
to get two files containing "Hello World!\n" in ASCII, EBCDIC, ISO
Latin-1 (in this example identical to ASCII) respective UTF-EBCDIC (in
this example identical to normal EBCDIC). See the documentation of
Encode::PerlIO for details.
As the PerlIO layer uses raw IO internally, all this totally ignores
the type of your filesystem (ASCII or EBCDIC) and the IO_CONVERSION
environment variable. If you want to get the old behavior, that the
BS2000 IO functions determine conversion depending on the filesystem
PerlIO still is your friend. You use IO_CONVERSION as usual and tell
Perl, that it should use the native IO layer:
export IO_CONVERSION=YES
export PERLIO=stdio
Now your IO would be ASCII on ASCII partitions and EBCDIC on EBCDIC
partitions. See the documentation of PerlIO (without C<Encode::>!)
for further possibilities.
=head1 AUTHORS
Thomas Dorner
=head1 SEE ALSO
L<INSTALL>, L<perlport>.
=head2 Mailing list
If you are interested in the z/OS (formerly known as OS/390)
and POSIX-BC (BS2000) ports of Perl then see the perl-mvs mailing list.
To subscribe, send an empty message to perl-mvs-subscribe@perl.org.
See also:
https://lists.perl.org/list/perl-mvs.html
There are web archives of the mailing list at:
https://www.nntp.perl.org/group/perl.mvs/
=head1 HISTORY
This document was originally written by Thomas Dorner for the 5.005
release of Perl.
This document was podified for the 5.6 release of perl 11 July 2000.
=cut

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,108 @@
=head1 NAME
perlcheat - Perl 5 Cheat Sheet
=head1 DESCRIPTION
This 'cheat sheet' is a handy reference, meant for beginning Perl
programmers. Not everything is mentioned, but 195 features may
already be overwhelming.
=head2 The sheet
CONTEXTS SIGILS ref ARRAYS HASHES
void $scalar SCALAR @array %hash
scalar @array ARRAY @array[0, 2] @hash{'a', 'b'}
list %hash HASH $array[0] $hash{'a'}
&sub CODE
*glob GLOB SCALAR VALUES
FORMAT number, string, ref, glob, undef
REFERENCES
\ reference $$foo[1] aka $foo->[1]
$@%&* dereference $$foo{bar} aka $foo->{bar}
[] anon. arrayref ${$$foo[1]}[2] aka $foo->[1]->[2]
{} anon. hashref ${$$foo[1]}[2] aka $foo->[1][2]
\() list of refs
SYNTAX
OPERATOR PRECEDENCE foreach (LIST) { } for (a;b;c) { }
-> while (e) { } until (e) { }
++ -- if (e) { } elsif (e) { } else { }
** unless (e) { } elsif (e) { } else { }
! ~ \ u+ u- given (e) { when (e) {} default {} }
=~ !~
* / % x NUMBERS vs STRINGS FALSE vs TRUE
+ - . = = undef, "", 0, "0"
<< >> + . anything else
named uops == != eq ne
< > <= >= lt gt le ge < > <= >= lt gt le ge
== != <=> eq ne cmp ~~ <=> cmp
&
| ^ REGEX MODIFIERS REGEX METACHARS
&& /i case insensitive ^ string begin
|| // /m line based ^$ $ str end (bfr \n)
.. ... /s . includes \n + one or more
?: /x /xx ign. wh.space * zero or more
= += last goto /p preserve ? zero or one
, => /a ASCII /aa safe {3,7} repeat in range
list ops /l locale /d dual | alternation
not /u Unicode [] character class
and /e evaluate /ee rpts \b boundary
or xor /g global \z string end
/o compile pat once () capture
DEBUG (?:p) no capture
-MO=Deparse REGEX CHARCLASSES (?#t) comment
-MO=Terse . [^\n] (?=p) ZW pos ahead
-D## \s whitespace (?!p) ZW neg ahead
-d:Trace \w word chars (?<=p) ZW pos behind \K
\d digits (?<!p) ZW neg behind
CONFIGURATION \pP named property (?>p) no backtrack
perl -V:ivsize \h horiz.wh.space (?|p|p)branch reset
\R linebreak (?<n>p)named capture
\S \W \D \H negate \g{n} ref to named cap
\K keep left part
FUNCTION RETURN LISTS
stat localtime caller SPECIAL VARIABLES
0 dev 0 second 0 package $_ default variable
1 ino 1 minute 1 filename $0 program name
2 mode 2 hour 2 line $/ input separator
3 nlink 3 day 3 subroutine $\ output separator
4 uid 4 month-1 4 hasargs $| autoflush
5 gid 5 year-1900 5 wantarray $! sys/libcall error
6 rdev 6 weekday 6 evaltext $@ eval error
7 size 7 yearday 7 is_require $$ process ID
8 atime 8 is_dst 8 hints $. line number
9 mtime 9 bitmask @ARGV command line args
10 ctime 10 hinthash @INC include paths
11 blksz 3..10 only @_ subroutine args
12 blcks with EXPR %ENV environment
=head1 ACKNOWLEDGEMENTS
The first version of this document appeared on Perl Monks, where several
people had useful suggestions. Thank you, Perl Monks.
A special thanks to Damian Conway, who didn't only suggest important changes,
but also took the time to count the number of listed features and make a
Raku version to show that Perl will stay Perl.
=head1 AUTHOR
Juerd Waalboer <#####@juerd.nl>, with the help of many Perl Monks.
=head1 SEE ALSO
=over 4
=item *
L<https://perlmonks.org/?node_id=216602> - the original PM post
=item *
L<https://perlmonks.org/?node_id=238031> - Damian Conway's Raku version
=item *
L<https://juerd.nl/site.plp/perlcheat> - home of the Perl Cheat Sheet
=back

View File

@@ -0,0 +1,257 @@
=head1 NAME
perlclib - Internal replacements for standard C library functions
=head1 DESCRIPTION
One thing Perl porters should note is that F<perl> doesn't tend to use that
much of the C standard library internally; you'll see very little use of,
for example, the F<ctype.h> functions in there. This is because Perl
tends to reimplement or abstract standard library functions, so that we
know exactly how they're going to operate.
This is a reference card for people who are familiar with the C library
and who want to do things the Perl way; to tell them which functions
they ought to use instead of the more normal C functions.
=head2 Conventions
In the following tables:
=over 3
=item C<t>
is a type.
=item C<p>
is a pointer.
=item C<n>
is a number.
=item C<s>
is a string.
=back
C<sv>, C<av>, C<hv>, etc. represent variables of their respective types.
=head2 File Operations
Instead of the F<stdio.h> functions, you should use the Perl abstraction
layer. Instead of C<FILE*> types, you need to be handling C<PerlIO*>
types. Don't forget that with the new PerlIO layered I/O abstraction
C<FILE*> types may not even be available. See also the C<perlapio>
documentation for more information about the following functions:
Instead Of: Use:
stdin PerlIO_stdin()
stdout PerlIO_stdout()
stderr PerlIO_stderr()
fopen(fn, mode) PerlIO_open(fn, mode)
freopen(fn, mode, stream) PerlIO_reopen(fn, mode, perlio) (Dep-
recated)
fflush(stream) PerlIO_flush(perlio)
fclose(stream) PerlIO_close(perlio)
=head2 File Input and Output
Instead Of: Use:
fprintf(stream, fmt, ...) PerlIO_printf(perlio, fmt, ...)
[f]getc(stream) PerlIO_getc(perlio)
[f]putc(stream, n) PerlIO_putc(perlio, n)
ungetc(n, stream) PerlIO_ungetc(perlio, n)
Note that the PerlIO equivalents of C<fread> and C<fwrite> are slightly
different from their C library counterparts:
fread(p, size, n, stream) PerlIO_read(perlio, buf, numbytes)
fwrite(p, size, n, stream) PerlIO_write(perlio, buf, numbytes)
fputs(s, stream) PerlIO_puts(perlio, s)
There is no equivalent to C<fgets>; one should use C<sv_gets> instead:
fgets(s, n, stream) sv_gets(sv, perlio, append)
=head2 File Positioning
Instead Of: Use:
feof(stream) PerlIO_eof(perlio)
fseek(stream, n, whence) PerlIO_seek(perlio, n, whence)
rewind(stream) PerlIO_rewind(perlio)
fgetpos(stream, p) PerlIO_getpos(perlio, sv)
fsetpos(stream, p) PerlIO_setpos(perlio, sv)
ferror(stream) PerlIO_error(perlio)
clearerr(stream) PerlIO_clearerr(perlio)
=head2 Memory Management and String Handling
Instead Of: Use:
t* p = malloc(n) Newx(p, n, t)
t* p = calloc(n, s) Newxz(p, n, t)
p = realloc(p, n) Renew(p, n, t)
memcpy(dst, src, n) Copy(src, dst, n, t)
memmove(dst, src, n) Move(src, dst, n, t)
memcpy(dst, src, sizeof(t)) StructCopy(src, dst, t)
memset(dst, 0, n * sizeof(t)) Zero(dst, n, t)
memzero(dst, 0) Zero(dst, n, char)
free(p) Safefree(p)
strdup(p) savepv(p)
strndup(p, n) savepvn(p, n) (Hey, strndup doesn't
exist!)
strstr(big, little) instr(big, little)
strcmp(s1, s2) strLE(s1, s2) / strEQ(s1, s2)
/ strGT(s1,s2)
strncmp(s1, s2, n) strnNE(s1, s2, n) / strnEQ(s1, s2, n)
memcmp(p1, p2, n) memNE(p1, p2, n)
!memcmp(p1, p2, n) memEQ(p1, p2, n)
Notice the different order of arguments to C<Copy> and C<Move> than used
in C<memcpy> and C<memmove>.
Most of the time, though, you'll want to be dealing with SVs internally
instead of raw C<char *> strings:
strlen(s) sv_len(sv)
strcpy(dt, src) sv_setpv(sv, s)
strncpy(dt, src, n) sv_setpvn(sv, s, n)
strcat(dt, src) sv_catpv(sv, s)
strncat(dt, src) sv_catpvn(sv, s)
sprintf(s, fmt, ...) sv_setpvf(sv, fmt, ...)
Note also the existence of C<sv_catpvf> and C<sv_vcatpvfn>, combining
concatenation with formatting.
Sometimes instead of zeroing the allocated heap by using Newxz() you
should consider "poisoning" the data. This means writing a bit
pattern into it that should be illegal as pointers (and floating point
numbers), and also hopefully surprising enough as integers, so that
any code attempting to use the data without forethought will break
sooner rather than later. Poisoning can be done using the Poison()
macros, which have similar arguments to Zero():
PoisonWith(dst, n, t, b) scribble memory with byte b
PoisonNew(dst, n, t) equal to PoisonWith(dst, n, t, 0xAB)
PoisonFree(dst, n, t) equal to PoisonWith(dst, n, t, 0xEF)
Poison(dst, n, t) equal to PoisonFree(dst, n, t)
=head2 Character Class Tests
There are several types of character class tests that Perl implements.
The only ones described here are those that directly correspond to C
library functions that operate on 8-bit characters, but there are
equivalents that operate on wide characters, and UTF-8 encoded strings.
All are more fully described in L<perlapi/Character classification> and
L<perlapi/Character case changing>.
The C library routines listed in the table below return values based on
the current locale. Use the entries in the final column for that
functionality. The other two columns always assume a POSIX (or C)
locale. The entries in the ASCII column are only meaningful for ASCII
inputs, returning FALSE for anything else. Use these only when you
B<know> that is what you want. The entries in the Latin1 column assume
that the non-ASCII 8-bit characters are as Unicode defines, them, the
same as ISO-8859-1, often called Latin 1.
Instead Of: Use for ASCII: Use for Latin1: Use for locale:
isalnum(c) isALPHANUMERIC(c) isALPHANUMERIC_L1(c) isALPHANUMERIC_LC(c)
isalpha(c) isALPHA(c) isALPHA_L1(c) isALPHA_LC(u )
isascii(c) isASCII(c) isASCII_LC(c)
isblank(c) isBLANK(c) isBLANK_L1(c) isBLANK_LC(c)
iscntrl(c) isCNTRL(c) isCNTRL_L1(c) isCNTRL_LC(c)
isdigit(c) isDIGIT(c) isDIGIT_L1(c) isDIGIT_LC(c)
isgraph(c) isGRAPH(c) isGRAPH_L1(c) isGRAPH_LC(c)
islower(c) isLOWER(c) isLOWER_L1(c) isLOWER_LC(c)
isprint(c) isPRINT(c) isPRINT_L1(c) isPRINT_LC(c)
ispunct(c) isPUNCT(c) isPUNCT_L1(c) isPUNCT_LC(c)
isspace(c) isSPACE(c) isSPACE_L1(c) isSPACE_LC(c)
isupper(c) isUPPER(c) isUPPER_L1(c) isUPPER_LC(c)
isxdigit(c) isXDIGIT(c) isXDIGIT_L1(c) isXDIGIT_LC(c)
tolower(c) toLOWER(c) toLOWER_L1(c) toLOWER_LC(c)
toupper(c) toUPPER(c) toUPPER_LC(c)
To emphasize that you are operating only on ASCII characters, you can
append C<_A> to each of the macros in the ASCII column: C<isALPHA_A>,
C<isDIGIT_A>, and so on.
(There is no entry in the Latin1 column for C<isascii> even though there
is an C<isASCII_L1>, which is identical to C<isASCII>; the
latter name is clearer. There is no entry in the Latin1 column for
C<toupper> because the result can be non-Latin1. You have to use
C<toUPPER_uni>, as described in L<perlapi/Character case changing>.)
=head2 F<stdlib.h> functions
Instead Of: Use:
atof(s) Atof(s)
atoi(s) grok_atoUV(s, &uv, &e)
atol(s) grok_atoUV(s, &uv, &e)
strtod(s, &p) Strtod(s, &p)
strtol(s, &p, n) Strtol(s, &p, b)
strtoul(s, &p, n) Strtoul(s, &p, b)
Typical use is to do range checks on C<uv> before casting:
int i; UV uv;
char* end_ptr = input_end;
if (grok_atoUV(input, &uv, &end_ptr)
&& uv <= INT_MAX)
i = (int)uv;
... /* continue parsing from end_ptr */
} else {
... /* parse error: not a decimal integer in range 0 .. MAX_IV */
}
Notice also the C<grok_bin>, C<grok_hex>, and C<grok_oct> functions in
F<numeric.c> for converting strings representing numbers in the respective
bases into C<NV>s. Note that grok_atoUV() doesn't handle negative inputs,
or leading whitespace (being purposefully strict).
Note that strtol() and strtoul() may be disguised as Strtol(), Strtoul(),
Atol(), Atoul(). Avoid those, too.
In theory C<Strtol> and C<Strtoul> may not be defined if the machine perl is
built on doesn't actually have strtol and strtoul. But as those 2
functions are part of the 1989 ANSI C spec we suspect you'll find them
everywhere by now.
int rand() double Drand01()
srand(n) { seedDrand01((Rand_seed_t)n);
PL_srand_called = TRUE; }
exit(n) my_exit(n)
system(s) Don't. Look at pp_system or use my_popen.
getenv(s) PerlEnv_getenv(s)
setenv(s, val) my_setenv(s, val)
=head2 Miscellaneous functions
You should not even B<want> to use F<setjmp.h> functions, but if you
think you do, use the C<JMPENV> stack in F<scope.h> instead.
For C<signal>/C<sigaction>, use C<rsignal(signo, handler)>.
=head1 SEE ALSO
L<perlapi>, L<perlapio>, L<perlguts>

View File

@@ -0,0 +1,152 @@
=encoding utf8
如果你用一般的文字编辑器阅览这份文件, 请忽略文中奇特的注记字符.
这份文件是以 POD (简明文件格式) 写成; 这种格式是为了能让人直接阅读,
而特别设计的. 关于此格式的进一步信息, 请参考 perlpod 线上文件.
=head1 NAME
perlcn - 简体中文 Perl 指南
=head1 DESCRIPTION
欢迎来到 Perl 的天地!
从 5.8.0 版开始, Perl 具备了完善的 Unicode (统一码) 支援,
也连带支援了许多拉丁语系以外的编码方式; CJK (中日韩) 便是其中的一部份.
Unicode 是国际性的标准, 试图涵盖世界上所有的字符: 西方世界, 东方世界,
以及两者间的一切 (希腊文, 叙利亚文, 亚拉伯文, 希伯来文, 印度文,
印地安文, 等等). 它也容纳了多种作业系统与平台 (如 PC 及麦金塔).
Perl 本身以 Unicode 进行操作. 这表示 Perl 内部的字符串数据可用 Unicode
表示; Perl 的函式与算符 (例如正规表示式比对) 也能对 Unicode 进行操作.
在输入及输出时, 为了处理以 Unicode 之前的编码方式存放的数据, Perl
提供了 Encode 这个模块, 可以让你轻易地读取及写入旧有的编码数据.
Encode 延伸模块支援下列简体中文的编码方式 ('gb2312' 表示 'euc-cn'):
euc-cn Unix 延伸字符集, 也就是俗称的国标码
gb2312-raw 未经处理的 (低比特) GB2312 字符表
gb12345 未经处理的中国用繁体中文编码
iso-ir-165 GB2312 + GB6345 + GB8565 + 新增字符
cp936 字码页 936, 也可以用 'GBK' (扩充国标码) 指明
hz 7 比特逸出式 GB2312 编码
举例来说, 将 EUC-CN 编码的档案转成 Unicode, 祗需键入下列指令:
perl -Mencoding=euc-cn,STDOUT,utf8 -pe1 < file.euc-cn > file.utf8
Perl 也内附了 "piconv", 一支完全以 Perl 写成的字符转换工具程序, 用法如下:
piconv -f euc-cn -t utf8 < file.euc-cn > file.utf8
piconv -f utf8 -t euc-cn < file.utf8 > file.euc-cn
另外, 利用 encoding 模块, 你可以轻易写出以字符为单位的程序码, 如下所示:
#!/usr/bin/env perl
# 启动 euc-cn 字串解析; 标准输出入及标准错误都设为 euc-cn 编码
use encoding 'euc-cn', STDIN => 'euc-cn', STDOUT => 'euc-cn';
print length("骆驼"); # 2 (双引号表示字符)
print length('骆驼'); # 4 (单引号表示字节)
print index("谆谆教诲", "蛔唤"); # -1 (不包含此子字符串)
print index('谆谆教诲', '蛔唤'); # 1 (从第二个字节开始)
在最后一列例子里, "谆" 的第二个字节与 "谆" 的第一个字节结合成 EUC-CN
码的 "蛔"; "谆" 的第二个字节则与 "教" 的第一个字节结合成 "唤".
这解决了以前 EUC-CN 码比对处理上常见的问题.
=head2 额外的中文编码
如果需要更多的中文编码, 可以从 CPAN (L<https://www.cpan.org/>) 下载
Encode::HanExtra 模块. 它目前提供下列编码方式:
gb18030 扩充过的国标码, 包含繁体中文
另外, Encode::HanConvert 模块则提供了简繁转换用的两种编码:
big5-simp Big5 繁体中文与 Unicode 简体中文互转
gbk-trad GBK 简体中文与 Unicode 繁体中文互转
若想在 GBK 与 Big5 之间互转, 请参考该模块内附的 b2g.pl 与 g2b.pl 两支程序,
或在程序内使用下列写法:
use Encode::HanConvert;
$euc_cn = big5_to_gb($big5); # 从 Big5 转为 GBK
$big5 = gb_to_big5($euc_cn); # 从 GBK 转为 Big5
=head2 进一步的信息
请参考 Perl 内附的大量说明文件 (不幸全是用英文写的), 来学习更多关于
Perl 的知识, 以及 Unicode 的使用方式. 不过, 外部的资源相当丰富:
=head2 提供 Perl 资源的网址
=over 4
=item L<https://www.perl.org/>
=back
Perl 的首页
=over 4
=item L<https://www.perl.com/>
由 Perl 基金会所营运的文章辑录
=item L<https://www.cpan.org/>
Perl 综合典藏网 (Comprehensive Perl Archive Network)
=item L<https://lists.perl.org/>
Perl 邮递论坛一览
=back
=head2 学习 Perl 的网址
=over 4
=item L<http://www.oreilly.com.cn/index.php?func=booklist&cat=68>
简体中文版的欧莱礼 Perl 书藉
=back
=head2 Perl 使用者集会
=over 4
=item L<https://www.pm.org/groups/asia.html>
中国 Perl 推广组一览
=back
=head2 Unicode 相关网址
=over 4
=item L<https://www.unicode.org/>
Unicode 学术学会 (Unicode 标准的制定者)
=item L<https://www.cl.cam.ac.uk/%7Emgk25/unicode.html>
Unix/Linux 上的 UTF-8 及 Unicode 答客问
=back
=head1 SEE ALSO
L<Encode>, L<Encode::CN>, L<encoding>, L<perluniintro>, L<perlunicode>
=head1 AUTHORS
Jarkko Hietaniemi E<lt>jhi@iki.fiE<gt>
Audrey Tang (唐凤) E<lt>audreyt@audreyt.orgE<gt>
=cut

View File

@@ -0,0 +1,188 @@
=head1 NAME
perlcommunity - a brief overview of the Perl community
=head1 DESCRIPTION
This document aims to provide an overview of the vast perl community, which is
far too large and diverse to provide a detailed listing. If any specific niche
has been forgotten, it is not meant as an insult but an omission for the sake
of brevity.
The Perl community is as diverse as Perl, and there is a large amount of
evidence that the Perl users apply TMTOWTDI to all endeavors, not just
programming. From websites, to IRC, to mailing lists, there is more than one
way to get involved in the community.
=head2 Where to Find the Community
There is a central directory for the Perl community: L<https://perl.org>
maintained by the Perl Foundation (L<https://www.perlfoundation.org/>),
which tracks and provides services for a variety of other community sites.
=head2 Mailing Lists and Newsgroups
Perl runs on e-mail; there is no doubt about it. The Camel book was originally
written mostly over e-mail and today Perl's development is co-ordinated through
mailing lists. The largest repository of Perl mailing lists is located at
L<https://lists.perl.org>.
Most Perl-related projects set up mailing lists for both users and
contributors. If you don't see a certain project listed at
L<https://lists.perl.org>, check the particular website for that project.
Most mailing lists are archived at L<https://www.nntp.perl.org/>.
=head2 IRC
The Perl community has a rather large IRC presence. For starters, it has its
own IRC network, L<irc://irc.perl.org>. General (not help-oriented) chat can be
found at L<irc://irc.perl.org/#perl>. Many other more specific chats are also
hosted on the network. Information about irc.perl.org is located on the
network's website: L<https://www.irc.perl.org>. For a more help-oriented #perl,
check out L<irc://irc.freenode.net/#perl>. Raku development also has a
presence in L<irc://irc.freenode.net/#raku-dev>. Most Perl-related channels
will be kind enough to point you in the right direction if you ask nicely.
Any large IRC network (Dalnet, EFnet) is also likely to have a #perl channel,
with varying activity levels.
=head2 Websites
Perl websites come in a variety of forms, but they fit into two large
categories: forums and news websites. There are many Perl-related
websites, so only a few of the community's largest are mentioned here.
=head3 News sites
=over 4
=item L<https://perl.com/>
Originally run by O'Reilly Media (the publisher of L<the Camel Book|perlbook>,
this site provides quality articles mostly about technical details of Perl.
=item L<http://blogs.perl.org/>
Many members of the community have a Perl-related blog on this site. If
you'd like to join them, you can sign up for free.
=item L<http://perlsphere.net/>
Perlsphere is one of several aggregators of Perl-related blog feeds.
=item L<http://perlweekly.com/>
Perl Weekly is a weekly mailing list that keeps you up to date on conferences,
releases and notable blog posts.
=back
=head3 Forums
=over 4
=item L<https://www.perlmonks.org/>
PerlMonks is one of the largest Perl forums, and describes itself as "A place
for individuals to polish, improve, and showcase their Perl skills." and "A
community which allows everyone to grow and learn from each other."
=item L<https://stackoverflow.com/>
Stack Overflow is a free question-and-answer site for programmers. It's not
focussed solely on Perl, but it does have an active group of users who do
their best to help people with their Perl programming questions.
=item L<http://prepan.org/>
PrePAN is used as a place to discuss modules that you're considering uploading
to the CPAN. You can get feedback on their design before you upload.
=back
=head2 User Groups
Many cities around the world have local Perl Mongers chapters. A Perl Mongers
chapter is a local user group which typically holds regular in-person meetings,
both social and technical; helps organize local conferences, workshops, and
hackathons; and provides a mailing list or other continual contact method for
its members to keep in touch.
To find your local Perl Mongers (or PM as they're commonly abbreviated) group
check the international Perl Mongers directory at L<https://www.pm.org/>.
=head2 Workshops
Perl workshops are, as the name might suggest, workshops where Perl is taught
in a variety of ways. At the workshops, subjects range from a beginner's
introduction (such as the Pittsburgh Perl Workshop's "Zero To Perl") to much
more advanced subjects.
There are several great resources for locating workshops: the
L<websites|"Websites"> mentioned above, the
L<calendar|"Calendar of Perl Events"> mentioned below, and the YAPC Europe
website, L<http://www.yapceurope.org/>, which is probably the best resource for
European Perl events.
=head2 Hackathons
Hackathons are a very different kind of gathering where Perl hackers gather to
do just that, hack nonstop for an extended (several day) period on a specific
project or projects. Information about hackathons can be located in the same
place as information about L<workshops|"Workshops"> as well as in
L<irc://irc.perl.org/#perl>.
If you have never been to a hackathon, here are a few basic things you need to
know before attending: have a working laptop and know how to use it; check out
the involved projects beforehand; have the necessary version control client;
and bring backup equipment (an extra LAN cable, additional power strips, etc.)
because someone will forget.
=head2 Conventions
Perl had two major annual conventions: The Perl Conference (now part of OSCON),
put on by O'Reilly, and Yet Another Perl Conference or YAPC (pronounced
yap-see), which is localized into several regional YAPCs (North America,
Europe, Asia) in a stunning grassroots display by the Perl community.
In 2016, YAPC was rebranded as The Perl Conference again. It is now referred
to as The Perl and Raku Conference.
OSCON had been discontinued.
For more information about either conference, check out their respective web
pages:
=over 4
=item * The Perl Conference
L<http://perlconference.us/>.
=item * OSCON
L<https://www.oreilly.com/conferences/>
=back
An additional conference franchise with a large Perl portion was the
Open Source Developers Conference or OSDC. First held in Australia, it
also spread to Israel and France. More information can be found at:
L<http://www.osdc.org.il> for Israel, and L<http://www.osdc.fr/> for France.
=head2 Calendar of Perl Events
The Perl Review, L<http://www.theperlreview.com> maintains a website
and Google calendar for tracking
workshops, hackathons, Perl Mongers meetings, and other events. A view
of this calendar is available at L<https://www.perl.org/events.html>.
Not every event or Perl Mongers group is on that calendar, so don't lose
heart if you don't see yours posted. To have your event or group listed,
contact brian d foy (brian@theperlreview.com).
=head1 AUTHOR
Edgar "Trizor" Bering <trizor@gmail.com>
=cut

View File

@@ -0,0 +1,781 @@
If you read this file _as_is_, just ignore the funny characters you
see. It is written in the POD format (see F<pod/perlpod.pod>) which is
specially designed to be readable as is.
=head1 NAME
perlcygwin - Perl for Cygwin
=head1 SYNOPSIS
This document will help you configure, make, test and install Perl
on Cygwin. This document also describes features of Cygwin that will
affect how Perl behaves at runtime.
B<NOTE:> There are pre-built Perl packages available for Cygwin and a
version of Perl is provided in the normal Cygwin install. If you do
not need to customize the configuration, consider using one of those
packages.
=head1 PREREQUISITES FOR COMPILING PERL ON CYGWIN
=head2 Cygwin = GNU+Cygnus+Windows (Don't leave UNIX without it)
The Cygwin tools are ports of the popular GNU development tools for Win32
platforms. They run thanks to the Cygwin library which provides the UNIX
system calls and environment these programs expect. More information
about this project can be found at:
L<https://www.cygwin.com/>
A recent net or commercial release of Cygwin is required.
At the time this document was last updated, Cygwin 1.7.16 was current.
=head2 Cygwin Configuration
While building Perl some changes may be necessary to your Cygwin setup so
that Perl builds cleanly. These changes are B<not> required for normal
Perl usage.
B<NOTE:> The binaries that are built will run on all Win32 versions.
They do not depend on your host system (WinXP/Win2K/Win7) or your
Cygwin configuration (binary/text mounts, cvgserver).
The only dependencies come from hard-coded pathnames like F</usr/local>.
However, your host system and Cygwin configuration will affect Perl's
runtime behavior (see L</"TEST">).
=over 4
=item * C<PATH>
Set the C<PATH> environment variable so that Configure finds the Cygwin
versions of programs. Any not-needed Windows directories should be removed or
moved to the end of your C<PATH>.
=item * I<nroff>
If you do not have I<nroff> (which is part of the I<groff> package),
Configure will B<not> prompt you to install I<man> pages.
=back
=head1 CONFIGURE PERL ON CYGWIN
The default options gathered by Configure with the assistance of
F<hints/cygwin.sh> will build a Perl that supports dynamic loading
(which requires a shared F<cygperl5_16.dll>).
This will run Configure and keep a record:
./Configure 2>&1 | tee log.configure
If you are willing to accept all the defaults run Configure with B<-de>.
However, several useful customizations are available.
=head2 Stripping Perl Binaries on Cygwin
It is possible to strip the EXEs and DLLs created by the build process.
The resulting binaries will be significantly smaller. If you want the
binaries to be stripped, you can either add a B<-s> option when Configure
prompts you,
Any additional ld flags (NOT including libraries)? [none] -s
Any special flags to pass to g++ to create a dynamically loaded
library?
[none] -s
Any special flags to pass to gcc to use dynamic linking? [none] -s
or you can edit F<hints/cygwin.sh> and uncomment the relevant variables
near the end of the file.
=head2 Optional Libraries for Perl on Cygwin
Several Perl functions and modules depend on the existence of
some optional libraries. Configure will find them if they are
installed in one of the directories listed as being used for library
searches. Pre-built packages for most of these are available from
the Cygwin installer.
=over 4
=item * C<-lcrypt>
The crypt package distributed with Cygwin is a Linux compatible 56-bit
DES crypt port by Corinna Vinschen.
Alternatively, the crypt libraries in GNU libc have been ported to Cygwin.
As of libcrypt 1.3 (March 2016), you will need to install the
libcrypt-devel package for Configure to detect crypt().
=item * C<-lgdbm_compat> (C<use GDBM_File>)
GDBM is available for Cygwin.
NOTE: The GDBM library only works on NTFS partitions.
=item * C<-ldb> (C<use DB_File>)
BerkeleyDB is available for Cygwin.
NOTE: The BerkeleyDB library only completely works on NTFS partitions.
=item * C<cygserver> (C<use IPC::SysV>)
A port of SysV IPC is available for Cygwin.
NOTE: This has B<not> been extensively tested. In particular,
C<d_semctl_semun> is undefined because it fails a Configure test
and on Win9x the I<shm*()> functions seem to hang. It also creates
a compile time dependency because F<perl.h> includes F<<sys/ipc.h>>
and F<<sys/sem.h>> (which will be required in the future when compiling
CPAN modules). CURRENTLY NOT SUPPORTED!
=item * C<-lutil>
Included with the standard Cygwin netrelease is the inetutils package
which includes libutil.a.
=back
=head2 Configure-time Options for Perl on Cygwin
The F<INSTALL> document describes several Configure-time options. Some of
these will work with Cygwin, others are not yet possible. Also, some of
these are experimental. You can either select an option when Configure
prompts you or you can define (undefine) symbols on the command line.
=over 4
=item * C<-Uusedl>
Undefining this symbol forces Perl to be compiled statically.
=item * C<-Dusemymalloc>
By default Perl does not use the C<malloc()> included with the Perl source,
because it was slower and not entirely thread-safe. If you want to force
Perl to build with the old -Dusemymalloc define this.
=item * C<-Uuseperlio>
Undefining this symbol disables the PerlIO abstraction. PerlIO is now the
default; it is not recommended to disable PerlIO.
=item * C<-Dusemultiplicity>
Multiplicity is required when embedding Perl in a C program and using
more than one interpreter instance. This is only required when you build
a not-threaded perl with C<-Uuseithreads>.
=item * C<-Uuse64bitint>
By default Perl uses 64 bit integers. If you want to use smaller 32 bit
integers, define this symbol.
=item * C<-Duselongdouble>
I<gcc> supports long doubles (12 bytes). However, several additional
long double math functions are necessary to use them within Perl
(I<{atan2, cos, exp, floor, fmod, frexp, isnan, log, modf, pow, sin, sqrt}l,
strtold>).
These are B<not> yet available with newlib, the Cygwin libc.
=item * C<-Uuseithreads>
Define this symbol if you want not-threaded faster perl.
=item * C<-Duselargefiles>
Cygwin uses 64-bit integers for internal size and position calculations,
this will be correctly detected and defined by Configure.
=item * C<-Dmksymlinks>
Use this to build perl outside of the source tree. Details can be
found in the F<INSTALL> document. This is the recommended way to
build perl from sources.
=back
=head2 Suspicious Warnings on Cygwin
You may see some messages during Configure that seem suspicious.
=over 4
=item * Win9x and C<d_eofnblk>
Win9x does not correctly report C<EOF> with a non-blocking read on a
closed pipe. You will see the following messages:
But it also returns -1 to signal EOF, so be careful!
WARNING: you can't distinguish between EOF and no data!
*** WHOA THERE!!! ***
The recommended value for $d_eofnblk on this machine was
"define"!
Keep the recommended value? [y]
At least for consistency with WinNT, you should keep the recommended
value.
=item * Compiler/Preprocessor defines
The following error occurs because of the Cygwin C<#define> of
C<_LONG_DOUBLE>:
Guessing which symbols your C compiler and preprocessor define...
try.c:<line#>: missing binary operator
This failure does not seem to cause any problems. With older gcc
versions, "parse error" is reported instead of "missing binary
operator".
=back
=head1 MAKE ON CYGWIN
Simply run I<make> and wait:
make 2>&1 | tee log.make
=head1 TEST ON CYGWIN
There are two steps to running the test suite:
make test 2>&1 | tee log.make-test
cd t; ./perl harness 2>&1 | tee ../log.harness
The same tests are run both times, but more information is provided when
running as C<./perl harness>.
Test results vary depending on your host system and your Cygwin
configuration. If a test can pass in some Cygwin setup, it is always
attempted and explainable test failures are documented. It is possible
for Perl to pass all the tests, but it is more likely that some tests
will fail for one of the reasons listed below.
=head2 File Permissions on Cygwin
UNIX file permissions are based on sets of mode bits for
{read,write,execute} for each {user,group,other}. By default Cygwin
only tracks the Win32 read-only attribute represented as the UNIX file
user write bit (files are always readable, files are executable if they
have a F<.{com,bat,exe}> extension or begin with C<#!>, directories are
always readable and executable). On WinNT with the I<ntea> C<CYGWIN>
setting, the additional mode bits are stored as extended file attributes.
On WinNT with the default I<ntsec> C<CYGWIN> setting, permissions use the
standard WinNT security descriptors and access control lists. Without one of
these options, these tests will fail (listing not updated yet):
Failed Test List of failed
------------------------------------
io/fs.t 5, 7, 9-10
lib/anydbm.t 2
lib/db-btree.t 20
lib/db-hash.t 16
lib/db-recno.t 18
lib/gdbm.t 2
lib/ndbm.t 2
lib/odbm.t 2
lib/sdbm.t 2
op/stat.t 9, 20 (.tmp not an executable extension)
=head2 NDBM_File and ODBM_File do not work on FAT filesystems
Do not use NDBM_File or ODBM_File on FAT filesystem. They can be
built on a FAT filesystem, but many tests will fail:
../ext/NDBM_File/ndbm.t 13 3328 71 59 83.10% 1-2 4 16-71
../ext/ODBM_File/odbm.t 255 65280 ?? ?? % ??
../lib/AnyDBM_File.t 2 512 12 2 16.67% 1 4
../lib/Memoize/t/errors.t 0 139 11 5 45.45% 7-11
../lib/Memoize/t/tie_ndbm.t 13 3328 4 4 100.00% 1-4
run/fresh_perl.t 97 1 1.03% 91
If you intend to run only on FAT (or if using AnyDBM_File on FAT),
run Configure with the -Ui_ndbm and -Ui_dbm options to prevent
NDBM_File and ODBM_File being built.
With NTFS (and no CYGWIN=nontsec), there should be no problems even if
perl was built on FAT.
=head2 C<fork()> failures in io_* tests
A C<fork()> failure may result in the following tests failing:
ext/IO/lib/IO/t/io_multihomed.t
ext/IO/lib/IO/t/io_sock.t
ext/IO/lib/IO/t/io_unix.t
See comment on fork in L</Miscellaneous> below.
=head1 Specific features of the Cygwin port
=head2 Script Portability on Cygwin
Cygwin does an outstanding job of providing UNIX-like semantics on top of
Win32 systems. However, in addition to the items noted above, there are
some differences that you should know about. This is a very brief guide
to portability, more information can be found in the Cygwin documentation.
=over 4
=item * Pathnames
Cygwin pathnames are separated by forward (F</>) slashes, Universal
Naming Codes (F<//UNC>) are also supported Since cygwin-1.7 non-POSIX
pathnames are discouraged. Names may contain all printable
characters.
File names are case insensitive, but case preserving. A pathname that
contains a backslash or drive letter is a Win32 pathname, and not
subject to the translations applied to POSIX style pathnames, but
cygwin will warn you, so better convert them to POSIX.
For conversion we have C<Cygwin::win_to_posix_path()> and
C<Cygwin::posix_to_win_path()>.
Since cygwin-1.7 pathnames are UTF-8 encoded.
=item * Text/Binary
Since cygwin-1.7 textmounts are deprecated and strongly discouraged.
When a file is opened it is in either text or binary mode. In text mode
a file is subject to CR/LF/Ctrl-Z translations. With Cygwin, the default
mode for an C<open()> is determined by the mode of the mount that underlies
the file. See L</Cygwin::is_binmount>(). Perl provides a C<binmode()> function
to set binary mode on files that otherwise would be treated as text.
C<sysopen()> with the C<O_TEXT> flag sets text mode on files that otherwise
would be treated as binary:
sysopen(FOO, "bar", O_WRONLY|O_CREAT|O_TEXT)
C<lseek()>, C<tell()> and C<sysseek()> only work with files opened in binary
mode.
The text/binary issue is covered at length in the Cygwin documentation.
=item * PerlIO
PerlIO overrides the default Cygwin Text/Binary behaviour. A file will
always be treated as binary, regardless of the mode of the mount it lives
on, just like it is in UNIX. So CR/LF translation needs to be requested in
either the C<open()> call like this:
open(FH, ">:crlf", "out.txt");
which will do conversion from LF to CR/LF on the output, or in the
environment settings (add this to your .bashrc):
export PERLIO=crlf
which will pull in the crlf PerlIO layer which does LF -> CRLF conversion
on every output generated by perl.
=item * F<.exe>
The Cygwin C<stat()>, C<lstat()> and C<readlink()> functions make the F<.exe>
extension transparent by looking for F<foo.exe> when you ask for F<foo>
(unless a F<foo> also exists). Cygwin does not require a F<.exe>
extension, but I<gcc> adds it automatically when building a program.
However, when accessing an executable as a normal file (e.g., I<cp>
in a makefile) the F<.exe> is not transparent. The I<install> program
included with Cygwin automatically appends a F<.exe> when necessary.
=item * Cygwin vs. Windows process ids
Cygwin processes have their own pid, which is different from the
underlying windows pid. Most posix compliant Proc functions expect
the cygwin pid, but several Win32::Process functions expect the
winpid. E.g. C<$$> is the cygwin pid of F</usr/bin/perl>, which is not
the winpid. Use C<Cygwin::pid_to_winpid()> and C<Cygwin::winpid_to_pid()>
to translate between them.
=item * Cygwin vs. Windows errors
Under Cygwin, $^E is the same as $!. When using L<Win32 API Functions|Win32>,
use C<Win32::GetLastError()> to get the last Windows error.
=item * rebase errors on fork or system
Using C<fork()> or C<system()> out to another perl after loading multiple dlls
may result on a DLL baseaddress conflict. The internal cygwin error
looks like like the following:
0 [main] perl 8916 child_info_fork::abort: data segment start:
parent (0xC1A000) != child(0xA6A000)
or:
183 [main] perl 3588 C:\cygwin\bin\perl.exe: *** fatal error -
unable to remap C:\cygwin\bin\cygsvn_subr-1-0.dll to same address
as parent(0x6FB30000) != 0x6FE60000 46 [main] perl 3488 fork: child
3588 - died waiting for dll loading, errno11
See L<https://cygwin.com/faq/faq-nochunks.html#faq.using.fixing-fork-failures>
It helps if not too many DLLs are loaded in memory so the available address space is larger,
e.g. stopping the MS Internet Explorer might help.
Use the perlrebase or rebase utilities to resolve the conflicting dll addresses.
The rebase package is included in the Cygwin setup. Use F<setup.exe>
from L<https://cygwin.com/install.html> to install it.
1. kill all perl processes and run C<perlrebase> or
2. kill all cygwin processes and services, start dash from cmd.exe and run C<rebaseall>.
=item * C<chown()>
On WinNT C<chown()> can change a file's user and group IDs. On Win9x C<chown()>
is a no-op, although this is appropriate since there is no security model.
=item * Miscellaneous
File locking using the C<F_GETLK> command to C<fcntl()> is a stub that
returns C<ENOSYS>.
Win9x can not C<rename()> an open file (although WinNT can).
The Cygwin C<chroot()> implementation has holes (it can not restrict file
access by native Win32 programs).
Inplace editing C<perl -i> of files doesn't work without doing a backup
of the file being edited C<perl -i.bak> because of windowish restrictions,
therefore Perl adds the suffix C<.bak> automatically if you use C<perl -i>
without specifying a backup extension.
=back
=head2 Prebuilt methods:
=over 4
=item C<Cwd::cwd>
Returns the current working directory.
=item C<Cygwin::pid_to_winpid>
Translates a cygwin pid to the corresponding Windows pid (which may or
may not be the same).
=item C<Cygwin::winpid_to_pid>
Translates a Windows pid to the corresponding cygwin pid (if any).
=item C<Cygwin::win_to_posix_path>
Translates a Windows path to the corresponding cygwin path respecting
the current mount points. With a second non-null argument returns an
absolute path. Double-byte characters will not be translated.
=item C<Cygwin::posix_to_win_path>
Translates a cygwin path to the corresponding cygwin path respecting
the current mount points. With a second non-null argument returns an
absolute path. Double-byte characters will not be translated.
=item C<Cygwin::mount_table()>
Returns an array of [mnt_dir, mnt_fsname, mnt_type, mnt_opts].
perl -e 'for $i (Cygwin::mount_table) {print join(" ",@$i),"\n";}'
/bin c:\cygwin\bin system binmode,cygexec
/usr/bin c:\cygwin\bin system binmode
/usr/lib c:\cygwin\lib system binmode
/ c:\cygwin system binmode
/cygdrive/c c: system binmode,noumount
/cygdrive/d d: system binmode,noumount
/cygdrive/e e: system binmode,noumount
=item C<Cygwin::mount_flags>
Returns the mount type and flags for a specified mount point.
A comma-separated string of mntent->mnt_type (always
"system" or "user"), then the mntent->mnt_opts, where
the first is always "binmode" or "textmode".
system|user,binmode|textmode,exec,cygexec,cygdrive,mixed,
notexec,managed,nosuid,devfs,proc,noumount
If the argument is "/cygdrive", then just the volume mount settings,
and the cygdrive mount prefix are returned.
User mounts override system mounts.
$ perl -e 'print Cygwin::mount_flags "/usr/bin"'
system,binmode,cygexec
$ perl -e 'print Cygwin::mount_flags "/cygdrive"'
binmode,cygdrive,/cygdrive
=item C<Cygwin::is_binmount>
Returns true if the given cygwin path is binary mounted, false if the
path is mounted in textmode.
=item C<Cygwin::sync_winenv>
Cygwin does not initialize all original Win32 environment variables.
See the bottom of this page L<https://cygwin.com/cygwin-ug-net/setup-env.html>
for "Restricted Win32 environment".
Certain Win32 programs called from cygwin programs might need some environment
variable, such as e.g. ADODB needs %COMMONPROGRAMFILES%.
Call Cygwin::sync_winenv() to copy all Win32 environment variables to your
process and note that cygwin will warn on every encounter of non-POSIX paths.
=back
=head1 INSTALL PERL ON CYGWIN
This will install Perl, including I<man> pages.
make install 2>&1 | tee log.make-install
NOTE: If C<STDERR> is redirected C<make install> will B<not> prompt
you to install I<perl> into F</usr/bin>.
You may need to be I<Administrator> to run C<make install>. If you
are not, you must have write access to the directories in question.
Information on installing the Perl documentation in HTML format can be
found in the F<INSTALL> document.
=head1 MANIFEST ON CYGWIN
These are the files in the Perl release that contain references to Cygwin.
These very brief notes attempt to explain the reason for all conditional
code. Hopefully, keeping this up to date will allow the Cygwin port to
be kept as clean as possible.
=over 4
=item Documentation
INSTALL README.cygwin README.win32 MANIFEST
pod/perl.pod pod/perlport.pod pod/perlfaq3.pod
pod/perldelta.pod pod/perl5004delta.pod pod/perl56delta.pod
pod/perl561delta.pod pod/perl570delta.pod pod/perl572delta.pod
pod/perl573delta.pod pod/perl58delta.pod pod/perl581delta.pod
pod/perl590delta.pod pod/perlhist.pod pod/perlmodlib.pod
pod/perltoc.pod Porting/Glossary pod/perlgit.pod
Porting/checkAUTHORS.pl
dist/Cwd/Changes ext/Compress-Raw-Zlib/Changes
dist/Time-HiRes/Changes
ext/Compress-Raw-Zlib/README ext/Compress-Zlib/Changes
ext/DB_File/Changes ext/Encode/Changes ext/Sys-Syslog/Changes
ext/Win32API-File/Changes
lib/ExtUtils/CBuilder/Changes lib/ExtUtils/Changes
lib/ExtUtils/NOTES lib/ExtUtils/PATCHING lib/ExtUtils/README
lib/Net/Ping/Changes lib/Test/Harness/Changes
lib/Term/ANSIColor/ChangeLog lib/Term/ANSIColor/README
README.symbian symbian/TODO
=item Build, Configure, Make, Install
cygwin/Makefile.SHs
ext/IPC/SysV/hints/cygwin.pl
ext/NDBM_File/hints/cygwin.pl
ext/ODBM_File/hints/cygwin.pl
hints/cygwin.sh
Configure - help finding hints from uname,
shared libperl required for dynamic loading
Makefile.SH Cross/Makefile-cross-SH
- linklibperl
Porting/patchls - cygwin in port list
installman - man pages with :: translated to .
installperl - install dll, install to 'pods'
makedepend.SH - uwinfix
regen_lib.pl - file permissions
NetWare/Makefile
plan9/mkfile
symbian/sanity.pl symbian/sisify.pl
hints/uwin.sh
vms/descrip_mms.template
win32/Makefile win32/makefile.mk
=item Tests
t/io/fs.t - no file mode checks if not ntsec
skip rename() check when not
check_case:relaxed
t/io/tell.t - binmode
t/lib/cygwin.t - builtin cygwin function tests
t/op/groups.t - basegroup has ID = 0
t/op/magic.t - $^X/symlink WORKAROUND, s/.exe//
t/op/stat.t - no /dev, skip Win32 ftCreationTime quirk
(cache manager sometimes preserves ctime of
file previously created and deleted), no -u
(setuid)
t/op/taint.t - can't use empty path under Cygwin Perl
t/op/time.t - no tzset()
=item Compiled Perl Source
EXTERN.h - __declspec(dllimport)
XSUB.h - __declspec(dllexport)
cygwin/cygwin.c - os_extras (getcwd, spawn, and several
Cygwin:: functions)
perl.c - os_extras, -i.bak
perl.h - binmode
doio.c - win9x can not rename a file when it is open
pp_sys.c - do not define h_errno, init
_pwent_struct.pw_comment
util.c - use setenv
util.h - PERL_FILE_IS_ABSOLUTE macro
pp.c - Comment about Posix vs IEEE math under
Cygwin
perlio.c - CR/LF mode
perliol.c - Comment about EXTCONST under Cygwin
=item Compiled Module Source
ext/Compress-Raw-Zlib/Makefile.PL
- Can't install via CPAN shell under Cygwin
ext/Compress-Raw-Zlib/zlib-src/zutil.h
- Cygwin is Unix-like and has vsnprintf
ext/Errno/Errno_pm.PL - Special handling for Win32 Perl under
Cygwin
ext/POSIX/POSIX.xs - tzname defined externally
ext/SDBM_File/sdbm/pair.c
- EXTCONST needs to be redefined from
EXTERN.h
ext/SDBM_File/sdbm/sdbm.c
- binary open
ext/Sys/Syslog/Syslog.xs
- Cygwin has syslog.h
ext/Sys/Syslog/win32/compile.pl
- Convert paths to Windows paths
ext/Time-HiRes/HiRes.xs
- Various timers not available
ext/Time-HiRes/Makefile.PL
- Find w32api/windows.h
ext/Win32/Makefile.PL - Use various libraries under Cygwin
ext/Win32/Win32.xs - Child dir and child env under Cygwin
ext/Win32API-File/File.xs
- _open_osfhandle not implemented under
Cygwin
ext/Win32CORE/Win32CORE.c
- __declspec(dllexport)
=item Perl Modules/Scripts
ext/B/t/OptreeCheck.pm - Comment about stderr/stdout order under
Cygwin
ext/Digest-SHA/bin/shasum
- Use binary mode under Cygwin
ext/Sys/Syslog/win32/Win32.pm
- Convert paths to Windows paths
ext/Time-HiRes/HiRes.pm
- Comment about various timers not available
ext/Win32API-File/File.pm
- _open_osfhandle not implemented under
Cygwin
ext/Win32CORE/Win32CORE.pm
- History of Win32CORE under Cygwin
lib/Cwd.pm - hook to internal Cwd::cwd
lib/ExtUtils/CBuilder/Platform/cygwin.pm
- use gcc for ld, and link to libperl.dll.a
lib/ExtUtils/CBuilder.pm
- Cygwin is Unix-like
lib/ExtUtils/Install.pm - Install and rename issues under Cygwin
lib/ExtUtils/MM.pm - OS classifications
lib/ExtUtils/MM_Any.pm - Example for Cygwin
lib/ExtUtils/MakeMaker.pm
- require MM_Cygwin.pm
lib/ExtUtils/MM_Cygwin.pm
- canonpath, cflags, manifypods, perl_archive
lib/File/Fetch.pm - Comment about quotes using a Cygwin example
lib/File/Find.pm - on remote drives stat() always sets
st_nlink to 1
lib/File/Spec/Cygwin.pm - case_tolerant
lib/File/Spec/Unix.pm - preserve //unc
lib/File/Spec/Win32.pm - References a message on cygwin.com
lib/File/Spec.pm - Pulls in lib/File/Spec/Cygwin.pm
lib/File/Temp.pm - no directory sticky bit
lib/Module/CoreList.pm - List of all module files and versions
lib/Net/Domain.pm - No domainname command under Cygwin
lib/Net/Netrc.pm - Bypass using stat() under Cygwin
lib/Net/Ping.pm - ECONREFUSED is EAGAIN under Cygwin
lib/Pod/Find.pm - Set 'pods' dir
lib/Pod/Perldoc/ToMan.pm - '-c' switch for pod2man
lib/Pod/Perldoc.pm - Use 'less' pager, and use .exe extension
lib/Term/ANSIColor.pm - Cygwin terminal info
lib/perl5db.pl - use stdin not /dev/tty
utils/perlbug.PL - Add CYGWIN environment variable to report
=item Perl Module Tests
dist/Cwd/t/cwd.t
ext/Compress-Zlib/t/14gzopen.t
ext/DB_File/t/db-btree.t
ext/DB_File/t/db-hash.t
ext/DB_File/t/db-recno.t
ext/DynaLoader/t/DynaLoader.t
ext/File-Glob/t/basic.t
ext/GDBM_File/t/gdbm.t
ext/POSIX/t/sysconf.t
ext/POSIX/t/time.t
ext/SDBM_File/t/sdbm.t
ext/Sys/Syslog/t/syslog.t
ext/Time-HiRes/t/HiRes.t
ext/Win32/t/Unicode.t
ext/Win32API-File/t/file.t
ext/Win32CORE/t/win32core.t
lib/AnyDBM_File.t
lib/Archive/Extract/t/01_Archive-Extract.t
lib/Archive/Tar/t/02_methods.t
lib/ExtUtils/t/Embed.t
lib/ExtUtils/t/eu_command.t
lib/ExtUtils/t/MM_Cygwin.t
lib/ExtUtils/t/MM_Unix.t
lib/File/Compare.t
lib/File/Copy.t
lib/File/Find/t/find.t
lib/File/Path.t
lib/File/Spec/t/crossplatform.t
lib/File/Spec/t/Spec.t
lib/Net/hostent.t
lib/Net/Ping/t/110_icmp_inst.t
lib/Net/Ping/t/500_ping_icmp.t
lib/Net/t/netrc.t
lib/Pod/Simple/t/perlcyg.pod
lib/Pod/Simple/t/perlcygo.txt
lib/Pod/Simple/t/perlfaq.pod
lib/Pod/Simple/t/perlfaqo.txt
lib/User/grent.t
lib/User/pwent.t
=back
=head1 BUGS ON CYGWIN
Support for swapping real and effective user and group IDs is incomplete.
On WinNT Cygwin provides C<setuid()>, C<seteuid()>, C<setgid()> and C<setegid()>.
However, additional Cygwin calls for manipulating WinNT access tokens
and security contexts are required.
=head1 AUTHORS
Charles Wilson <cwilson@ece.gatech.edu>,
Eric Fifer <egf7@columbia.edu>,
alexander smishlajev <als@turnhere.com>,
Steven Morlock <newspost@morlock.net>,
Sebastien Barre <Sebastien.Barre@utc.fr>,
Teun Burgers <burgers@ecn.nl>,
Gerrit P. Haase <gp@familiehaase.de>,
Reini Urban <rurban@cpan.org>,
Jan Dubois <jand@activestate.com>,
Jerry D. Hedden <jdhedden@cpan.org>.
=head1 HISTORY
Last updated: 2012-02-08

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,167 @@
=head1 NAME
perldbmfilter - Perl DBM Filters
=head1 SYNOPSIS
$db = tie %hash, 'DBM', ...
$old_filter = $db->filter_store_key ( sub { ... } );
$old_filter = $db->filter_store_value( sub { ... } );
$old_filter = $db->filter_fetch_key ( sub { ... } );
$old_filter = $db->filter_fetch_value( sub { ... } );
=head1 DESCRIPTION
The four C<filter_*> methods shown above are available in all the DBM
modules that ship with Perl, namely DB_File, GDBM_File, NDBM_File,
ODBM_File and SDBM_File.
Each of the methods works identically, and is used to install (or
uninstall) a single DBM Filter. The only difference between them is the
place that the filter is installed.
To summarise:
=over 5
=item B<filter_store_key>
If a filter has been installed with this method, it will be invoked
every time you write a key to a DBM database.
=item B<filter_store_value>
If a filter has been installed with this method, it will be invoked
every time you write a value to a DBM database.
=item B<filter_fetch_key>
If a filter has been installed with this method, it will be invoked
every time you read a key from a DBM database.
=item B<filter_fetch_value>
If a filter has been installed with this method, it will be invoked
every time you read a value from a DBM database.
=back
You can use any combination of the methods from none to all four.
All filter methods return the existing filter, if present, or C<undef>
if not.
To delete a filter pass C<undef> to it.
=head2 The Filter
When each filter is called by Perl, a local copy of C<$_> will contain
the key or value to be filtered. Filtering is achieved by modifying
the contents of C<$_>. The return code from the filter is ignored.
=head2 An Example: the NULL termination problem.
DBM Filters are useful for a class of problems where you I<always>
want to make the same transformation to all keys, all values or both.
For example, consider the following scenario. You have a DBM database
that you need to share with a third-party C application. The C application
assumes that I<all> keys and values are NULL terminated. Unfortunately
when Perl writes to DBM databases it doesn't use NULL termination, so
your Perl application will have to manage NULL termination itself. When
you write to the database you will have to use something like this:
$hash{"$key\0"} = "$value\0";
Similarly the NULL needs to be taken into account when you are considering
the length of existing keys/values.
It would be much better if you could ignore the NULL terminations issue
in the main application code and have a mechanism that automatically
added the terminating NULL to all keys and values whenever you write to
the database and have them removed when you read from the database. As I'm
sure you have already guessed, this is a problem that DBM Filters can
fix very easily.
use strict;
use warnings;
use SDBM_File;
use Fcntl;
my %hash;
my $filename = "filt";
unlink $filename;
my $db = tie(%hash, 'SDBM_File', $filename, O_RDWR|O_CREAT, 0640)
or die "Cannot open $filename: $!\n";
# Install DBM Filters
$db->filter_fetch_key ( sub { s/\0$// } );
$db->filter_store_key ( sub { $_ .= "\0" } );
$db->filter_fetch_value(
sub { no warnings 'uninitialized'; s/\0$// } );
$db->filter_store_value( sub { $_ .= "\0" } );
$hash{"abc"} = "def";
my $a = $hash{"ABC"};
# ...
undef $db;
untie %hash;
The code above uses SDBM_File, but it will work with any of the DBM
modules.
Hopefully the contents of each of the filters should be
self-explanatory. Both "fetch" filters remove the terminating NULL,
and both "store" filters add a terminating NULL.
=head2 Another Example: Key is a C int.
Here is another real-life example. By default, whenever Perl writes to
a DBM database it always writes the key and value as strings. So when
you use this:
$hash{12345} = "something";
the key 12345 will get stored in the DBM database as the 5 byte string
"12345". If you actually want the key to be stored in the DBM database
as a C int, you will have to use C<pack> when writing, and C<unpack>
when reading.
Here is a DBM Filter that does it:
use strict;
use warnings;
use DB_File;
my %hash;
my $filename = "filt";
unlink $filename;
my $db = tie %hash, 'DB_File', $filename, O_CREAT|O_RDWR, 0666,
$DB_HASH or die "Cannot open $filename: $!\n";
$db->filter_fetch_key ( sub { $_ = unpack("i", $_) } );
$db->filter_store_key ( sub { $_ = pack ("i", $_) } );
$hash{123} = "def";
# ...
undef $db;
untie %hash;
The code above uses DB_File, but again it will work with any of the
DBM modules.
This time only two filters have been used; we only need to manipulate
the contents of the key, so it wasn't necessary to install any value
filters.
=head1 SEE ALSO
L<DB_File>, L<GDBM_File>, L<NDBM_File>, L<ODBM_File> and L<SDBM_File>.
=head1 AUTHOR
Paul Marquess

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,736 @@
=head1 NAME
perldebtut - Perl debugging tutorial
=head1 DESCRIPTION
A (very) lightweight introduction in the use of the perl debugger, and a
pointer to existing, deeper sources of information on the subject of debugging
perl programs.
There's an extraordinary number of people out there who don't appear to know
anything about using the perl debugger, though they use the language every
day.
This is for them.
=head1 use strict
First of all, there's a few things you can do to make your life a lot more
straightforward when it comes to debugging perl programs, without using the
debugger at all. To demonstrate, here's a simple script, named "hello", with
a problem:
#!/usr/bin/perl
$var1 = 'Hello World'; # always wanted to do that :-)
$var2 = "$varl\n";
print $var2;
exit;
While this compiles and runs happily, it probably won't do what's expected,
namely it doesn't print "Hello World\n" at all; It will on the other hand do
exactly what it was told to do, computers being a bit that way inclined. That
is, it will print out a newline character, and you'll get what looks like a
blank line. It looks like there's 2 variables when (because of the typo)
there's really 3:
$var1 = 'Hello World';
$varl = undef;
$var2 = "\n";
To catch this kind of problem, we can force each variable to be declared
before use by pulling in the strict module, by putting 'use strict;' after the
first line of the script.
Now when you run it, perl complains about the 3 undeclared variables and we
get four error messages because one variable is referenced twice:
Global symbol "$var1" requires explicit package name at ./t1 line 4.
Global symbol "$var2" requires explicit package name at ./t1 line 5.
Global symbol "$varl" requires explicit package name at ./t1 line 5.
Global symbol "$var2" requires explicit package name at ./t1 line 7.
Execution of ./hello aborted due to compilation errors.
Luvverly! and to fix this we declare all variables explicitly and now our
script looks like this:
#!/usr/bin/perl
use strict;
my $var1 = 'Hello World';
my $varl = undef;
my $var2 = "$varl\n";
print $var2;
exit;
We then do (always a good idea) a syntax check before we try to run it again:
> perl -c hello
hello syntax OK
And now when we run it, we get "\n" still, but at least we know why. Just
getting this script to compile has exposed the '$varl' (with the letter 'l')
variable, and simply changing $varl to $var1 solves the problem.
=head1 Looking at data and -w and v
Ok, but how about when you want to really see your data, what's in that
dynamic variable, just before using it?
#!/usr/bin/perl
use strict;
my $key = 'welcome';
my %data = (
'this' => qw(that),
'tom' => qw(and jerry),
'welcome' => q(Hello World),
'zip' => q(welcome),
);
my @data = keys %data;
print "$data{$key}\n";
exit;
Looks OK, after it's been through the syntax check (perl -c scriptname), we
run it and all we get is a blank line again! Hmmmm.
One common debugging approach here, would be to liberally sprinkle a few print
statements, to add a check just before we print out our data, and another just
after:
print "All OK\n" if grep($key, keys %data);
print "$data{$key}\n";
print "done: '$data{$key}'\n";
And try again:
> perl data
All OK
done: ''
After much staring at the same piece of code and not seeing the wood for the
trees for some time, we get a cup of coffee and try another approach. That
is, we bring in the cavalry by giving perl the 'B<-d>' switch on the command
line:
> perl -d data
Default die handler restored.
Loading DB routines from perl5db.pl version 1.07
Editor support available.
Enter h or `h h' for help, or `man perldebug' for more help.
main::(./data:4): my $key = 'welcome';
Now, what we've done here is to launch the built-in perl debugger on our
script. It's stopped at the first line of executable code and is waiting for
input.
Before we go any further, you'll want to know how to quit the debugger: use
just the letter 'B<q>', not the words 'quit' or 'exit':
DB<1> q
>
That's it, you're back on home turf again.
=head1 help
Fire the debugger up again on your script and we'll look at the help menu.
There's a couple of ways of calling help: a simple 'B<h>' will get the summary
help list, 'B<|h>' (pipe-h) will pipe the help through your pager (which is
(probably 'more' or 'less'), and finally, 'B<h h>' (h-space-h) will give you
the entire help screen. Here is the summary page:
DB<1>h
List/search source lines: Control script execution:
l [ln|sub] List source code T Stack trace
- or . List previous/current line s [expr] Single step
[in expr]
v [line] View around line n [expr] Next, steps over
subs
f filename View source in file <CR/Enter> Repeat last n or s
/pattern/ ?patt? Search forw/backw r Return from
subroutine
M Show module versions c [ln|sub] Continue until
position
Debugger controls: L List break/watch/
actions
o [...] Set debugger options t [expr] Toggle trace
[trace expr]
<[<]|{[{]|>[>] [cmd] Do pre/post-prompt b [ln|event|sub] [cnd] Set
breakpoint
! [N|pat] Redo a previous command B ln|* Delete a/all
breakpoints
H [-num] Display last num commands a [ln] cmd Do cmd before line
= [a val] Define/list an alias A ln|* Delete a/all
actions
h [db_cmd] Get help on command w expr Add a watch
expression
h h Complete help page W expr|* Delete a/all watch
exprs
|[|]db_cmd Send output to pager ![!] syscmd Run cmd in a
subprocess
q or ^D Quit R Attempt a restart
Data Examination: expr Execute perl code, also see: s,n,t expr
x|m expr Evals expr in list context, dumps the result or lists
methods.
p expr Print expression (uses script's current package).
S [[!]pat] List subroutine names [not] matching pattern
V [Pk [Vars]] List Variables in Package. Vars can be ~pattern or
!pattern.
X [Vars] Same as "V current_package [Vars]".
y [n [Vars]] List lexicals in higher scope <n>. Vars same as V.
For more help, type h cmd_letter, or run man perldebug for all docs.
More confusing options than you can shake a big stick at! It's not as bad as
it looks and it's very useful to know more about all of it, and fun too!
There's a couple of useful ones to know about straight away. You wouldn't
think we're using any libraries at all at the moment, but 'B<M>' will show
which modules are currently loaded, and their version number, while 'B<m>'
will show the methods, and 'B<S>' shows all subroutines (by pattern) as
shown below. 'B<V>' and 'B<X>' show variables in the program by package
scope and can be constrained by pattern.
DB<2>S str
dumpvar::stringify
strict::bits
strict::import
strict::unimport
Using 'X' and cousins requires you not to use the type identifiers ($@%), just
the 'name':
DM<3>X ~err
FileHandle(stderr) => fileno(2)
Remember we're in our tiny program with a problem, we should have a look at
where we are, and what our data looks like. First of all let's view some code
at our present position (the first line of code in this case), via 'B<v>':
DB<4> v
1 #!/usr/bin/perl
2: use strict;
3
4==> my $key = 'welcome';
5: my %data = (
6 'this' => qw(that),
7 'tom' => qw(and jerry),
8 'welcome' => q(Hello World),
9 'zip' => q(welcome),
10 );
At line number 4 is a helpful pointer, that tells you where you are now. To
see more code, type 'v' again:
DB<4> v
8 'welcome' => q(Hello World),
9 'zip' => q(welcome),
10 );
11: my @data = keys %data;
12: print "All OK\n" if grep($key, keys %data);
13: print "$data{$key}\n";
14: print "done: '$data{$key}'\n";
15: exit;
And if you wanted to list line 5 again, type 'l 5', (note the space):
DB<4> l 5
5: my %data = (
In this case, there's not much to see, but of course normally there's pages of
stuff to wade through, and 'l' can be very useful. To reset your view to the
line we're about to execute, type a lone period '.':
DB<5> .
main::(./data_a:4): my $key = 'welcome';
The line shown is the one that is about to be executed B<next>, it hasn't
happened yet. So while we can print a variable with the letter 'B<p>', at
this point all we'd get is an empty (undefined) value back. What we need to
do is to step through the next executable statement with an 'B<s>':
DB<6> s
main::(./data_a:5): my %data = (
main::(./data_a:6): 'this' => qw(that),
main::(./data_a:7): 'tom' => qw(and jerry),
main::(./data_a:8): 'welcome' => q(Hello World),
main::(./data_a:9): 'zip' => q(welcome),
main::(./data_a:10): );
Now we can have a look at that first ($key) variable:
DB<7> p $key
welcome
line 13 is where the action is, so let's continue down to there via the letter
'B<c>', which by the way, inserts a 'one-time-only' breakpoint at the given
line or sub routine:
DB<8> c 13
All OK
main::(./data_a:13): print "$data{$key}\n";
We've gone past our check (where 'All OK' was printed) and have stopped just
before the meat of our task. We could try to print out a couple of variables
to see what is happening:
DB<9> p $data{$key}
Not much in there, lets have a look at our hash:
DB<10> p %data
Hello Worldziptomandwelcomejerrywelcomethisthat
DB<11> p keys %data
Hello Worldtomwelcomejerrythis
Well, this isn't very easy to read, and using the helpful manual (B<h h>), the
'B<x>' command looks promising:
DB<12> x %data
0 'Hello World'
1 'zip'
2 'tom'
3 'and'
4 'welcome'
5 undef
6 'jerry'
7 'welcome'
8 'this'
9 'that'
That's not much help, a couple of welcomes in there, but no indication of
which are keys, and which are values, it's just a listed array dump and, in
this case, not particularly helpful. The trick here, is to use a B<reference>
to the data structure:
DB<13> x \%data
0 HASH(0x8194bc4)
'Hello World' => 'zip'
'jerry' => 'welcome'
'this' => 'that'
'tom' => 'and'
'welcome' => undef
The reference is truly dumped and we can finally see what we're dealing with.
Our quoting was perfectly valid but wrong for our purposes, with 'and jerry'
being treated as 2 separate words rather than a phrase, thus throwing the
evenly paired hash structure out of alignment.
The 'B<-w>' switch would have told us about this, had we used it at the start,
and saved us a lot of trouble:
> perl -w data
Odd number of elements in hash assignment at ./data line 5.
We fix our quoting: 'tom' => q(and jerry), and run it again, this time we get
our expected output:
> perl -w data
Hello World
While we're here, take a closer look at the 'B<x>' command, it's really useful
and will merrily dump out nested references, complete objects, partial objects
- just about whatever you throw at it:
Let's make a quick object and x-plode it, first we'll start the debugger:
it wants some form of input from STDIN, so we give it something non-committal,
a zero:
> perl -de 0
Default die handler restored.
Loading DB routines from perl5db.pl version 1.07
Editor support available.
Enter h or `h h' for help, or `man perldebug' for more help.
main::(-e:1): 0
Now build an on-the-fly object over a couple of lines (note the backslash):
DB<1> $obj = bless({'unique_id'=>'123', 'attr'=> \
cont: {'col' => 'black', 'things' => [qw(this that etc)]}}, 'MY_class')
And let's have a look at it:
DB<2> x $obj
0 MY_class=HASH(0x828ad98)
'attr' => HASH(0x828ad68)
'col' => 'black'
'things' => ARRAY(0x828abb8)
0 'this'
1 'that'
2 'etc'
'unique_id' => 123
DB<3>
Useful, huh? You can eval nearly anything in there, and experiment with bits
of code or regexes until the cows come home:
DB<3> @data = qw(this that the other atheism leather theory scythe)
DB<4> p 'saw -> '.($cnt += map { print "\t:\t$_\n" } grep(/the/, sort @data))
atheism
leather
other
scythe
the
theory
saw -> 6
If you want to see the command History, type an 'B<H>':
DB<5> H
4: p 'saw -> '.($cnt += map { print "\t:\t$_\n" } grep(/the/, sort @data))
3: @data = qw(this that the other atheism leather theory scythe)
2: x $obj
1: $obj = bless({'unique_id'=>'123', 'attr'=>
{'col' => 'black', 'things' => [qw(this that etc)]}}, 'MY_class')
DB<5>
And if you want to repeat any previous command, use the exclamation: 'B<!>':
DB<5> !4
p 'saw -> '.($cnt += map { print "$_\n" } grep(/the/, sort @data))
atheism
leather
other
scythe
the
theory
saw -> 12
For more on references see L<perlref> and L<perlreftut>
=head1 Stepping through code
Here's a simple program which converts between Celsius and Fahrenheit, it too
has a problem:
#!/usr/bin/perl -w
use strict;
my $arg = $ARGV[0] || '-c20';
if ($arg =~ /^\-(c|f)((\-|\+)*\d+(\.\d+)*)$/) {
my ($deg, $num) = ($1, $2);
my ($in, $out) = ($num, $num);
if ($deg eq 'c') {
$deg = 'f';
$out = &c2f($num);
} else {
$deg = 'c';
$out = &f2c($num);
}
$out = sprintf('%0.2f', $out);
$out =~ s/^((\-|\+)*\d+)\.0+$/$1/;
print "$out $deg\n";
} else {
print "Usage: $0 -[c|f] num\n";
}
exit;
sub f2c {
my $f = shift;
my $c = 5 * $f - 32 / 9;
return $c;
}
sub c2f {
my $c = shift;
my $f = 9 * $c / 5 + 32;
return $f;
}
For some reason, the Fahrenheit to Celsius conversion fails to return the
expected output. This is what it does:
> temp -c0.72
33.30 f
> temp -f33.3
162.94 c
Not very consistent! We'll set a breakpoint in the code manually and run it
under the debugger to see what's going on. A breakpoint is a flag, to which
the debugger will run without interruption, when it reaches the breakpoint, it
will stop execution and offer a prompt for further interaction. In normal
use, these debugger commands are completely ignored, and they are safe - if a
little messy, to leave in production code.
my ($in, $out) = ($num, $num);
$DB::single=2; # insert at line 9!
if ($deg eq 'c')
...
> perl -d temp -f33.3
Default die handler restored.
Loading DB routines from perl5db.pl version 1.07
Editor support available.
Enter h or `h h' for help, or `man perldebug' for more help.
main::(temp:4): my $arg = $ARGV[0] || '-c100';
We'll simply continue down to our pre-set breakpoint with a 'B<c>':
DB<1> c
main::(temp:10): if ($deg eq 'c') {
Followed by a view command to see where we are:
DB<1> v
7: my ($deg, $num) = ($1, $2);
8: my ($in, $out) = ($num, $num);
9: $DB::single=2;
10==> if ($deg eq 'c') {
11: $deg = 'f';
12: $out = &c2f($num);
13 } else {
14: $deg = 'c';
15: $out = &f2c($num);
16 }
And a print to show what values we're currently using:
DB<1> p $deg, $num
f33.3
We can put another break point on any line beginning with a colon, we'll use
line 17 as that's just as we come out of the subroutine, and we'd like to
pause there later on:
DB<2> b 17
There's no feedback from this, but you can see what breakpoints are set by
using the list 'L' command:
DB<3> L
temp:
17: print "$out $deg\n";
break if (1)
Note that to delete a breakpoint you use 'B'.
Now we'll continue down into our subroutine, this time rather than by line
number, we'll use the subroutine name, followed by the now familiar 'v':
DB<3> c f2c
main::f2c(temp:30): my $f = shift;
DB<4> v
24: exit;
25
26 sub f2c {
27==> my $f = shift;
28: my $c = 5 * $f - 32 / 9;
29: return $c;
30 }
31
32 sub c2f {
33: my $c = shift;
Note that if there was a subroutine call between us and line 29, and we wanted
to B<single-step> through it, we could use the 'B<s>' command, and to step
over it we would use 'B<n>' which would execute the sub, but not descend into
it for inspection. In this case though, we simply continue down to line 29:
DB<4> c 29
main::f2c(temp:29): return $c;
And have a look at the return value:
DB<5> p $c
162.944444444444
This is not the right answer at all, but the sum looks correct. I wonder if
it's anything to do with operator precedence? We'll try a couple of other
possibilities with our sum:
DB<6> p (5 * $f - 32 / 9)
162.944444444444
DB<7> p 5 * $f - (32 / 9)
162.944444444444
DB<8> p (5 * $f) - 32 / 9
162.944444444444
DB<9> p 5 * ($f - 32) / 9
0.722222222222221
:-) that's more like it! Ok, now we can set our return variable and we'll
return out of the sub with an 'r':
DB<10> $c = 5 * ($f - 32) / 9
DB<11> r
scalar context return from main::f2c: 0.722222222222221
Looks good, let's just continue off the end of the script:
DB<12> c
0.72 c
Debugged program terminated. Use q to quit or R to restart,
use O inhibit_exit to avoid stopping after program termination,
h q, h R or h O to get additional info.
A quick fix to the offending line (insert the missing parentheses) in the
actual program and we're finished.
=head1 Placeholder for a, w, t, T
Actions, watch variables, stack traces etc.: on the TODO list.
a
w
t
T
=head1 REGULAR EXPRESSIONS
Ever wanted to know what a regex looked like? You'll need perl compiled with
the DEBUGGING flag for this one:
> perl -Dr -e '/^pe(a)*rl$/i'
Compiling REx `^pe(a)*rl$'
size 17 first at 2
rarest char
at 0
1: BOL(2)
2: EXACTF <pe>(4)
4: CURLYN[1] {0,32767}(14)
6: NOTHING(8)
8: EXACTF <a>(0)
12: WHILEM(0)
13: NOTHING(14)
14: EXACTF <rl>(16)
16: EOL(17)
17: END(0)
floating `'$ at 4..2147483647 (checking floating) stclass
`EXACTF <pe>' anchored(BOL) minlen 4
Omitting $` $& $' support.
EXECUTING...
Freeing REx: `^pe(a)*rl$'
Did you really want to know? :-)
For more gory details on getting regular expressions to work, have a look at
L<perlre>, L<perlretut>, and to decode the mysterious labels (BOL and CURLYN,
etc. above), see L<perldebguts>.
=head1 OUTPUT TIPS
To get all the output from your error log, and not miss any messages via
helpful operating system buffering, insert a line like this, at the start of
your script:
$|=1;
To watch the tail of a dynamically growing logfile, (from the command line):
tail -f $error_log
Wrapping all die calls in a handler routine can be useful to see how, and from
where, they're being called, L<perlvar> has more information:
BEGIN { $SIG{__DIE__} = sub { require Carp; Carp::confess(@_) } }
Various useful techniques for the redirection of STDOUT and STDERR filehandles
are explained in L<perlopentut> and L<perlfaq8>.
=head1 CGI
Just a quick hint here for all those CGI programmers who can't figure out how
on earth to get past that 'waiting for input' prompt, when running their CGI
script from the command-line, try something like this:
> perl -d my_cgi.pl -nodebug
Of course L<CGI> and L<perlfaq9> will tell you more.
=head1 GUIs
The command line interface is tightly integrated with an B<emacs> extension
and there's a B<vi> interface too.
You don't have to do this all on the command line, though, there are a few GUI
options out there. The nice thing about these is you can wave a mouse over a
variable and a dump of its data will appear in an appropriate window, or in a
popup balloon, no more tiresome typing of 'x $varname' :-)
In particular have a hunt around for the following:
B<ptkdb> perlTK based wrapper for the built-in debugger
B<ddd> data display debugger
B<PerlDevKit> and B<PerlBuilder> are NT specific
NB. (more info on these and others would be appreciated).
=head1 SUMMARY
We've seen how to encourage good coding practices with B<use strict> and
B<-w>. We can run the perl debugger B<perl -d scriptname> to inspect your
data from within the perl debugger with the B<p> and B<x> commands. You can
walk through your code, set breakpoints with B<b> and step through that code
with B<s> or B<n>, continue with B<c> and return from a sub with B<r>. Fairly
intuitive stuff when you get down to it.
There is of course lots more to find out about, this has just scratched the
surface. The best way to learn more is to use perldoc to find out more about
the language, to read the on-line help (L<perldebug> is probably the next
place to go), and of course, experiment.
=head1 SEE ALSO
L<perldebug>,
L<perldebguts>,
L<perldiag>,
L<perlrun>
=head1 AUTHOR
Richard Foley <richard.foley@rfi.net> Copyright (c) 2000
=head1 CONTRIBUTORS
Various people have made helpful suggestions and contributions, in particular:
Ronald J Kimball <rjk@linguist.dartmouth.edu>
Hugo van der Sanden <hv@crypt0.demon.co.uk>
Peter Scott <Peter@PSDT.com>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,266 @@
=encoding utf8
=head1 NAME
perldelta - what is new for perl v5.32.1
=head1 DESCRIPTION
This document describes differences between the 5.32.0 release and the 5.32.1
release.
If you are upgrading from an earlier release such as 5.31.0, first read
L<perl5320delta>, which describes differences between 5.31.0 and 5.32.0.
=head1 Incompatible Changes
There are no changes intentionally incompatible with Perl 5.32.0. If any
exist, they are bugs, and we request that you submit a report. See
L</Reporting Bugs> below.
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
=over 4
=item *
L<Data::Dumper> has been upgraded from version 2.174 to 2.174_01.
A number of memory leaks have been fixed.
=item *
L<DynaLoader> has been upgraded from version 1.47 to 1.47_01.
=item *
L<Module::CoreList> has been upgraded from version 5.20200620 to 5.20210123.
=item *
L<Opcode> has been upgraded from version 1.47 to 1.48.
A warning has been added about evaluating untrusted code with the perl
interpreter.
=item *
L<Safe> has been upgraded from version 2.41 to 2.41_01.
A warning has been added about evaluating untrusted code with the perl
interpreter.
=back
=head1 Documentation
=head2 New Documentation
=head3 L<perlgov>
Documentation of the newly formed rules of governance for Perl.
=head3 L<perlsecpolicy>
Documentation of how the Perl security team operates and how the team evaluates
new security reports.
=head2 Changes to Existing Documentation
We have attempted to update the documentation to reflect the changes listed in
this document. If you find any we have missed, open an issue at
L<https://github.com/Perl/perl5/issues>.
Additionally, the following selected changes have been made:
=head3 L<perlop>
=over 4
=item *
Document range op behaviour change.
=back
=head1 Diagnostics
The following additions or changes have been made to diagnostic output,
including warnings and fatal error messages. For the complete list of
diagnostic messages, see L<perldiag>.
=head2 Changes to Existing Diagnostics
=over 4
=item *
L<\K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in mE<sol>%sE<sol>|perldiag/"\K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in m/%s/">
This error was incorrectly produced in some cases involving nested lookarounds.
This has been fixed.
[L<GH #18123|https://github.com/Perl/perl5/issues/18123>]
=back
=head1 Configuration and Compilation
=over 4
=item *
Newer 64-bit versions of the Intel C/C++ compiler are now recognized and have
the correct flags set.
=item *
We now trap SIGBUS when F<Configure> checks for C<va_copy>.
On several systems the attempt to determine if we need C<va_copy> or similar
results in a SIGBUS instead of the expected SIGSEGV, which previously caused a
core dump.
[L<GH #18148|https://github.com/Perl/perl5/issues/18148>]
=back
=head1 Testing
Tests were added and changed to reflect the other additions and changes in this
release.
=head1 Platform Support
=head2 Platform-Specific Notes
=over 4
=item MacOS (Darwin)
The hints file for darwin has been updated to handle future macOS versions
beyond 10. Perl can now be built on macOS Big Sur.
[L<GH #17946|https://github.com/Perl/perl5/issues/17946>,
L<GH #18406|https://github.com/Perl/perl5/issues/18406>]
=item Minix
Build errors on Minix have been fixed.
[L<GH #17908|https://github.com/Perl/perl5/issues/17908>]
=back
=head1 Selected Bug Fixes
=over 4
=item *
Some list assignments involving C<undef> on the left-hand side were
over-optimized and produced incorrect results.
[L<GH #16685|https://github.com/Perl/perl5/issues/16685>,
L<GH #17816|https://github.com/Perl/perl5/issues/17816>]
=item *
Fixed a bug in which some regexps with recursive subpatterns matched
incorrectly.
[L<GH #18096|https://github.com/Perl/perl5/issues/18096>]
=item *
Fixed a deadlock that hung the build when Perl is compiled for debugging memory
problems and has PERL_MEM_LOG enabled.
[L<GH #18341|https://github.com/Perl/perl5/issues/18341>]
=item *
Fixed a crash in the use of chained comparison operators when run under "no
warnings 'uninitialized'".
[L<GH #17917|https://github.com/Perl/perl5/issues/17917>,
L<GH #18380|https://github.com/Perl/perl5/issues/18380>]
=item *
Exceptions thrown from destructors during global destruction are no longer
swallowed.
[L<GH #18063|https://github.com/Perl/perl5/issues/18063>]
=back
=head1 Acknowledgements
Perl 5.32.1 represents approximately 7 months of development since Perl 5.32.0
and contains approximately 7,000 lines of changes across 80 files from 23
authors.
Excluding auto-generated files, documentation and release tools, there were
approximately 1,300 lines of changes to 23 .pm, .t, .c and .h files.
Perl continues to flourish into its fourth decade thanks to a vibrant community
of users and developers. The following people are known to have contributed
the improvements that became Perl 5.32.1:
Adam Hartley, Andy Dougherty, Dagfinn Ilmari Mannsåker, Dan Book, David
Mitchell, Graham Knop, Graham Ollis, Hauke D, H.Merijn Brand, Hugo van der
Sanden, John Lightsey, Karen Etheridge, Karl Williamson, Leon Timmermans, Max
Maischein, Nicolas R., Ricardo Signes, Richard Leach, Sawyer X, Sevan Janiyan,
Steve Hay, Tom Hukins, Tony Cook.
The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.
Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.
For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs
If you find what you think is a bug, you might check the perl bug database at
L<https://github.com/Perl/perl5/issues>. There may also be information at
L<http://www.perl.org/>, the Perl Home Page.
If you believe you have an unreported bug, please open an issue at
L<https://github.com/Perl/perl5/issues>. Be sure to trim your bug down to a
tiny but sufficient test case.
If the bug you are reporting has security implications which make it
inappropriate to send to a public issue tracker, then see
L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION> for details of how to
report the issue.
=head1 Give Thanks
If you wish to thank the Perl 5 Porters for the work we had done in Perl 5, you
can do so by running the C<perlthanks> program:
perlthanks
This will send an email to the Perl 5 Porters list with your show of thanks.
=head1 SEE ALSO
The F<Changes> file for an explanation of how to view exhaustive details on
what changed.
The F<INSTALL> file for how to build Perl.
The F<README> file for general stuff.
The F<Artistic> and F<Copying> files for copyright information.
=cut

View File

@@ -0,0 +1,556 @@
=head1 NAME
perldeprecation - list Perl deprecations
=head1 DESCRIPTION
The purpose of this document is to document what has been deprecated
in Perl, and by which version the deprecated feature will disappear,
or, for already removed features, when it was removed.
This document will try to discuss what alternatives for the deprecated
features are available.
The deprecated features will be grouped by the version of Perl in
which they will be removed.
=head2 Perl 5.34
There are no deprecations or fatalizations scheduled for Perl 5.34.
=head2 Perl 5.32
=head3 Constants from lexical variables potentially modified elsewhere
You wrote something like
my $var;
$sub = sub () { $var };
but $var is referenced elsewhere and could be modified after the C<sub>
expression is evaluated. Either it is explicitly modified elsewhere
(C<$var = 3>) or it is passed to a subroutine or to an operator like
C<printf> or C<map>, which may or may not modify the variable.
Traditionally, Perl has captured the value of the variable at that
point and turned the subroutine into a constant eligible for inlining.
In those cases where the variable can be modified elsewhere, this
breaks the behavior of closures, in which the subroutine captures
the variable itself, rather than its value, so future changes to the
variable are reflected in the subroutine's return value.
If you intended for the subroutine to be eligible for inlining, then
make sure the variable is not referenced elsewhere, possibly by
copying it:
my $var2 = $var;
$sub = sub () { $var2 };
If you do want this subroutine to be a closure that reflects future
changes to the variable that it closes over, add an explicit C<return>:
my $var;
$sub = sub () { return $var };
This usage was deprecated and as of Perl 5.32 is no longer allowed.
=head3 Use of strings with code points over 0xFF as arguments to C<vec>
C<vec> views its string argument as a sequence of bits. A string
containing a code point over 0xFF is nonsensical. This usage is
deprecated in Perl 5.28, and was removed in Perl 5.32.
=head3 Use of code points over 0xFF in string bitwise operators
The string bitwise operators, C<&>, C<|>, C<^>, and C<~>, treat their
operands as strings of bytes. As such, values above 0xFF are
nonsensical. Some instances of these have been deprecated since Perl
5.24, and were made fatal in 5.28, but it turns out that in cases where
the wide characters did not affect the end result, no deprecation
notice was raised, and so remain legal. Now, all occurrences either are
fatal or raise a deprecation warning, so that the remaining legal
occurrences became fatal in 5.32.
An example of this is
"" & "\x{100}"
The wide character is not used in the C<&> operation because the left
operand is shorter. This now throws an exception.
=head3 hostname() doesn't accept any arguments
The function C<hostname()> in the L<Sys::Hostname> module has always
been documented to be called with no arguments. Historically it has not
enforced this, and has actually accepted and ignored any arguments. As a
result, some users have got the mistaken impression that an argument does
something useful. To avoid these bugs, the function is being made strict.
Passing arguments was deprecated in Perl 5.28 and became fatal in Perl 5.32.
=head3 Unescaped left braces in regular expressions
The simple rule to remember, if you want to match a literal C<{>
character (U+007B C<LEFT CURLY BRACKET>) in a regular expression
pattern, is to escape each literal instance of it in some way.
Generally easiest is to precede it with a backslash, like C<\{>
or enclose it in square brackets (C<[{]>). If the pattern
delimiters are also braces, any matching right brace (C<}>) should
also be escaped to avoid confusing the parser, for example,
qr{abc\{def\}ghi}
Forcing literal C<{> characters to be escaped will enable the Perl
language to be extended in various ways in future releases. To avoid
needlessly breaking existing code, the restriction is not enforced in
contexts where there are unlikely to ever be extensions that could
conflict with the use there of C<{> as a literal. A non-deprecation
warning that the left brace is being taken literally is raised in
contexts where there could be confusion about it.
Literal uses of C<{> were deprecated in Perl 5.20, and some uses of it
started to give deprecation warnings since. These cases were made fatal
in Perl 5.26. Due to an oversight, not all cases of a use of a literal
C<{> got a deprecation warning. Some cases started warning in Perl 5.26,
and were made fatal in Perl 5.30. Other cases started in Perl 5.28,
and were made fatal in 5.32.
=head3 In XS code, use of various macros dealing with UTF-8.
The macros below now require an extra parameter than in versions prior
to Perl 5.32. The final parameter in each one is a pointer into the
string supplied by the first parameter beyond which the input will not
be read. This prevents potential reading beyond the end of the buffer.
C<isALPHANUMERIC_utf8>,
C<isASCII_utf8>,
C<isBLANK_utf8>,
C<isCNTRL_utf8>,
C<isDIGIT_utf8>,
C<isIDFIRST_utf8>,
C<isPSXSPC_utf8>,
C<isSPACE_utf8>,
C<isVERTWS_utf8>,
C<isWORDCHAR_utf8>,
C<isXDIGIT_utf8>,
C<isALPHANUMERIC_LC_utf8>,
C<isALPHA_LC_utf8>,
C<isASCII_LC_utf8>,
C<isBLANK_LC_utf8>,
C<isCNTRL_LC_utf8>,
C<isDIGIT_LC_utf8>,
C<isGRAPH_LC_utf8>,
C<isIDCONT_LC_utf8>,
C<isIDFIRST_LC_utf8>,
C<isLOWER_LC_utf8>,
C<isPRINT_LC_utf8>,
C<isPSXSPC_LC_utf8>,
C<isPUNCT_LC_utf8>,
C<isSPACE_LC_utf8>,
C<isUPPER_LC_utf8>,
C<isWORDCHAR_LC_utf8>,
C<isXDIGIT_LC_utf8>,
C<toFOLD_utf8>,
C<toLOWER_utf8>,
C<toTITLE_utf8>,
and
C<toUPPER_utf8>.
Since Perl 5.26, this functionality with the extra parameter has been
available by using a corresponding macro to each one of these, and whose
name is formed by appending C<_safe> to the base name. There is no
change to the functionality of those. For example, C<isDIGIT_utf8_safe>
corresponds to C<isDIGIT_utf8>, and both now behave identically. All
are documented in L<perlapi/Character case changing> and
L<perlapi/Character classification>.
This change was originally scheduled for 5.30, but was delayed until
5.32.
=head3 C<< File::Glob::glob() >> was removed
C<< File::Glob >> has a function called C<< glob >>, which just calls
C<< bsd_glob >>.
C<< File::Glob::glob() >> was deprecated in Perl 5.8. A deprecation
message was issued from Perl 5.26 onwards, and the function has now
disappeared in Perl 5.30.
Code using C<< File::Glob::glob() >> should call
C<< File::Glob::bsd_glob() >> instead.
=head2 Perl 5.30
=head3 C<< $* >> is no longer supported
Before Perl 5.10, setting C<< $* >> to a true value globally enabled
multi-line matching within a string. This relique from the past lost
its special meaning in 5.10. Use of this variable will be a fatal error
in Perl 5.30, freeing the variable up for a future special meaning.
To enable multiline matching one should use the C<< /m >> regexp
modifier (possibly in combination with C<< /s >>). This can be set
on a per match bases, or can be enabled per lexical scope (including
a whole file) with C<< use re '/m' >>.
=head3 C<< $# >> is no longer supported
This variable used to have a special meaning -- it could be used
to control how numbers were formatted when printed. This seldom
used functionality was removed in Perl 5.10. In order to free up
the variable for a future special meaning, its use will be a fatal
error in Perl 5.30.
To specify how numbers are formatted when printed, one is advised
to use C<< printf >> or C<< sprintf >> instead.
=head3 Assigning non-zero to C<< $[ >> is fatal
This variable (and the corresponding C<array_base> feature and
L<arybase> module) allowed changing the base for array and string
indexing operations.
Setting this to a non-zero value has been deprecated since Perl 5.12 and
throws a fatal error as of Perl 5.30.
=head3 C<< File::Glob::glob() >> will disappear
C<< File::Glob >> has a function called C<< glob >>, which just calls
C<< bsd_glob >>. However, its prototype is different from the prototype
of C<< CORE::glob >>, and hence, C<< File::Glob::glob >> should not
be used.
C<< File::Glob::glob() >> was deprecated in Perl 5.8. A deprecation
message was issued from Perl 5.26 onwards, and the function will
disappear in Perl 5.30.
Code using C<< File::Glob::glob() >> should call
C<< File::Glob::bsd_glob() >> instead.
=head3 Unescaped left braces in regular expressions (for 5.30)
See L</Unescaped left braces in regular expressions> above.
=head3 Unqualified C<dump()>
Use of C<dump()> instead of C<CORE::dump()> was deprecated in Perl 5.8,
and an unqualified C<dump()> will no longer be available in Perl 5.30.
See L<perlfunc/dump>.
=head3 Using my() in false conditional.
There has been a long-standing bug in Perl that causes a lexical variable
not to be cleared at scope exit when its declaration includes a false
conditional. Some people have exploited this bug to achieve a kind of
static variable. To allow us to fix this bug, people should not be
relying on this behavior.
Instead, it's recommended one uses C<state> variables to achieve the
same effect:
use 5.10.0;
sub count {state $counter; return ++ $counter}
say count (); # Prints 1
say count (); # Prints 2
C<state> variables were introduced in Perl 5.10.
Alternatively, you can achieve a similar static effect by
declaring the variable in a separate block outside the function, e.g.,
sub f { my $x if 0; return $x++ }
becomes
{ my $x; sub f { return $x++ } }
The use of C<my()> in a false conditional has been deprecated in
Perl 5.10, and became a fatal error in Perl 5.30.
=head3 Reading/writing bytes from/to :utf8 handles.
The sysread(), recv(), syswrite() and send() operators are
deprecated on handles that have the C<:utf8> layer, either explicitly, or
implicitly, eg., with the C<:encoding(UTF-16LE)> layer.
Both sysread() and recv() currently use only the C<:utf8> flag for the stream,
ignoring the actual layers. Since sysread() and recv() do no UTF-8
validation they can end up creating invalidly encoded scalars.
Similarly, syswrite() and send() use only the C<:utf8> flag, otherwise ignoring
any layers. If the flag is set, both write the value UTF-8 encoded, even if
the layer is some different encoding, such as the example above.
Ideally, all of these operators would completely ignore the C<:utf8> state,
working only with bytes, but this would result in silently breaking existing
code. To avoid this a future version of perl will throw an exception when
any of sysread(), recv(), syswrite() or send() are called on handle with the
C<:utf8> layer.
In Perl 5.30, it will no longer be possible to use sysread(), recv(),
syswrite() or send() to read or send bytes from/to :utf8 handles.
=head3 Use of unassigned code point or non-standalone grapheme for a delimiter.
A grapheme is what appears to a native-speaker of a language to be a
character. In Unicode (and hence Perl) a grapheme may actually be
several adjacent characters that together form a complete grapheme. For
example, there can be a base character, like "R" and an accent, like a
circumflex "^", that appear to be a single character when displayed,
with the circumflex hovering over the "R".
As of Perl 5.30, use of delimiters which are non-standalone graphemes is
fatal, in order to move the language to be able to accept
multi-character graphemes as delimiters.
Also, as of Perl 5.30, delimiters which are unassigned code points
but that may someday become assigned are prohibited. Otherwise, code
that works today would fail to compile if the currently unassigned
delimiter ends up being something that isn't a stand-alone grapheme.
Because Unicode is never going to assign L<non-character code
points|perlunicode/Noncharacter code points>, nor L<code points that are
above the legal Unicode maximum|perlunicode/Beyond Unicode code
points>, those can be delimiters.
=head2 Perl 5.28
=head3 Attributes C<< :locked >> and C<< :unique >>
The attributes C<< :locked >> (on code references) and C<< :unique >>
(on array, hash and scalar references) have had no effect since
Perl 5.005 and Perl 5.8.8 respectively. Their use has been deprecated
since.
As of Perl 5.28, these attributes are syntax errors. Since the
attributes do not do anything, removing them from your code fixes
the syntax error; and removing them will not influence the behaviour
of your code.
=head3 Bare here-document terminators
Perl has allowed you to use a bare here-document terminator to have the
here-document end at the first empty line. This practise was deprecated
in Perl 5.000; as of Perl 5.28, using a bare here-document terminator
throws a fatal error.
You are encouraged to use the explicitly quoted form if you wish to
use an empty line as the terminator of the here-document:
print <<"";
Print this line.
# Previous blank line ends the here-document.
=head3 Setting $/ to a reference to a non-positive integer
You assigned a reference to a scalar to C<$/> where the
referenced item is not a positive integer. In older perls this B<appeared>
to work the same as setting it to C<undef> but was in fact internally
different, less efficient and with very bad luck could have resulted in
your file being split by a stringified form of the reference.
In Perl 5.20.0 this was changed so that it would be B<exactly> the same as
setting C<$/> to undef, with the exception that this warning would be
thrown.
As of Perl 5.28, setting C<$/> to a reference of a non-positive
integer throws a fatal error.
You are recommended to change your code to set C<$/> to C<undef> explicitly
if you wish to slurp the file.
=head3 Limit on the value of Unicode code points.
Unicode only allows code points up to 0x10FFFF, but Perl allows
much larger ones. Up till Perl 5.28, it was allowed to use code
points exceeding the maximum value of an integer (C<IV_MAX>).
However, that did break the perl interpreter in some constructs,
including causing it to hang in a few cases. The known problem
areas were in C<tr///>, regular expression pattern matching using
quantifiers, as quote delimiters in C<qI<X>...I<X>> (where I<X> is
the C<chr()> of a large code point), and as the upper limits in
loops.
The use of out of range code points was deprecated in Perl 5.24; as of
Perl 5.28 using a code point exceeding C<IV_MAX> throws a fatal error.
If your code is to run on various platforms, keep in mind that the upper
limit depends on the platform. It is much larger on 64-bit word sizes
than 32-bit ones. For 32-bit integers, C<IV_MAX> equals C<0x7FFFFFFF>,
for 64-bit integers, C<IV_MAX> equals C<0x7FFFFFFFFFFFFFFF>.
=head3 Use of comma-less variable list in formats.
It was allowed to use a list of variables in a format, without
separating them with commas. This usage has been deprecated
for a long time, and as of Perl 5.28, this throws a fatal error.
=head3 Use of C<\N{}>
Use of C<\N{}> with nothing between the braces was deprecated in
Perl 5.24, and throws a fatal error as of Perl 5.28.
Since such a construct is equivalent to using an empty string,
you are recommended to remove such C<\N{}> constructs.
=head3 Using the same symbol to open a filehandle and a dirhandle
It used to be legal to use C<open()> to associate both a
filehandle and a dirhandle to the same symbol (glob or scalar).
This idiom is likely to be confusing, and it was deprecated in
Perl 5.10.
Using the same symbol to C<open()> a filehandle and a dirhandle
throws a fatal error as of Perl 5.28.
You should be using two different symbols instead.
=head3 ${^ENCODING} is no longer supported.
The special variable C<${^ENCODING}> was used to implement
the C<encoding> pragma. Setting this variable to anything other
than C<undef> was deprecated in Perl 5.22. Full deprecation
of the variable happened in Perl 5.25.3.
Setting this variable to anything other than an undefined value
throws a fatal error as of Perl 5.28.
=head3 C<< B::OP::terse >>
This method, which just calls C<< B::Concise::b_terse >>, has been
deprecated, and disappeared in Perl 5.28. Please use
C<< B::Concise >> instead.
=head3 Use of inherited AUTOLOAD for non-method %s::%s() is no longer allowed
As an (ahem) accidental feature, C<AUTOLOAD> subroutines were looked
up as methods (using the C<@ISA> hierarchy) even when the subroutines
to be autoloaded were called as plain functions (e.g. C<Foo::bar()>),
not as methods (e.g. C<< Foo->bar() >> or C<< $obj->bar() >>).
This bug was deprecated in Perl 5.004, has been rectified in Perl 5.28
by using method lookup only for methods' C<AUTOLOAD>s.
The simple rule is: Inheritance will not work when autoloading
non-methods. The simple fix for old code is: In any module that used
to depend on inheriting C<AUTOLOAD> for non-methods from a base class
named C<BaseClass>, execute C<*AUTOLOAD = \&BaseClass::AUTOLOAD> during
startup.
In code that currently says C<use AutoLoader; @ISA = qw(AutoLoader);>
you should remove AutoLoader from @ISA and change C<use AutoLoader;> to
C<use AutoLoader 'AUTOLOAD';>.
=head3 Use of code points over 0xFF in string bitwise operators
The string bitwise operators, C<&>, C<|>, C<^>, and C<~>, treat
their operands as strings of bytes. As such, values above 0xFF
are nonsensical. Using such code points with these operators
was deprecated in Perl 5.24, and is fatal as of Perl 5.28.
=head3 In XS code, use of C<to_utf8_case()>
This function has been removed as of Perl 5.28; instead convert to call
the appropriate one of:
L<C<toFOLD_utf8_safe>|perlapi/toFOLD_utf8_safe>.
L<C<toLOWER_utf8_safe>|perlapi/toLOWER_utf8_safe>,
L<C<toTITLE_utf8_safe>|perlapi/toTITLE_utf8_safe>,
or
L<C<toUPPER_utf8_safe>|perlapi/toUPPER_utf8_safe>.
=head2 Perl 5.26
=head3 C<< --libpods >> in C<< Pod::Html >>
Since Perl 5.18, the option C<< --libpods >> has been deprecated, and
using this option did not do anything other than producing a warning.
The C<< --libpods >> option is no longer recognized as of Perl 5.26.
=head3 The utilities C<< c2ph >> and C<< pstruct >>
These old, perl3-era utilities have been deprecated in favour of
C<< h2xs >> for a long time. As of Perl 5.26, they have been removed.
=head3 Trapping C<< $SIG {__DIE__} >> other than during program exit.
The C<$SIG{__DIE__}> hook is called even inside an C<eval()>. It was
never intended to happen this way, but an implementation glitch made
this possible. This used to be deprecated, as it allowed strange action
at a distance like rewriting a pending exception in C<$@>. Plans to
rectify this have been scrapped, as users found that rewriting a
pending exception is actually a useful feature, and not a bug.
Perl never issued a deprecation warning for this; the deprecation
was by documentation policy only. But this deprecation has been
lifted as of Perl 5.26.
=head3 Malformed UTF-8 string in "%s"
This message indicates a bug either in the Perl core or in XS
code. Such code was trying to find out if a character, allegedly
stored internally encoded as UTF-8, was of a given type, such as
being punctuation or a digit. But the character was not encoded
in legal UTF-8. The C<%s> is replaced by a string that can be used
by knowledgeable people to determine what the type being checked
against was.
Passing malformed strings was deprecated in Perl 5.18, and
became fatal in Perl 5.26.
=head2 Perl 5.24
=head3 Use of C<< *glob{FILEHANDLE} >>
The use of C<< *glob{FILEHANDLE} >> was deprecated in Perl 5.8.
The intention was to use C<< *glob{IO} >> instead, for which
C<< *glob{FILEHANDLE} >> is an alias.
However, this feature was undeprecated in Perl 5.24.
=head3 Calling POSIX::%s() is deprecated
The following functions in the C<POSIX> module are no longer available:
C<isalnum>, C<isalpha>, C<iscntrl>, C<isdigit>, C<isgraph>, C<islower>,
C<isprint>, C<ispunct>, C<isspace>, C<isupper>, and C<isxdigit>. The
functions are buggy and don't work on UTF-8 encoded strings. See their
entries in L<POSIX> for more information.
The functions were deprecated in Perl 5.20, and removed in Perl 5.24.
=head2 Perl 5.16
=head3 Use of %s on a handle without * is deprecated
It used to be possible to use C<tie>, C<tied> or C<untie> on a scalar
while the scalar holds a typeglob. This caused its filehandle to be
tied. It left no way to tie the scalar itself when it held a typeglob,
and no way to untie a scalar that had had a typeglob assigned to it.
This was deprecated in Perl 5.14, and the bug was fixed in Perl 5.16.
So now C<tie $scalar> will always tie the scalar, not the handle it holds.
To tie the handle, use C<tie *$scalar> (with an explicit asterisk). The same
applies to C<tied *$scalar> and C<untie *$scalar>.
=head1 SEE ALSO
L<warnings>, L<diagnostics>.
=cut

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,306 @@
=head1 NAME
perldoc - Look up Perl documentation in Pod format.
=head1 SYNOPSIS
perldoc [-h] [-D] [-t] [-u] [-m] [-l] [-U] [-F]
[-i] [-V] [-T] [-r]
[-d destination_file]
[-o formatname]
[-M FormatterClassName]
[-w formatteroption:value]
[-n nroff-replacement]
[-X]
[-L language_code]
PageName|ModuleName|ProgramName|URL
Examples:
perldoc -f BuiltinFunction
perldoc -L it -f BuiltinFunction
perldoc -q FAQ Keyword
perldoc -L fr -q FAQ Keyword
perldoc -v PerlVariable
perldoc -a PerlAPI
See below for more description of the switches.
=head1 DESCRIPTION
B<perldoc> looks up documentation in .pod format that is embedded in the perl
installation tree or in a perl script, and displays it using a variety of
formatters. This is primarily used for the documentation for the perl library
modules.
Your system may also have man pages installed for those modules, in
which case you can probably just use the man(1) command.
If you are looking for a table of contents to the Perl library modules
documentation, see the L<perltoc> page.
=head1 OPTIONS
=over 5
=item B<-h>
Prints out a brief B<h>elp message.
=item B<-D>
B<D>escribes search for the item in B<d>etail.
=item B<-t>
Display docs using plain B<t>ext converter, instead of nroff. This may be faster,
but it probably won't look as nice.
=item B<-u>
Skip the real Pod formatting, and just show the raw Pod source (B<U>nformatted)
=item B<-m> I<module>
Display the entire module: both code and unformatted pod documentation.
This may be useful if the docs don't explain a function in the detail
you need, and you'd like to inspect the code directly; perldoc will find
the file for you and simply hand it off for display.
=item B<-l>
Display onB<l>y the file name of the module found.
=item B<-U>
When running as the superuser, don't attempt drop privileges for security.
This option is implied with B<-F>.
B<NOTE>: Please see the heading SECURITY below for more information.
=item B<-F>
Consider arguments as file names; no search in directories will be performed.
Implies B<-U> if run as the superuser.
=item B<-f> I<perlfunc>
The B<-f> option followed by the name of a perl built-in function will
extract the documentation of this function from L<perlfunc>.
Example:
perldoc -f sprintf
=item B<-q> I<perlfaq-search-regexp>
The B<-q> option takes a regular expression as an argument. It will search
the B<q>uestion headings in perlfaq[1-9] and print the entries matching
the regular expression.
Example:
perldoc -q shuffle
=item B<-a> I<perlapifunc>
The B<-a> option followed by the name of a perl api function will
extract the documentation of this function from L<perlapi>.
Example:
perldoc -a newHV
=item B<-v> I<perlvar>
The B<-v> option followed by the name of a Perl predefined variable will
extract the documentation of this variable from L<perlvar>.
Examples:
perldoc -v '$"'
perldoc -v @+
perldoc -v DATA
=item B<-T>
This specifies that the output is not to be sent to a pager, but is to
be sent directly to STDOUT.
=item B<-d> I<destination-filename>
This specifies that the output is to be sent neither to a pager nor
to STDOUT, but is to be saved to the specified filename. Example:
C<perldoc -oLaTeX -dtextwrapdocs.tex Text::Wrap>
=item B<-o> I<output-formatname>
This specifies that you want Perldoc to try using a Pod-formatting
class for the output format that you specify. For example:
C<-oman>. This is actually just a wrapper around the C<-M> switch;
using C<-oI<formatname>> just looks for a loadable class by adding
that format name (with different capitalizations) to the end of
different classname prefixes.
For example, C<-oLaTeX> currently tries all of the following classes:
Pod::Perldoc::ToLaTeX Pod::Perldoc::Tolatex Pod::Perldoc::ToLatex
Pod::Perldoc::ToLATEX Pod::Simple::LaTeX Pod::Simple::latex
Pod::Simple::Latex Pod::Simple::LATEX Pod::LaTeX Pod::latex Pod::Latex
Pod::LATEX.
=item B<-M> I<module-name>
This specifies the module that you want to try using for formatting the
pod. The class must at least provide a C<parse_from_file> method.
For example: C<perldoc -MPod::Perldoc::ToChecker>.
You can specify several classes to try by joining them with commas
or semicolons, as in C<-MTk::SuperPod;Tk::Pod>.
=item B<-w> I<option:value> or B<-w> I<option>
This specifies an option to call the formatter B<w>ith. For example,
C<-w textsize:15> will call
C<< $formatter->textsize(15) >> on the formatter object before it is
used to format the object. For this to be valid, the formatter class
must provide such a method, and the value you pass should be valid.
(So if C<textsize> expects an integer, and you do C<-w textsize:big>,
expect trouble.)
You can use C<-w optionname> (without a value) as shorthand for
C<-w optionname:I<TRUE>>. This is presumably useful in cases of on/off
features like: C<-w page_numbering>.
You can use an "=" instead of the ":", as in: C<-w textsize=15>. This
might be more (or less) convenient, depending on what shell you use.
=item B<-X>
Use an index if it is present. The B<-X> option looks for an entry
whose basename matches the name given on the command line in the file
C<$Config{archlib}/pod.idx>. The F<pod.idx> file should contain fully
qualified filenames, one per line.
=item B<-L> I<language_code>
This allows one to specify the I<language code> for the desired language
translation. If the C<POD2::E<lt>language_codeE<gt>> package isn't
installed in your system, the switch is ignored.
All available translation packages are to be found under the C<POD2::>
namespace. See L<POD2::IT> (or L<POD2::FR>) to see how to create new
localized C<POD2::*> documentation packages and integrate them into
L<Pod::Perldoc>.
=item B<PageName|ModuleName|ProgramName|URL>
The item you want to look up. Nested modules (such as C<File::Basename>)
are specified either as C<File::Basename> or C<< File/Basename >>. You may also
give a descriptive name of a page, such as C<perlfunc>. For URLs, HTTP and
HTTPS are the only kind currently supported.
For simple names like 'foo', when the normal search fails to find
a matching page, a search with the "perl" prefix is tried as well.
So "perldoc intro" is enough to find/render "perlintro.pod".
=item B<-n> I<some-formatter>
Specify replacement for groff
=item B<-r>
Recursive search.
=item B<-i>
Ignore case.
=item B<-V>
Displays the version of perldoc you're running.
=back
=head1 SECURITY
Because B<perldoc> does not run properly tainted, and is known to
have security issues, when run as the superuser it will attempt to
drop privileges by setting the effective and real IDs to nobody's
or nouser's account, or -2 if unavailable. If it cannot relinquish
its privileges, it will not run.
See the C<-U> option if you do not want this behavior but B<beware>
that there are significant security risks if you choose to use C<-U>.
Since 3.26, using C<-F> as the superuser also implies C<-U> as opening
most files and traversing directories requires privileges that are
above the nobody/nogroup level.
=head1 ENVIRONMENT
Any switches in the C<PERLDOC> environment variable will be used before the
command line arguments.
Useful values for C<PERLDOC> include C<-oterm>, C<-otext>, C<-ortf>,
C<-oxml>, and so on, depending on what modules you have on hand; or
the formatter class may be specified exactly with C<-MPod::Perldoc::ToTerm>
or the like.
C<perldoc> also searches directories
specified by the C<PERL5LIB> (or C<PERLLIB> if C<PERL5LIB> is not
defined) and C<PATH> environment variables.
(The latter is so that embedded pods for executables, such as
C<perldoc> itself, are available.)
In directories where either C<Makefile.PL> or C<Build.PL> exist, C<perldoc>
will add C<.> and C<lib> first to its search path, and as long as you're not
the superuser will add C<blib> too. This is really helpful if you're working
inside of a build directory and want to read through the docs even if you
have a version of a module previously installed.
C<perldoc> will use, in order of preference, the pager defined in
C<PERLDOC_PAGER>, C<MANPAGER>, or C<PAGER> before trying to find a pager
on its own. (C<MANPAGER> is not used if C<perldoc> was told to display
plain text or unformatted pod.)
When using perldoc in it's C<-m> mode (display module source code),
C<perldoc> will attempt to use the pager set in C<PERLDOC_SRC_PAGER>.
A useful setting for this command is your favorite editor as in
C</usr/bin/nano>. (Don't judge me.)
One useful value for C<PERLDOC_PAGER> is C<less -+C -E>.
Having PERLDOCDEBUG set to a positive integer will make perldoc emit
even more descriptive output than the C<-D> switch does; the higher the
number, the more it emits.
=head1 CHANGES
Up to 3.14_05, the switch B<-v> was used to produce verbose
messages of B<perldoc> operation, which is now enabled by B<-D>.
=head1 SEE ALSO
L<perlpod>, L<Pod::Perldoc>
=head1 AUTHOR
Current maintainer: Mark Allen C<< <mallen@cpan.org> >>
Past contributors are:
brian d foy C<< <bdfoy@cpan.org> >>
Adriano R. Ferreira C<< <ferreira@cpan.org> >>,
Sean M. Burke C<< <sburke@cpan.org> >>,
Kenneth Albanowski C<< <kjahds@kjahds.com> >>,
Andy Dougherty C<< <doughera@lafcol.lafayette.edu> >>,
and many others.
=cut

View File

@@ -0,0 +1,331 @@
If you read this file _as_is_, just ignore the funny characters you
see. It is written in the POD format (see perlpod manpage) which is
specially designed to be readable as is.
=head1 NAME
perldos - Perl under DOS, W31, W95.
=head1 SYNOPSIS
These are instructions for building Perl under DOS (or w??), using
DJGPP v2.03 or later. Under w95 long filenames are supported.
=head1 DESCRIPTION
Before you start, you should glance through the README file
found in the top-level directory where the Perl distribution
was extracted. Make sure you read and understand the terms under
which this software is being distributed.
This port currently supports MakeMaker (the set of modules that
is used to build extensions to perl). Therefore, you should be
able to build and install most extensions found in the CPAN sites.
Detailed instructions on how to build and install perl extension
modules, including XS-type modules, is included. See 'BUILDING AND
INSTALLING MODULES'.
=head2 Prerequisites for Compiling Perl on DOS
=over 4
=item DJGPP
DJGPP is a port of GNU C/C++ compiler and development tools to 32-bit,
protected-mode environment on Intel 32-bit CPUs running MS-DOS and compatible
operating systems, by DJ Delorie <dj@delorie.com> and friends.
For more details (FAQ), check out the home of DJGPP at:
http://www.delorie.com/djgpp/
If you have questions about DJGPP, try posting to the DJGPP newsgroup:
comp.os.msdos.djgpp, or use the email gateway djgpp@delorie.com.
You can find the full DJGPP distribution on any of the mirrors listed here:
http://www.delorie.com/djgpp/getting.html
You need the following files to build perl (or add new modules):
v2/djdev203.zip
v2gnu/bnu2112b.zip
v2gnu/gcc2953b.zip
v2gnu/bsh204b.zip
v2gnu/mak3791b.zip
v2gnu/fil40b.zip
v2gnu/sed3028b.zip
v2gnu/txt20b.zip
v2gnu/dif272b.zip
v2gnu/grep24b.zip
v2gnu/shl20jb.zip
v2gnu/gwk306b.zip
v2misc/csdpmi5b.zip
or possibly any newer version.
=item Pthreads
Thread support is not tested in this version of the djgpp perl.
=back
=head2 Shortcomings of Perl under DOS
Perl under DOS lacks some features of perl under UNIX because of
deficiencies in the UNIX-emulation, most notably:
=over 4
=item *
fork() and pipe()
=item *
some features of the UNIX filesystem regarding link count and file dates
=item *
in-place operation is a little bit broken with short filenames
=item *
sockets
=back
=head2 Building Perl on DOS
=over 4
=item *
Unpack the source package F<perl5.8*.tar.gz> with djtarx. If you want
to use long file names under w95 and also to get Perl to pass all its
tests, don't forget to use
set LFN=y
set FNCASE=y
before unpacking the archive.
=item *
Create a "symlink" or copy your bash.exe to sh.exe in your C<($DJDIR)/bin>
directory.
ln -s bash.exe sh.exe
[If you have the recommended version of bash for DJGPP, this is already
done for you.]
And make the C<SHELL> environment variable point to this F<sh.exe>:
set SHELL=c:/djgpp/bin/sh.exe (use full path name!)
You can do this in F<djgpp.env> too. Add this line BEFORE any section
definition:
+SHELL=%DJDIR%/bin/sh.exe
=item *
If you have F<split.exe> and F<gsplit.exe> in your path, then rename
F<split.exe> to F<djsplit.exe>, and F<gsplit.exe> to F<split.exe>.
Copy or link F<gecho.exe> to F<echo.exe> if you don't have F<echo.exe>.
Copy or link F<gawk.exe> to F<awk.exe> if you don't have F<awk.exe>.
[If you have the recommended versions of djdev, shell utilities and
gawk, all these are already done for you, and you will not need to do
anything.]
=item *
Chdir to the djgpp subdirectory of perl toplevel and type the following
commands:
set FNCASE=y
configure.bat
This will do some preprocessing then run the Configure script for you.
The Configure script is interactive, but in most cases you just need to
press ENTER. The "set" command ensures that DJGPP preserves the letter
case of file names when reading directories. If you already issued this
set command when unpacking the archive, and you are in the same DOS
session as when you unpacked the archive, you don't have to issue the
set command again. This command is necessary *before* you start to
(re)configure or (re)build perl in order to ensure both that perl builds
correctly and that building XS-type modules can succeed. See the DJGPP
info entry for "_preserve_fncase" for more information:
info libc alphabetical _preserve_fncase
If the script says that your package is incomplete, and asks whether
to continue, just answer with Y (this can only happen if you don't use
long filenames or forget to issue "set FNCASE=y" first).
When Configure asks about the extensions, I suggest IO and Fcntl,
and if you want database handling then SDBM_File or GDBM_File
(you need to install gdbm for this one). If you want to use the
POSIX extension (this is the default), make sure that the stack
size of your F<cc1.exe> is at least 512kbyte (you can check this
with: C<stubedit cc1.exe>).
You can use the Configure script in non-interactive mode too.
When I built my F<perl.exe>, I used something like this:
configure.bat -des
You can find more info about Configure's command line switches in
the F<INSTALL> file.
When the script ends, and you want to change some values in the
generated F<config.sh> file, then run
sh Configure -S
after you made your modifications.
IMPORTANT: if you use this C<-S> switch, be sure to delete the CONFIG
environment variable before running the script:
set CONFIG=
=item *
Now you can compile Perl. Type:
make
=back
=head2 Testing Perl on DOS
Type:
make test
If you're lucky you should see "All tests successful". But there can be
a few failed subtests (less than 5 hopefully) depending on some external
conditions (e.g. some subtests fail under linux/dosemu or plain dos
with short filenames only).
=head2 Installation of Perl on DOS
Type:
make install
This will copy the newly compiled perl and libraries into your DJGPP
directory structure. Perl.exe and the utilities go into C<($DJDIR)/bin>,
and the library goes under C<($DJDIR)/lib/perl5>. The pod documentation
goes under C<($DJDIR)/lib/perl5/pod>.
=head1 BUILDING AND INSTALLING MODULES ON DOS
=head2 Building Prerequisites for Perl on DOS
For building and installing non-XS modules, all you need is a working
perl under DJGPP. Non-XS modules do not require re-linking the perl
binary, and so are simpler to build and install.
XS-type modules do require re-linking the perl binary, because part of
an XS module is written in "C", and has to be linked together with the
perl binary to be executed. This is required because perl under DJGPP
is built with the "static link" option, due to the lack of "dynamic
linking" in the DJGPP environment.
Because XS modules require re-linking of the perl binary, you need both
the perl binary distribution and the perl source distribution to build
an XS extension module. In addition, you will have to have built your
perl binary from the source distribution so that all of the components
of the perl binary are available for the required link step.
=head2 Unpacking CPAN Modules on DOS
First, download the module package from CPAN (e.g., the "Comma Separated
Value" text package, Text-CSV-0.01.tar.gz). Then expand the contents of
the package into some location on your disk. Most CPAN modules are
built with an internal directory structure, so it is usually safe to
expand it in the root of your DJGPP installation. Some people prefer to
locate source trees under /usr/src (i.e., C<($DJDIR)/usr/src>), but you may
put it wherever seems most logical to you, *EXCEPT* under the same
directory as your perl source code. There are special rules that apply
to modules which live in the perl source tree that do not apply to most
of the modules in CPAN.
Unlike other DJGPP packages, which are normal "zip" files, most CPAN
module packages are "gzipped tarballs". Recent versions of WinZip will
safely unpack and expand them, *UNLESS* they have zero-length files. It
is a known WinZip bug (as of v7.0) that it will not extract zero-length
files.
From the command line, you can use the djtar utility provided with DJGPP
to unpack and expand these files. For example:
C:\djgpp>djtarx -v Text-CSV-0.01.tar.gz
This will create the new directory C<($DJDIR)/Text-CSV-0.01>, filling
it with the source for this module.
=head2 Building Non-XS Modules on DOS
To build a non-XS module, you can use the standard module-building
instructions distributed with perl modules.
perl Makefile.PL
make
make test
make install
This is sufficient because non-XS modules install only ".pm" files and
(sometimes) pod and/or man documentation. No re-linking of the perl
binary is needed to build, install or use non-XS modules.
=head2 Building XS Modules on DOS
To build an XS module, you must use the standard module-building
instructions distributed with perl modules *PLUS* three extra
instructions specific to the DJGPP "static link" build environment.
set FNCASE=y
perl Makefile.PL
make
make perl
make test
make -f Makefile.aperl inst_perl MAP_TARGET=perl.exe
make install
The first extra instruction sets DJGPP's FNCASE environment variable so
that the new perl binary which you must build for an XS-type module will
build correctly. The second extra instruction re-builds the perl binary
in your module directory before you run "make test", so that you are
testing with the new module code you built with "make". The third extra
instruction installs the perl binary from your module directory into the
standard DJGPP binary directory, C<($DJDIR)/bin>, replacing your
previous perl binary.
Note that the MAP_TARGET value *must* have the ".exe" extension or you
will not create a "perl.exe" to replace the one in C<($DJDIR)/bin>.
When you are done, the XS-module install process will have added information
to your "perllocal" information telling that the perl binary has been replaced,
and what module was installed. You can view this information at any time
by using the command:
perl -S perldoc perllocal
=head1 AUTHOR
Laszlo Molnar, F<laszlo.molnar@eth.ericsson.se> [Installing/building perl]
Peter J. Farley III F<pjfarley@banet.net> [Building/installing modules]
=head1 SEE ALSO
perl(1).
=cut

View File

@@ -0,0 +1,844 @@
=head1 NAME
X<data structure> X<complex data structure> X<struct>
perldsc - Perl Data Structures Cookbook
=head1 DESCRIPTION
Perl lets us have complex data structures. You can write something like
this and all of a sudden, you'd have an array with three dimensions!
for my $x (1 .. 10) {
for my $y (1 .. 10) {
for my $z (1 .. 10) {
$AoA[$x][$y][$z] =
$x ** $y + $z;
}
}
}
Alas, however simple this may appear, underneath it's a much more
elaborate construct than meets the eye!
How do you print it out? Why can't you say just C<print @AoA>? How do
you sort it? How can you pass it to a function or get one of these back
from a function? Is it an object? Can you save it to disk to read
back later? How do you access whole rows or columns of that matrix? Do
all the values have to be numeric?
As you see, it's quite easy to become confused. While some small portion
of the blame for this can be attributed to the reference-based
implementation, it's really more due to a lack of existing documentation with
examples designed for the beginner.
This document is meant to be a detailed but understandable treatment of the
many different sorts of data structures you might want to develop. It
should also serve as a cookbook of examples. That way, when you need to
create one of these complex data structures, you can just pinch, pilfer, or
purloin a drop-in example from here.
Let's look at each of these possible constructs in detail. There are separate
sections on each of the following:
=over 5
=item * arrays of arrays
=item * hashes of arrays
=item * arrays of hashes
=item * hashes of hashes
=item * more elaborate constructs
=back
But for now, let's look at general issues common to all
these types of data structures.
=head1 REFERENCES
X<reference> X<dereference> X<dereferencing> X<pointer>
The most important thing to understand about all data structures in
Perl--including multidimensional arrays--is that even though they might
appear otherwise, Perl C<@ARRAY>s and C<%HASH>es are all internally
one-dimensional. They can hold only scalar values (meaning a string,
number, or a reference). They cannot directly contain other arrays or
hashes, but instead contain I<references> to other arrays or hashes.
X<multidimensional array> X<array, multidimensional>
You can't use a reference to an array or hash in quite the same way that you
would a real array or hash. For C or C++ programmers unused to
distinguishing between arrays and pointers to the same, this can be
confusing. If so, just think of it as the difference between a structure
and a pointer to a structure.
You can (and should) read more about references in L<perlref>.
Briefly, references are rather like pointers that know what they
point to. (Objects are also a kind of reference, but we won't be needing
them right away--if ever.) This means that when you have something which
looks to you like an access to a two-or-more-dimensional array and/or hash,
what's really going on is that the base type is
merely a one-dimensional entity that contains references to the next
level. It's just that you can I<use> it as though it were a
two-dimensional one. This is actually the way almost all C
multidimensional arrays work as well.
$array[7][12] # array of arrays
$array[7]{string} # array of hashes
$hash{string}[7] # hash of arrays
$hash{string}{'another string'} # hash of hashes
Now, because the top level contains only references, if you try to print
out your array in with a simple print() function, you'll get something
that doesn't look very nice, like this:
my @AoA = ( [2, 3], [4, 5, 7], [0] );
print $AoA[1][2];
7
print @AoA;
ARRAY(0x83c38)ARRAY(0x8b194)ARRAY(0x8b1d0)
That's because Perl doesn't (ever) implicitly dereference your variables.
If you want to get at the thing a reference is referring to, then you have
to do this yourself using either prefix typing indicators, like
C<${$blah}>, C<@{$blah}>, C<@{$blah[$i]}>, or else postfix pointer arrows,
like C<$a-E<gt>[3]>, C<$h-E<gt>{fred}>, or even C<$ob-E<gt>method()-E<gt>[3]>.
=head1 COMMON MISTAKES
The two most common mistakes made in constructing something like
an array of arrays is either accidentally counting the number of
elements or else taking a reference to the same memory location
repeatedly. Here's the case where you just get the count instead
of a nested array:
for my $i (1..10) {
my @array = somefunc($i);
$AoA[$i] = @array; # WRONG!
}
That's just the simple case of assigning an array to a scalar and getting
its element count. If that's what you really and truly want, then you
might do well to consider being a tad more explicit about it, like this:
for my $i (1..10) {
my @array = somefunc($i);
$counts[$i] = scalar @array;
}
Here's the case of taking a reference to the same memory location
again and again:
# Either without strict or having an outer-scope my @array;
# declaration.
for my $i (1..10) {
@array = somefunc($i);
$AoA[$i] = \@array; # WRONG!
}
So, what's the big problem with that? It looks right, doesn't it?
After all, I just told you that you need an array of references, so by
golly, you've made me one!
Unfortunately, while this is true, it's still broken. All the references
in @AoA refer to the I<very same place>, and they will therefore all hold
whatever was last in @array! It's similar to the problem demonstrated in
the following C program:
#include <pwd.h>
main() {
struct passwd *getpwnam(), *rp, *dp;
rp = getpwnam("root");
dp = getpwnam("daemon");
printf("daemon name is %s\nroot name is %s\n",
dp->pw_name, rp->pw_name);
}
Which will print
daemon name is daemon
root name is daemon
The problem is that both C<rp> and C<dp> are pointers to the same location
in memory! In C, you'd have to remember to malloc() yourself some new
memory. In Perl, you'll want to use the array constructor C<[]> or the
hash constructor C<{}> instead. Here's the right way to do the preceding
broken code fragments:
X<[]> X<{}>
# Either without strict or having an outer-scope my @array;
# declaration.
for my $i (1..10) {
@array = somefunc($i);
$AoA[$i] = [ @array ];
}
The square brackets make a reference to a new array with a I<copy>
of what's in @array at the time of the assignment. This is what
you want.
Note that this will produce something similar, but it's
much harder to read:
# Either without strict or having an outer-scope my @array;
# declaration.
for my $i (1..10) {
@array = 0 .. $i;
@{$AoA[$i]} = @array;
}
Is it the same? Well, maybe so--and maybe not. The subtle difference
is that when you assign something in square brackets, you know for sure
it's always a brand new reference with a new I<copy> of the data.
Something else could be going on in this new case with the C<@{$AoA[$i]}>
dereference on the left-hand-side of the assignment. It all depends on
whether C<$AoA[$i]> had been undefined to start with, or whether it
already contained a reference. If you had already populated @AoA with
references, as in
$AoA[3] = \@another_array;
Then the assignment with the indirection on the left-hand-side would
use the existing reference that was already there:
@{$AoA[3]} = @array;
Of course, this I<would> have the "interesting" effect of clobbering
@another_array. (Have you ever noticed how when a programmer says
something is "interesting", that rather than meaning "intriguing",
they're disturbingly more apt to mean that it's "annoying",
"difficult", or both? :-)
So just remember always to use the array or hash constructors with C<[]>
or C<{}>, and you'll be fine, although it's not always optimally
efficient.
Surprisingly, the following dangerous-looking construct will
actually work out fine:
for my $i (1..10) {
my @array = somefunc($i);
$AoA[$i] = \@array;
}
That's because my() is more of a run-time statement than it is a
compile-time declaration I<per se>. This means that the my() variable is
remade afresh each time through the loop. So even though it I<looks> as
though you stored the same variable reference each time, you actually did
not! This is a subtle distinction that can produce more efficient code at
the risk of misleading all but the most experienced of programmers. So I
usually advise against teaching it to beginners. In fact, except for
passing arguments to functions, I seldom like to see the gimme-a-reference
operator (backslash) used much at all in code. Instead, I advise
beginners that they (and most of the rest of us) should try to use the
much more easily understood constructors C<[]> and C<{}> instead of
relying upon lexical (or dynamic) scoping and hidden reference-counting to
do the right thing behind the scenes.
In summary:
$AoA[$i] = [ @array ]; # usually best
$AoA[$i] = \@array; # perilous; just how my() was that array?
@{ $AoA[$i] } = @array; # way too tricky for most programmers
=head1 CAVEAT ON PRECEDENCE
X<dereference, precedence> X<dereferencing, precedence>
Speaking of things like C<@{$AoA[$i]}>, the following are actually the
same thing:
X<< -> >>
$aref->[2][2] # clear
$$aref[2][2] # confusing
That's because Perl's precedence rules on its five prefix dereferencers
(which look like someone swearing: C<$ @ * % &>) make them bind more
tightly than the postfix subscripting brackets or braces! This will no
doubt come as a great shock to the C or C++ programmer, who is quite
accustomed to using C<*a[i]> to mean what's pointed to by the I<i'th>
element of C<a>. That is, they first take the subscript, and only then
dereference the thing at that subscript. That's fine in C, but this isn't C.
The seemingly equivalent construct in Perl, C<$$aref[$i]> first does
the deref of $aref, making it take $aref as a reference to an
array, and then dereference that, and finally tell you the I<i'th> value
of the array pointed to by $AoA. If you wanted the C notion, you'd have to
write C<${$AoA[$i]}> to force the C<$AoA[$i]> to get evaluated first
before the leading C<$> dereferencer.
=head1 WHY YOU SHOULD ALWAYS C<use strict>
If this is starting to sound scarier than it's worth, relax. Perl has
some features to help you avoid its most common pitfalls. The best
way to avoid getting confused is to start every program like this:
#!/usr/bin/perl -w
use strict;
This way, you'll be forced to declare all your variables with my() and
also disallow accidental "symbolic dereferencing". Therefore if you'd done
this:
my $aref = [
[ "fred", "barney", "pebbles", "bambam", "dino", ],
[ "homer", "bart", "marge", "maggie", ],
[ "george", "jane", "elroy", "judy", ],
];
print $aref[2][2];
The compiler would immediately flag that as an error I<at compile time>,
because you were accidentally accessing C<@aref>, an undeclared
variable, and it would thereby remind you to write instead:
print $aref->[2][2]
=head1 DEBUGGING
X<data structure, debugging> X<complex data structure, debugging>
X<AoA, debugging> X<HoA, debugging> X<AoH, debugging> X<HoH, debugging>
X<array of arrays, debugging> X<hash of arrays, debugging>
X<array of hashes, debugging> X<hash of hashes, debugging>
You can use the debugger's C<x> command to dump out complex data structures.
For example, given the assignment to $AoA above, here's the debugger output:
DB<1> x $AoA
$AoA = ARRAY(0x13b5a0)
0 ARRAY(0x1f0a24)
0 'fred'
1 'barney'
2 'pebbles'
3 'bambam'
4 'dino'
1 ARRAY(0x13b558)
0 'homer'
1 'bart'
2 'marge'
3 'maggie'
2 ARRAY(0x13b540)
0 'george'
1 'jane'
2 'elroy'
3 'judy'
=head1 CODE EXAMPLES
Presented with little comment (these will get their own manpages someday)
here are short code examples illustrating access of various
types of data structures.
=head1 ARRAYS OF ARRAYS
X<array of arrays> X<AoA>
=head2 Declaration of an ARRAY OF ARRAYS
@AoA = (
[ "fred", "barney" ],
[ "george", "jane", "elroy" ],
[ "homer", "marge", "bart" ],
);
=head2 Generation of an ARRAY OF ARRAYS
# reading from file
while ( <> ) {
push @AoA, [ split ];
}
# calling a function
for $i ( 1 .. 10 ) {
$AoA[$i] = [ somefunc($i) ];
}
# using temp vars
for $i ( 1 .. 10 ) {
@tmp = somefunc($i);
$AoA[$i] = [ @tmp ];
}
# add to an existing row
push @{ $AoA[0] }, "wilma", "betty";
=head2 Access and Printing of an ARRAY OF ARRAYS
# one element
$AoA[0][0] = "Fred";
# another element
$AoA[1][1] =~ s/(\w)/\u$1/;
# print the whole thing with refs
for $aref ( @AoA ) {
print "\t [ @$aref ],\n";
}
# print the whole thing with indices
for $i ( 0 .. $#AoA ) {
print "\t [ @{$AoA[$i]} ],\n";
}
# print the whole thing one at a time
for $i ( 0 .. $#AoA ) {
for $j ( 0 .. $#{ $AoA[$i] } ) {
print "elt $i $j is $AoA[$i][$j]\n";
}
}
=head1 HASHES OF ARRAYS
X<hash of arrays> X<HoA>
=head2 Declaration of a HASH OF ARRAYS
%HoA = (
flintstones => [ "fred", "barney" ],
jetsons => [ "george", "jane", "elroy" ],
simpsons => [ "homer", "marge", "bart" ],
);
=head2 Generation of a HASH OF ARRAYS
# reading from file
# flintstones: fred barney wilma dino
while ( <> ) {
next unless s/^(.*?):\s*//;
$HoA{$1} = [ split ];
}
# reading from file; more temps
# flintstones: fred barney wilma dino
while ( $line = <> ) {
($who, $rest) = split /:\s*/, $line, 2;
@fields = split ' ', $rest;
$HoA{$who} = [ @fields ];
}
# calling a function that returns a list
for $group ( "simpsons", "jetsons", "flintstones" ) {
$HoA{$group} = [ get_family($group) ];
}
# likewise, but using temps
for $group ( "simpsons", "jetsons", "flintstones" ) {
@members = get_family($group);
$HoA{$group} = [ @members ];
}
# append new members to an existing family
push @{ $HoA{"flintstones"} }, "wilma", "betty";
=head2 Access and Printing of a HASH OF ARRAYS
# one element
$HoA{flintstones}[0] = "Fred";
# another element
$HoA{simpsons}[1] =~ s/(\w)/\u$1/;
# print the whole thing
foreach $family ( keys %HoA ) {
print "$family: @{ $HoA{$family} }\n"
}
# print the whole thing with indices
foreach $family ( keys %HoA ) {
print "family: ";
foreach $i ( 0 .. $#{ $HoA{$family} } ) {
print " $i = $HoA{$family}[$i]";
}
print "\n";
}
# print the whole thing sorted by number of members
foreach $family ( sort { @{$HoA{$b}} <=> @{$HoA{$a}} } keys %HoA ) {
print "$family: @{ $HoA{$family} }\n"
}
# print the whole thing sorted by number of members and name
foreach $family ( sort {
@{$HoA{$b}} <=> @{$HoA{$a}}
||
$a cmp $b
} keys %HoA )
{
print "$family: ", join(", ", sort @{ $HoA{$family} }), "\n";
}
=head1 ARRAYS OF HASHES
X<array of hashes> X<AoH>
=head2 Declaration of an ARRAY OF HASHES
@AoH = (
{
Lead => "fred",
Friend => "barney",
},
{
Lead => "george",
Wife => "jane",
Son => "elroy",
},
{
Lead => "homer",
Wife => "marge",
Son => "bart",
}
);
=head2 Generation of an ARRAY OF HASHES
# reading from file
# format: LEAD=fred FRIEND=barney
while ( <> ) {
$rec = {};
for $field ( split ) {
($key, $value) = split /=/, $field;
$rec->{$key} = $value;
}
push @AoH, $rec;
}
# reading from file
# format: LEAD=fred FRIEND=barney
# no temp
while ( <> ) {
push @AoH, { split /[\s+=]/ };
}
# calling a function that returns a key/value pair list, like
# "lead","fred","daughter","pebbles"
while ( %fields = getnextpairset() ) {
push @AoH, { %fields };
}
# likewise, but using no temp vars
while (<>) {
push @AoH, { parsepairs($_) };
}
# add key/value to an element
$AoH[0]{pet} = "dino";
$AoH[2]{pet} = "santa's little helper";
=head2 Access and Printing of an ARRAY OF HASHES
# one element
$AoH[0]{lead} = "fred";
# another element
$AoH[1]{lead} =~ s/(\w)/\u$1/;
# print the whole thing with refs
for $href ( @AoH ) {
print "{ ";
for $role ( keys %$href ) {
print "$role=$href->{$role} ";
}
print "}\n";
}
# print the whole thing with indices
for $i ( 0 .. $#AoH ) {
print "$i is { ";
for $role ( keys %{ $AoH[$i] } ) {
print "$role=$AoH[$i]{$role} ";
}
print "}\n";
}
# print the whole thing one at a time
for $i ( 0 .. $#AoH ) {
for $role ( keys %{ $AoH[$i] } ) {
print "elt $i $role is $AoH[$i]{$role}\n";
}
}
=head1 HASHES OF HASHES
X<hash of hashes> X<HoH>
=head2 Declaration of a HASH OF HASHES
%HoH = (
flintstones => {
lead => "fred",
pal => "barney",
},
jetsons => {
lead => "george",
wife => "jane",
"his boy" => "elroy",
},
simpsons => {
lead => "homer",
wife => "marge",
kid => "bart",
},
);
=head2 Generation of a HASH OF HASHES
# reading from file
# flintstones: lead=fred pal=barney wife=wilma pet=dino
while ( <> ) {
next unless s/^(.*?):\s*//;
$who = $1;
for $field ( split ) {
($key, $value) = split /=/, $field;
$HoH{$who}{$key} = $value;
}
# reading from file; more temps
while ( <> ) {
next unless s/^(.*?):\s*//;
$who = $1;
$rec = {};
$HoH{$who} = $rec;
for $field ( split ) {
($key, $value) = split /=/, $field;
$rec->{$key} = $value;
}
}
# calling a function that returns a key,value hash
for $group ( "simpsons", "jetsons", "flintstones" ) {
$HoH{$group} = { get_family($group) };
}
# likewise, but using temps
for $group ( "simpsons", "jetsons", "flintstones" ) {
%members = get_family($group);
$HoH{$group} = { %members };
}
# append new members to an existing family
%new_folks = (
wife => "wilma",
pet => "dino",
);
for $what (keys %new_folks) {
$HoH{flintstones}{$what} = $new_folks{$what};
}
=head2 Access and Printing of a HASH OF HASHES
# one element
$HoH{flintstones}{wife} = "wilma";
# another element
$HoH{simpsons}{lead} =~ s/(\w)/\u$1/;
# print the whole thing
foreach $family ( keys %HoH ) {
print "$family: { ";
for $role ( keys %{ $HoH{$family} } ) {
print "$role=$HoH{$family}{$role} ";
}
print "}\n";
}
# print the whole thing somewhat sorted
foreach $family ( sort keys %HoH ) {
print "$family: { ";
for $role ( sort keys %{ $HoH{$family} } ) {
print "$role=$HoH{$family}{$role} ";
}
print "}\n";
}
# print the whole thing sorted by number of members
foreach $family ( sort { keys %{$HoH{$b}} <=> keys %{$HoH{$a}} }
keys %HoH )
{
print "$family: { ";
for $role ( sort keys %{ $HoH{$family} } ) {
print "$role=$HoH{$family}{$role} ";
}
print "}\n";
}
# establish a sort order (rank) for each role
$i = 0;
for ( qw(lead wife son daughter pal pet) ) { $rank{$_} = ++$i }
# now print the whole thing sorted by number of members
foreach $family ( sort { keys %{ $HoH{$b} } <=> keys %{ $HoH{$a} } }
keys %HoH )
{
print "$family: { ";
# and print these according to rank order
for $role ( sort { $rank{$a} <=> $rank{$b} }
keys %{ $HoH{$family} } )
{
print "$role=$HoH{$family}{$role} ";
}
print "}\n";
}
=head1 MORE ELABORATE RECORDS
X<record> X<structure> X<struct>
=head2 Declaration of MORE ELABORATE RECORDS
Here's a sample showing how to create and use a record whose fields are of
many different sorts:
$rec = {
TEXT => $string,
SEQUENCE => [ @old_values ],
LOOKUP => { %some_table },
THATCODE => \&some_function,
THISCODE => sub { $_[0] ** $_[1] },
HANDLE => \*STDOUT,
};
print $rec->{TEXT};
print $rec->{SEQUENCE}[0];
$last = pop @ { $rec->{SEQUENCE} };
print $rec->{LOOKUP}{"key"};
($first_k, $first_v) = each %{ $rec->{LOOKUP} };
$answer = $rec->{THATCODE}->($arg);
$answer = $rec->{THISCODE}->($arg1, $arg2);
# careful of extra block braces on fh ref
print { $rec->{HANDLE} } "a string\n";
use FileHandle;
$rec->{HANDLE}->autoflush(1);
$rec->{HANDLE}->print(" a string\n");
=head2 Declaration of a HASH OF COMPLEX RECORDS
%TV = (
flintstones => {
series => "flintstones",
nights => [ qw(monday thursday friday) ],
members => [
{ name => "fred", role => "lead", age => 36, },
{ name => "wilma", role => "wife", age => 31, },
{ name => "pebbles", role => "kid", age => 4, },
],
},
jetsons => {
series => "jetsons",
nights => [ qw(wednesday saturday) ],
members => [
{ name => "george", role => "lead", age => 41, },
{ name => "jane", role => "wife", age => 39, },
{ name => "elroy", role => "kid", age => 9, },
],
},
simpsons => {
series => "simpsons",
nights => [ qw(monday) ],
members => [
{ name => "homer", role => "lead", age => 34, },
{ name => "marge", role => "wife", age => 37, },
{ name => "bart", role => "kid", age => 11, },
],
},
);
=head2 Generation of a HASH OF COMPLEX RECORDS
# reading from file
# this is most easily done by having the file itself be
# in the raw data format as shown above. perl is happy
# to parse complex data structures if declared as data, so
# sometimes it's easiest to do that
# here's a piece by piece build up
$rec = {};
$rec->{series} = "flintstones";
$rec->{nights} = [ find_days() ];
@members = ();
# assume this file in field=value syntax
while (<>) {
%fields = split /[\s=]+/;
push @members, { %fields };
}
$rec->{members} = [ @members ];
# now remember the whole thing
$TV{ $rec->{series} } = $rec;
###########################################################
# now, you might want to make interesting extra fields that
# include pointers back into the same data structure so if
# change one piece, it changes everywhere, like for example
# if you wanted a {kids} field that was a reference
# to an array of the kids' records without having duplicate
# records and thus update problems.
###########################################################
foreach $family (keys %TV) {
$rec = $TV{$family}; # temp pointer
@kids = ();
for $person ( @{ $rec->{members} } ) {
if ($person->{role} =~ /kid|son|daughter/) {
push @kids, $person;
}
}
# REMEMBER: $rec and $TV{$family} point to same data!!
$rec->{kids} = [ @kids ];
}
# you copied the array, but the array itself contains pointers
# to uncopied objects. this means that if you make bart get
# older via
$TV{simpsons}{kids}[0]{age}++;
# then this would also change in
print $TV{simpsons}{members}[2]{age};
# because $TV{simpsons}{kids}[0] and $TV{simpsons}{members}[2]
# both point to the same underlying anonymous hash table
# print the whole thing
foreach $family ( keys %TV ) {
print "the $family";
print " is on during @{ $TV{$family}{nights} }\n";
print "its members are:\n";
for $who ( @{ $TV{$family}{members} } ) {
print " $who->{name} ($who->{role}), age $who->{age}\n";
}
print "it turns out that $TV{$family}{lead} has ";
print scalar ( @{ $TV{$family}{kids} } ), " kids named ";
print join (", ", map { $_->{name} } @{ $TV{$family}{kids} } );
print "\n";
}
=head1 Database Ties
You cannot easily tie a multilevel data structure (such as a hash of
hashes) to a dbm file. The first problem is that all but GDBM and
Berkeley DB have size limitations, but beyond that, you also have problems
with how references are to be represented on disk. One experimental
module that does partially attempt to address this need is the MLDBM
module. Check your nearest CPAN site as described in L<perlmodlib> for
source code to MLDBM.
=head1 SEE ALSO
L<perlref>, L<perllol>, L<perldata>, L<perlobj>
=head1 AUTHOR
Tom Christiansen <F<tchrist@perl.com>>

View File

@@ -0,0 +1,236 @@
=head1 NAME
perldtrace - Perl's support for DTrace
=head1 SYNOPSIS
# dtrace -Zn 'perl::sub-entry, perl::sub-return { trace(copyinstr(arg0)) }'
dtrace: description 'perl::sub-entry, perl::sub-return ' matched 10 probes
# perl -E 'sub outer { inner(@_) } sub inner { say shift } outer("hello")'
hello
(dtrace output)
CPU ID FUNCTION:NAME
0 75915 Perl_pp_entersub:sub-entry BEGIN
0 75915 Perl_pp_entersub:sub-entry import
0 75922 Perl_pp_leavesub:sub-return import
0 75922 Perl_pp_leavesub:sub-return BEGIN
0 75915 Perl_pp_entersub:sub-entry outer
0 75915 Perl_pp_entersub:sub-entry inner
0 75922 Perl_pp_leavesub:sub-return inner
0 75922 Perl_pp_leavesub:sub-return outer
=head1 DESCRIPTION
DTrace is a framework for comprehensive system- and application-level
tracing. Perl is a DTrace I<provider>, meaning it exposes several
I<probes> for instrumentation. You can use these in conjunction
with kernel-level probes, as well as probes from other providers
such as MySQL, in order to diagnose software defects, or even just
your application's bottlenecks.
Perl must be compiled with the C<-Dusedtrace> option in order to
make use of the provided probes. While DTrace aims to have no
overhead when its instrumentation is not active, Perl's support
itself cannot uphold that guarantee, so it is built without DTrace
probes under most systems. One notable exception is that Mac OS X
ships a F</usr/bin/perl> with DTrace support enabled.
=head1 HISTORY
=over 4
=item 5.10.1
Perl's initial DTrace support was added, providing C<sub-entry> and
C<sub-return> probes.
=item 5.14.0
The C<sub-entry> and C<sub-return> probes gain a fourth argument: the
package name of the function.
=item 5.16.0
The C<phase-change> probe was added.
=item 5.18.0
The C<op-entry>, C<loading-file>, and C<loaded-file> probes were added.
=back
=head1 PROBES
=over 4
=item sub-entry(SUBNAME, FILE, LINE, PACKAGE)
Traces the entry of any subroutine. Note that all of the variables
refer to the subroutine that is being invoked; there is currently
no way to get ahold of any information about the subroutine's
I<caller> from a DTrace action.
:*perl*::sub-entry {
printf("%s::%s entered at %s line %d\n",
copyinstr(arg3), copyinstr(arg0), copyinstr(arg1), arg2);
}
=item sub-return(SUBNAME, FILE, LINE, PACKAGE)
Traces the exit of any subroutine. Note that all of the variables
refer to the subroutine that is returning; there is currently no
way to get ahold of any information about the subroutine's I<caller>
from a DTrace action.
:*perl*::sub-return {
printf("%s::%s returned at %s line %d\n",
copyinstr(arg3), copyinstr(arg0), copyinstr(arg1), arg2);
}
=item phase-change(NEWPHASE, OLDPHASE)
Traces changes to Perl's interpreter state. You can internalize this
as tracing changes to Perl's C<${^GLOBAL_PHASE}> variable, especially
since the values for C<NEWPHASE> and C<OLDPHASE> are the strings that
C<${^GLOBAL_PHASE}> reports.
:*perl*::phase-change {
printf("Phase changed from %s to %s\n",
copyinstr(arg1), copyinstr(arg0));
}
=item op-entry(OPNAME)
Traces the execution of each opcode in the Perl runloop. This probe
is fired before the opcode is executed. When the Perl debugger is
enabled, the DTrace probe is fired I<after> the debugger hooks (but
still before the opcode itself is executed).
:*perl*::op-entry {
printf("About to execute opcode %s\n", copyinstr(arg0));
}
=item loading-file(FILENAME)
Fires when Perl is about to load an individual file, whether from
C<use>, C<require>, or C<do>. This probe fires before the file is
read from disk. The filename argument is converted to local filesystem
paths instead of providing C<Module::Name>-style names.
:*perl*:loading-file {
printf("About to load %s\n", copyinstr(arg0));
}
=item loaded-file(FILENAME)
Fires when Perl has successfully loaded an individual file, whether
from C<use>, C<require>, or C<do>. This probe fires after the file
is read from disk and its contents evaluated. The filename argument
is converted to local filesystem paths instead of providing
C<Module::Name>-style names.
:*perl*:loaded-file {
printf("Successfully loaded %s\n", copyinstr(arg0));
}
=back
=head1 EXAMPLES
=over 4
=item Most frequently called functions
# dtrace -qZn 'sub-entry { @[strjoin(strjoin(copyinstr(arg3),"::"),copyinstr(arg0))] = count() } END {trunc(@, 10)}'
Class::MOP::Attribute::slots 400
Try::Tiny::catch 411
Try::Tiny::try 411
Class::MOP::Instance::inline_slot_access 451
Class::MOP::Class::Immutable::Trait:::around 472
Class::MOP::Mixin::AttributeCore::has_initializer 496
Class::MOP::Method::Wrapped::__ANON__ 544
Class::MOP::Package::_package_stash 737
Class::MOP::Class::initialize 1128
Class::MOP::get_metaclass_by_name 1204
=item Trace function calls
# dtrace -qFZn 'sub-entry, sub-return { trace(copyinstr(arg0)) }'
0 -> Perl_pp_entersub BEGIN
0 <- Perl_pp_leavesub BEGIN
0 -> Perl_pp_entersub BEGIN
0 -> Perl_pp_entersub import
0 <- Perl_pp_leavesub import
0 <- Perl_pp_leavesub BEGIN
0 -> Perl_pp_entersub BEGIN
0 -> Perl_pp_entersub dress
0 <- Perl_pp_leavesub dress
0 -> Perl_pp_entersub dirty
0 <- Perl_pp_leavesub dirty
0 -> Perl_pp_entersub whiten
0 <- Perl_pp_leavesub whiten
0 <- Perl_dounwind BEGIN
=item Function calls during interpreter cleanup
# dtrace -Zn 'phase-change /copyinstr(arg0) == "END"/ { self->ending = 1 } sub-entry /self->ending/ { trace(copyinstr(arg0)) }'
CPU ID FUNCTION:NAME
1 77214 Perl_pp_entersub:sub-entry END
1 77214 Perl_pp_entersub:sub-entry END
1 77214 Perl_pp_entersub:sub-entry cleanup
1 77214 Perl_pp_entersub:sub-entry _force_writable
1 77214 Perl_pp_entersub:sub-entry _force_writable
=item System calls at compile time
# dtrace -qZn 'phase-change /copyinstr(arg0) == "START"/ { self->interesting = 1 } phase-change /copyinstr(arg0) == "RUN"/ { self->interesting = 0 } syscall::: /self->interesting/ { @[probefunc] = count() } END { trunc(@, 3) }'
lseek 310
read 374
stat64 1056
=item Perl functions that execute the most opcodes
# dtrace -qZn 'sub-entry { self->fqn = strjoin(copyinstr(arg3), strjoin("::", copyinstr(arg0))) } op-entry /self->fqn != ""/ { @[self->fqn] = count() } END { trunc(@, 3) }'
warnings::unimport 4589
Exporter::Heavy::_rebuild_cache 5039
Exporter::import 14578
=back
=head1 REFERENCES
=over 4
=item DTrace Dynamic Tracing Guide
L<http://dtrace.org/guide/preface.html>
=item DTrace: Dynamic Tracing in Oracle Solaris, Mac OS X and FreeBSD
L<https://www.amazon.com/DTrace-Dynamic-Tracing-Solaris-FreeBSD/dp/0132091518/>
=back
=head1 SEE ALSO
=over 4
=item L<Devel::DTrace::Provider>
This CPAN module lets you create application-level DTrace probes written in
Perl.
=back
=head1 AUTHORS
Shawn M Moore C<sartak@gmail.com>
=cut

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,367 @@
=head1 NAME
perlexperiment - A listing of experimental features in Perl
=head1 DESCRIPTION
This document lists the current and past experimental features in the perl
core. Although all of these are documented with their appropriate topics,
this succinct listing gives you an overview and basic facts about their
status.
So far we've merely tried to find and list the experimental features and infer
their inception, versions, etc. There's a lot of speculation here.
=head2 Current experiments
=over 8
=item Smart match (C<~~>)
Introduced in Perl 5.10.0
Modified in Perl 5.10.1, 5.12.0
Using this feature triggers warnings in the category
C<experimental::smartmatch>.
The ticket for this feature is
L<[perl #13173]|https://github.com/Perl/perl5/issues/13173>.
=item Pluggable keywords
The ticket for this feature is
L<[perl #13199]|https://github.com/Perl/perl5/issues/13199>.
See L<perlapi/PL_keyword_plugin> for the mechanism.
Introduced in Perl 5.11.2
=item Regular Expression Set Operations
Introduced in Perl 5.18
The ticket for this feature is
L<[perl #13197]|https://github.com/Perl/perl5/issues/13197>.
See also: L<perlrecharclass/Extended Bracketed Character Classes>
Using this feature triggers warnings in the category
C<experimental::regex_sets>.
=item Subroutine signatures
Introduced in Perl 5.20.0
Using this feature triggers warnings in the category
C<experimental::signatures>.
The ticket for this feature is
L<[perl #13681]|https://github.com/Perl/perl5/issues/13681>.
=item Aliasing via reference
Introduced in Perl 5.22.0
Using this feature triggers warnings in the category
C<experimental::refaliasing>.
The ticket for this feature is
L<[perl #14150]|https://github.com/Perl/perl5/issues/14150>.
See also: L<perlref/Assigning to References>
=item The "const" attribute
Introduced in Perl 5.22.0
Using this feature triggers warnings in the category
C<experimental::const_attr>.
The ticket for this feature is
L<[perl #14428]|https://github.com/Perl/perl5/issues/14428>.
See also: L<perlsub/Constant Functions>
=item use re 'strict';
Introduced in Perl 5.22.0
Using this feature triggers warnings in the category
C<experimental::re_strict>.
See L<re/'strict' mode>
=item The <:win32> IO pseudolayer
The ticket for this feature is
L<[perl #13198]|https://github.com/Perl/perl5/issues/13198>.
See also L<perlrun/PERLIO>
=item Declaring a reference to a variable
Introduced in Perl 5.26.0
Using this feature triggers warnings in the category
C<experimental::declared_refs>.
The ticket for this feature is
L<[perl #15458]|https://github.com/Perl/perl5/issues/15458>.
See also: L<perlref/Declaring a Reference to a Variable>
=item There is an C<installhtml> target in the Makefile.
The ticket for this feature is
L<[perl #12726]|https://github.com/Perl/perl5/issues/12726>.
=item (Limited) Variable-length look-behind
Introduced in Perl 5.30.0. Variability of up to 255 characters is
handled.
Using this feature triggers warnings in the category
C<experimental::vlb>.
See also: L<perlre/(*positive_lookbehind:I<pattern>)> and
L<perlre/(*negative_lookbehind:I<pattern>)>
=back
=head2 Accepted features
These features were so wildly successful and played so well with others that
we decided to remove their experimental status and admit them as full, stable
features in the world of Perl, lavishing all the benefits and luxuries thereof.
They are also awarded +5 Stability and +3 Charisma.
=over 8
=item 64-bit support
Introduced in Perl 5.005
=item die accepts a reference
Introduced in Perl 5.005
=item DB module
Introduced in Perl 5.6.0
See also L<perldebug>, L<perldebtut>
=item Weak references
Introduced in Perl 5.6.0
=item Internal file glob
Introduced in Perl 5.6.0
=item fork() emulation
Introduced in Perl 5.6.1
See also L<perlfork>
=item -Dusemultiplicity -Duseithreads
Introduced in Perl 5.6.0
Accepted in Perl 5.8.0
=item Support for long doubles
Introduced in Perl 5.6.0
Accepted in Perl 5.8.1
=item The C<\N> regex character class
The C<\N> character class, not to be confused with the named character
sequence C<\N{NAME}>, denotes any non-newline character in a regular
expression.
Introduced in Perl 5.12
Exact version of acceptance unclear, but no later than Perl 5.18.
=item C<(?{code})> and C<(??{ code })>
Introduced in Perl 5.6.0
Accepted in Perl 5.20.0
See also L<perlre>
=item Linux abstract Unix domain sockets
Introduced in Perl 5.9.2
Accepted before Perl 5.20.0. The Socket library is now primarily maintained
on CPAN, rather than in the perl core.
See also L<Socket>
=item Lvalue subroutines
Introduced in Perl 5.6.0
Accepted in Perl 5.20.0
See also L<perlsub>
=item Backtracking control verbs
C<(*ACCEPT)>
Introduced in Perl 5.10
Accepted in Perl 5.20.0
=item The <:pop> IO pseudolayer
See also L<perlrun/PERLIO>
Accepted in Perl 5.20.0
=item C<\s> in regexp matches vertical tab
Accepted in Perl 5.22.0
=item Postfix dereference syntax
Introduced in Perl 5.20.0
Accepted in Perl 5.24.0
=item Lexical subroutines
Introduced in Perl 5.18.0
Accepted in Perl 5.26.0
=item String- and number-specific bitwise operators
Introduced in Perl 5.22.0
Accepted in Perl 5.28.0
=item Alphabetic assertions
Introduced in Perl 5.28.0
Accepted in Perl 5.32.0
=item Script runs
Introduced in Perl 5.28.0
Accepted in Perl 5.32.0
=back
=head2 Removed features
These features are no longer considered experimental and their functionality
has disappeared. It's your own fault if you wrote production programs using
these features after we explicitly told you not to (see L<perlpolicy>).
=over 8
=item 5.005-style threading
Introduced in Perl 5.005
Removed in Perl 5.10
=item perlcc
Introduced in Perl 5.005
Moved from Perl 5.9.0 to CPAN
=item The pseudo-hash data type
Introduced in Perl 5.6.0
Removed in Perl 5.9.0
=item GetOpt::Long Options can now take multiple values at once (experimental)
C<Getopt::Long> upgraded to version 2.35
Removed in Perl 5.8.8
=item Assertions
The C<-A> command line switch
Introduced in Perl 5.9.0
Removed in Perl 5.9.5
=item Test::Harness::Straps
Moved from Perl 5.10.1 to CPAN
=item C<legacy>
The experimental C<legacy> pragma was swallowed by the C<feature> pragma.
Introduced in Perl 5.11.2
Removed in Perl 5.11.3
=item Lexical C<$_>
Using this feature triggered warnings in the category
C<experimental::lexical_topic>.
Introduced in Perl 5.10.0
Removed in Perl 5.24.0
=item Array and hash container functions accept references
Using this feature triggered warnings in the category
C<experimental::autoderef>.
Superseded by L</Postfix dereference syntax>.
Introduced in Perl 5.14.0
Removed in Perl 5.24.0
=item C<our> can have an experimental optional attribute C<unique>
Introduced in Perl 5.8.0
Deprecated in Perl 5.10.0
Removed in Perl 5.28.0
=back
=head1 SEE ALSO
For a complete list of features check L<feature>.
=head1 AUTHORS
brian d foy C<< <brian.d.foy@gmail.com> >>
SE<eacute>bastien Aperghis-Tramoni C<< <saper@cpan.org> >>
=head1 COPYRIGHT
Copyright 2010, brian d foy C<< <brian.d.foy@gmail.com> >>
=head1 LICENSE
You can use and redistribute this document under the same terms as Perl
itself.
=cut

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,351 @@
=head1 NAME
perlfaq1 - General Questions About Perl
=head1 VERSION
version 5.20200523
=head1 DESCRIPTION
This section of the FAQ answers very general, high-level questions
about Perl.
=head2 What is Perl?
Perl is a high-level programming language with an eclectic heritage
written by Larry Wall and a cast of thousands.
Perl's process, file, and text manipulation facilities make it
particularly well-suited for tasks involving quick prototyping, system
utilities, software tools, system management tasks, database access,
graphical programming, networking, and web programming.
Perl derives from the ubiquitous C programming language and to a
lesser extent from sed, awk, the Unix shell, and many other tools
and languages.
These strengths make it especially popular with web developers
and system administrators. Mathematicians, geneticists, journalists,
managers and many other people also use Perl.
=head2 Who supports Perl? Who develops it? Why is it free?
The original culture of the pre-populist Internet and the deeply-held
beliefs of Perl's author, Larry Wall, gave rise to the free and open
distribution policy of Perl. Perl is supported by its users. The
core, the standard Perl library, the optional modules, and the
documentation you're reading now were all written by volunteers.
The core development team (known as the Perl Porters)
are a group of highly altruistic individuals committed to
producing better software for free than you could hope to purchase for
money. You may snoop on pending developments via the
L<archives|http://www.nntp.perl.org/group/perl.perl5.porters/>
or you can subscribe to the mailing list by sending
perl5-porters-subscribe@perl.org a subscription request
(an empty message with no subject is fine).
While the GNU project includes Perl in its distributions, there's no
such thing as "GNU Perl". Perl is not produced nor maintained by the
Free Software Foundation. Perl's licensing terms are also more open
than GNU software's tend to be.
You can get commercial support of Perl if you wish, although for most
users the informal support will more than suffice. See the answer to
"Where can I buy a commercial version of Perl?" for more information.
=head2 Which version of Perl should I use?
(contributed by brian d foy with updates from others)
There is often a matter of opinion and taste, and there isn't any one
answer that fits everyone. In general, you want to use either the current
stable release, or the stable release immediately prior to that one.
Beyond that, you have to consider several things and decide which is best
for you.
=over 4
=item *
If things aren't broken, upgrading perl may break them (or at least issue
new warnings).
=item *
The latest versions of perl have more bug fixes.
=item *
The latest versions of perl may contain performance improvements and
features not present in older versions. There have been many changes
in perl since perl5 was first introduced.
=item *
The Perl community is geared toward supporting the most recent releases,
so you'll have an easier time finding help for those.
=item *
Older versions of perl may have security vulnerabilities, some of which
are serious (see L<perlsec> and search
L<CVEs|https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=Perl> for more
information).
=item *
The latest versions are probably the least deployed and widely tested, so
you may want to wait a few months after their release and see what
problems others have if you are risk averse.
=item *
The immediate, in addition to the current stable release, the previous
stable release is maintained. See
L<perlpolicy/"MAINTENANCE AND SUPPORT"> for more information.
=item *
There are really two tracks of perl development: a maintenance version
and an experimental version. The maintenance versions are stable, and
have an even number as the minor release (i.e. perl5.24.x, where 24 is the
minor release). The experimental versions may include features that
don't make it into the stable versions, and have an odd number as the
minor release (i.e. perl5.25.x, where 25 is the minor release).
=item *
You can consult L<releases|http://dev.perl.org/perl5> to determine the
current stable release of Perl.
=back
=head2 What are Perl 4, Perl 5, or Raku (Perl 6)?
In short, Perl 4 is the parent to both Perl 5 and Raku (formerly known as
Perl 6). Perl 5 is the older sibling, and though they are different languages,
someone who knows one will spot many similarities in the other.
The number after Perl (i.e. the 5 after Perl 5) is the major release
of the perl interpreter as well as the version of the language. Each
major version has significant differences that earlier versions cannot
support.
The current major release of Perl is Perl 5, first released in
1994. It can run scripts from the previous major release, Perl 4
(March 1991), but has significant differences.
Raku is a reinvention of Perl, a language in the same lineage but
not compatible. The two are complementary, not mutually exclusive. Raku is
not meant to replace Perl, and vice versa. See L</"What is Raku (Perl 6)?">
below to find out more.
See L<perlhist> for a history of Perl revisions.
=head2 What is Raku (Perl 6)?
Raku (formerly known as Perl 6) was I<originally> described as the community's
rewrite of Perl, however as the language evolved, it became clear that it is
a separate language, but in the same language family as Perl.
Raku is not intended primarily as a replacement for Perl, but as its
own thing - and libraries exist to allow you to call Perl code from Raku
programs and vice versa.
Contrary to popular belief, Raku and Perl peacefully coexist with one
another. Raku has proven to be a fascinating source of ideas for those
using Perl (the L<Moose> object system is a well-known example). There is
overlap in the communities, and this overlap fosters the tradition of sharing
and borrowing that have been instrumental to Perl's success.
For more about Raku see L<https://www.raku.org/>.
"We're really serious about reinventing everything that needs reinventing."
--Larry Wall
=head2 How stable is Perl?
Production releases, which incorporate bug fixes and new functionality,
are widely tested before release. Since the 5.000 release, we have
averaged about one production release per year.
The Perl development team occasionally make changes to the
internal core of the language, but all possible efforts are made toward
backward compatibility.
=head2 How often are new versions of Perl released?
Recently, the plan has been to release a new version of Perl roughly every
April, but getting the release right is more important than sticking rigidly to
a calendar date, so the release date is somewhat flexible. The historical
release dates can be viewed at L<http://www.cpan.org/src/README.html>.
Even numbered minor versions (5.14, 5.16, 5.18) are production versions, and
odd numbered minor versions (5.15, 5.17, 5.19) are development versions. Unless
you want to try out an experimental feature, you probably never want to install
a development version of Perl.
The Perl development team are called Perl 5 Porters, and their
organization is described at L<http://perldoc.perl.org/perlpolicy.html>.
The organizational rules really just boil down to one: Larry is always
right, even when he was wrong.
=head2 Is Perl difficult to learn?
No, Perl is easy to start L<learning|http://learn.perl.org/> --and easy to keep learning. It looks
like most programming languages you're likely to have experience
with, so if you've ever written a C program, an awk script, a shell
script, or even a BASIC program, you're already partway there.
Most tasks only require a small subset of the Perl language. One of
the guiding mottos for Perl development is "there's more than one way
to do it" (TMTOWTDI, sometimes pronounced "tim toady"). Perl's
learning curve is therefore shallow (easy to learn) and long (there's
a whole lot you can do if you really want).
Finally, because Perl is frequently (but not always, and certainly not by
definition) an interpreted language, you can write your programs and test
them without an intermediate compilation step, allowing you to experiment
and test/debug quickly and easily. This ease of experimentation flattens
the learning curve even more.
Things that make Perl easier to learn: Unix experience, almost any kind
of programming experience, an understanding of regular expressions, and
the ability to understand other people's code. If there's something you
need to do, then it's probably already been done, and a working example is
usually available for free. Don't forget Perl modules, either.
They're discussed in Part 3 of this FAQ, along with L<CPAN|http://www.cpan.org/>, which is
discussed in Part 2.
=head2 How does Perl compare with other languages like Java, Python, REXX, Scheme, or Tcl?
Perl can be used for almost any coding problem, even ones which require
integrating specialist C code for extra speed. As with any tool it can
be used well or badly. Perl has many strengths, and a few weaknesses,
precisely which areas are good and bad is often a personal choice.
When choosing a language you should also be influenced by the
L<resources|http://www.cpan.org/>, L<testing culture|http://www.cpantesters.org/>
and L<community|http://www.perl.org/community.html> which surrounds it.
For comparisons to a specific language it is often best to create
a small project in both languages and compare the results, make sure
to use all the L<resources|http://www.cpan.org/> of each language,
as a language is far more than just it's syntax.
=head2 Can I do [task] in Perl?
Perl is flexible and extensible enough for you to use on virtually any
task, from one-line file-processing tasks to large, elaborate systems.
For many people, Perl serves as a great replacement for shell scripting.
For others, it serves as a convenient, high-level replacement for most of
what they'd program in low-level languages like C or C++. It's ultimately
up to you (and possibly your management) which tasks you'll use Perl
for and which you won't.
If you have a library that provides an API, you can make any component
of it available as just another Perl function or variable using a Perl
extension written in C or C++ and dynamically linked into your main
perl interpreter. You can also go the other direction, and write your
main program in C or C++, and then link in some Perl code on the fly,
to create a powerful application. See L<perlembed>.
That said, there will always be small, focused, special-purpose
languages dedicated to a specific problem domain that are simply more
convenient for certain kinds of problems. Perl tries to be all things
to all people, but nothing special to anyone. Examples of specialized
languages that come to mind include prolog and matlab.
=head2 When shouldn't I program in Perl?
One good reason is when you already have an existing
application written in another language that's all done (and done
well), or you have an application language specifically designed for a
certain task (e.g. prolog, make).
If you find that you need to speed up a specific part of a Perl
application (not something you often need) you may want to use C,
but you can access this from your Perl code with L<perlxs>.
=head2 What's the difference between "perl" and "Perl"?
"Perl" is the name of the language. Only the "P" is capitalized.
The name of the interpreter (the program which runs the Perl script)
is "perl" with a lowercase "p".
You may or may not choose to follow this usage. But never write "PERL",
because perl is not an acronym.
=head2 What is a JAPH?
(contributed by brian d foy)
JAPH stands for "Just another Perl hacker,", which Randal Schwartz used
to sign email and usenet messages starting in the late 1980s. He
previously used the phrase with many subjects ("Just another x hacker,"),
so to distinguish his JAPH, he started to write them as Perl programs:
print "Just another Perl hacker,";
Other people picked up on this and started to write clever or obfuscated
programs to produce the same output, spinning things quickly out of
control while still providing hours of amusement for their creators and
readers.
CPAN has several JAPH programs at L<http://www.cpan.org/misc/japh>.
=head2 How can I convince others to use Perl?
(contributed by brian d foy)
Appeal to their self interest! If Perl is new (and thus scary) to them,
find something that Perl can do to solve one of their problems. That
might mean that Perl either saves them something (time, headaches, money)
or gives them something (flexibility, power, testability).
In general, the benefit of a language is closely related to the skill of
the people using that language. If you or your team can be faster,
better, and stronger through Perl, you'll deliver more value. Remember,
people often respond better to what they get out of it. If you run
into resistance, figure out what those people get out of the other
choice and how Perl might satisfy that requirement.
You don't have to worry about finding or paying for Perl; it's freely
available and several popular operating systems come with Perl. Community
support in places such as Perlmonks ( L<http://www.perlmonks.com> )
and the various Perl mailing lists ( L<http://lists.perl.org> ) means that
you can usually get quick answers to your problems.
Finally, keep in mind that Perl might not be the right tool for every
job. You're a much better advocate if your claims are reasonable and
grounded in reality. Dogmatically advocating anything tends to make
people discount your message. Be honest about possible disadvantages
to your choice of Perl since any choice has trade-offs.
You might find these links useful:
=over 4
=item * L<http://www.perl.org/about.html>
=item * L<http://perltraining.com.au/whyperl.html>
=back
=head1 AUTHOR AND COPYRIGHT
Copyright (c) 1997-2010 Tom Christiansen, Nathan Torkington, and
other authors as noted. All rights reserved.
This documentation is free; you can redistribute it and/or modify it
under the same terms as Perl itself.
Irrespective of its distribution, all code examples here are in the public
domain. You are permitted and encouraged to use this code and any
derivatives thereof in your own programs for fun or for profit as you
see fit. A simple comment in the code giving credit to the FAQ would
be courteous but is not required.

View File

@@ -0,0 +1,248 @@
=head1 NAME
perlfaq2 - Obtaining and Learning about Perl
=head1 VERSION
version 5.20200523
=head1 DESCRIPTION
This section of the FAQ answers questions about where to find
source and documentation for Perl, support, and
related matters.
=head2 What machines support Perl? Where do I get it?
The standard release of Perl (the one maintained by the Perl
development team) is distributed only in source code form. You
can find the latest releases at L<http://www.cpan.org/src/>.
Perl builds and runs on a bewildering number of platforms. Virtually
all known and current Unix derivatives are supported (perl's native
platform), as are other systems like VMS, DOS, OS/2, Windows,
QNX, BeOS, OS X, MPE/iX and the Amiga.
Binary distributions for some proprietary platforms can be found
L<http://www.cpan.org/ports/> directory. Because these are not part of
the standard distribution, they may and in fact do differ from the
base perl port in a variety of ways. You'll have to check their
respective release notes to see just what the differences are. These
differences can be either positive (e.g. extensions for the features
of the particular platform that are not supported in the source
release of perl) or negative (e.g. might be based upon a less current
source release of perl).
=head2 How can I get a binary version of Perl?
See L<CPAN Ports|http://www.cpan.org/ports/>
=head2 I don't have a C compiler. How can I build my own Perl interpreter?
For Windows, use a binary version of Perl,
L<Strawberry Perl|http://strawberryperl.com/> and
L<ActivePerl|http://www.activestate.com/activeperl> come with a
bundled C compiler.
Otherwise if you really do want to build Perl, you need to get a
binary version of C<gcc> for your system first. Use a search
engine to find out how to do this for your operating system.
=head2 I copied the Perl binary from one machine to another, but scripts don't work.
That's probably because you forgot libraries, or library paths differ.
You really should build the whole distribution on the machine it will
eventually live on, and then type C<make install>. Most other
approaches are doomed to failure.
One simple way to check that things are in the right place is to print out
the hard-coded C<@INC> that perl looks through for libraries:
% perl -le 'print for @INC'
If this command lists any paths that don't exist on your system, then you
may need to move the appropriate libraries to these locations, or create
symbolic links, aliases, or shortcuts appropriately. C<@INC> is also printed as
part of the output of
% perl -V
You might also want to check out
L<perlfaq8/"How do I keep my own module/library directory?">.
=head2 I grabbed the sources and tried to compile but gdbm/dynamic loading/malloc/linking/... failed. How do I make it work?
Read the F<INSTALL> file, which is part of the source distribution.
It describes in detail how to cope with most idiosyncrasies that the
C<Configure> script can't work around for any given system or
architecture.
=head2 What modules and extensions are available for Perl? What is CPAN?
CPAN stands for Comprehensive Perl Archive Network, a multi-gigabyte
archive replicated on hundreds of machines all over the world. CPAN
contains tens of thousands of modules and extensions, source code
and documentation, designed for I<everything> from commercial
database interfaces to keyboard/screen control and running large web sites.
You can search CPAN on L<http://metacpan.org>.
The master web site for CPAN is L<http://www.cpan.org/>,
L<http://www.cpan.org/SITES.html> lists all mirrors.
See the CPAN FAQ at L<http://www.cpan.org/misc/cpan-faq.html> for answers
to the most frequently asked questions about CPAN.
The L<Task::Kensho> module has a list of recommended modules which
you should review as a good starting point.
=head2 Where can I get information on Perl?
=over 4
=item * L<http://www.perl.org/>
=item * L<http://perldoc.perl.org/>
=item * L<http://learn.perl.org/>
=back
The complete Perl documentation is available with the Perl distribution.
If you have Perl installed locally, you probably have the documentation
installed as well: type C<perldoc perl> in a terminal or
L<view online|http://perldoc.perl.org/perl.html>.
(Some operating system distributions may ship the documentation in a different
package; for instance, on Debian, you need to install the C<perl-doc> package.)
Many good books have been written about Perl--see the section later in
L<perlfaq2> for more details.
=head2 What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org?
L<Perl.com|http://www.perl.com/> used to be part of the O'Reilly
Network, a subsidiary of O'Reilly Media. Although it retains most of
the original content from its O'Reilly Network, it is now hosted by
L<The Perl Foundation|http://www.perlfoundation.org/>.
The Perl Foundation is an advocacy organization for the Perl language
which maintains the web site L<http://www.perl.org/> as a general
advocacy site for the Perl language. It uses the domain to provide
general support services to the Perl community, including the hosting
of mailing lists, web sites, and other services. There are also many
other sub-domains for special topics like learning Perl and jobs in Perl,
such as:
=over 4
=item * L<http://www.perl.org/>
=item * L<http://learn.perl.org/>
=item * L<http://jobs.perl.org/>
=item * L<http://lists.perl.org/>
=back
L<Perl Mongers|http://www.pm.org/> uses the pm.org domain for services
related to local Perl user groups, including the hosting of mailing lists
and web sites. See the L<Perl Mongers web site|http://www.pm.org/> for more
information about joining, starting, or requesting services for a
Perl user group.
CPAN, or the Comprehensive Perl Archive Network L<http://www.cpan.org/>,
is a replicated, worldwide repository of Perl software.
See L<What is CPAN?|/"What modules and extensions are available for Perl? What is CPAN?">.
=head2 Where can I post questions?
There are many Perl L<mailing lists|lists.perl.org> for various
topics, specifically the L<beginners list|http://lists.perl.org/list/beginners.html>
may be of use.
Other places to ask questions are on the
L<PerlMonks site|http://www.perlmonks.org/> or
L<stackoverflow|http://stackoverflow.com/questions/tagged/perl>.
=head2 Perl Books
There are many good L<books on Perl|http://www.perl.org/books/library.html>.
=head2 Which magazines have Perl content?
There's also I<$foo Magazin>, a German magazine dedicated to Perl, at
( L<http://www.foo-magazin.de> ). The I<Perl-Zeitung> is another
German-speaking magazine for Perl beginners (see
L<http://perl-zeitung.at.tf> ).
Several Unix/Linux related magazines frequently include articles on Perl.
=head2 Which Perl blogs should I read?
L<Perl News|http://perlnews.org/> covers some of the major events in the Perl
world, L<Perl Weekly|http://perlweekly.com/> is a weekly e-mail
(and RSS feed) of hand-picked Perl articles.
L<http://blogs.perl.org/> hosts many Perl blogs, there are also
several blog aggregators: L<Perlsphere|http://perlsphere.net/> and
L<IronMan|http://ironman.enlightenedperl.org/> are two of them.
=head2 What mailing lists are there for Perl?
A comprehensive list of Perl-related mailing lists can be found at
L<http://lists.perl.org/>
=head2 Where can I buy a commercial version of Perl?
Perl already I<is> commercial software: it has a license
that you can grab and carefully read to your manager. It is distributed
in releases and comes in well-defined packages. There is a very large
and supportive user community and an extensive literature.
If you still need commercial support
L<ActiveState|http://www.activestate.com/activeperl> offers
this.
=head2 Where do I send bug reports?
(contributed by brian d foy)
First, ensure that you've found an actual bug. Second, ensure you've
found an actual bug.
If you've found a bug with the perl interpreter or one of the modules
in the standard library (those that come with Perl), you can submit a
bug report to the GitHub issue tracker at
L<https://github.com/Perl/perl5/issues>.
To determine if a module came with your version of Perl, you can
install and use the L<Module::CoreList> module. It has the information
about the modules (with their versions) included with each release
of Perl.
Every CPAN module has a bug tracker set up in RT, L<http://rt.cpan.org>.
You can submit bugs to RT either through its web interface or by
email. To email a bug report, send it to
bug-E<lt>distribution-nameE<gt>@rt.cpan.org . For example, if you
wanted to report a bug in L<Business::ISBN>, you could send a message to
bug-Business-ISBN@rt.cpan.org .
Some modules might have special reporting requirements, such as a
Github or Google Code tracking system, so you should check the
module documentation too.
=head1 AUTHOR AND COPYRIGHT
Copyright (c) 1997-2010 Tom Christiansen, Nathan Torkington, and
other authors as noted. All rights reserved.
This documentation is free; you can redistribute it and/or modify it
under the same terms as Perl itself.
Irrespective of its distribution, all code examples here are in the public
domain. You are permitted and encouraged to use this code and any
derivatives thereof in your own programs for fun or for profit as you
see fit. A simple comment in the code giving credit to the FAQ would
be courteous but is not required.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More