| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
See tickets #114020 and #75598 for why.
The changes to tests in cpan/Text-Tabs have been submitted upstream
at rt.cpan.org #81698.
|
|
|
|
| |
plus a couple of other pod tweaks.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The documentation to IO::Handle says that certain methods may not be set
on file handles, only statically. It would be nice (in my perhaps
not-so-humble opinion) if the distinction between per-filehandle and
non-perl-filehandle methods were recognized in perlvar.pod. The appended
universal diff is my cut at this.
diff a/pod/perlvar.pod b/pod/perlvar.pod
|
| |
|
|
|
|
|
|
|
| |
This was brought up in ticket #96672.
This variable gives access to the last-read filehandle that Perl uses
when it appends ", <STDIN> line 1" to a warning or error message.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the record read feature was introduced in 5b2b9c687790241e8
in 1998 (but by Dan Sugalski, not Hans Mulder as the git history
erroneously says), sysread() was a couple of years from learning
about utf-8 and PerlIO was just a fancy way of calling stdio. The
documentation was reasonable given that environment.
Now it's potentially misleading to say that record reads are "the
equivalent of C<sysread>" because sysread on filehandles opened
with ":utf8" does characters, not bytes. The salient point about
the analogy with sysread was always that the read is unbuffered.
In the old days, this was in contrast to the buffering done in
stdio's fread(), but now it's in contrast to the buffering in the
perlio layer. By emphasizing the role of buffering, we can
actually shorten and simplify the docs.
Side note: Both Camel 3 and Camel 4 have the following problematic
statement in the documentation of $/: "Record mode mixes with line
mode only on systems where standard I/O supplies a read(3) function;
VMS is a notable exception." VMS certainly does have a read(3)
function and in fact that's what's used directly for record reads
(via PerlLIO_read) on VMS only. And as far as I know, it is
fread(), not read(), that is considered "standard I/O" everywhere.
N.B. Record reads on non-record-oriented files on VMS will likely
start using the same buffering as other platforms in a future
version of Perl.
|
|
|
|
|
|
| |
It's kind of late in the release process to change how $/ = \N works
for unicode streams, briefly document how broken it is and let the
user know it may change.
|
|
|
|
|
| |
Also, make all indented code start with a four-space indent. Before
this it was inconsistent throughout.
|
| |
|
|
|
|
|
|
|
|
| |
Don’t refer people to warnings.pm for more information, as it
contains no more information about this variable.
Explain the scoping and also mention that the values are
considered internal.
|
|
|
|
| |
See <20011022034838.B1676@blackrider> and commit 0c8d858bc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Under POSIX threads the getpid() and getppid() functions return the
same values across multiple threads, i.e. threads don't have their own
PID's. This is not the case under the obsolete LinuxThreads where each
thread has a different PID, so getpid() and getppid() will return
different values across threads.
Ever since the first perl 5.0 we've returned POSIX-consistent
semantics for $$, until v5.14.0-251-g0e21945 when the getpid() cache
was removed. In 5.8.1 Rafael added further explicit POSIX emulation in
perl-5.8.0-133-g4d76a34 [1] by explicitly caching getppid(), so that
multiple threads would always return the same value.
I don't think all this effort to emulate POSIX sematics is worth it. I
think $$ and getppid() are OS-level functions that should always
return the same as their C equivalents. I shouldn't have to use a
module like Linux::Pid to get the OS version of the return values.
This is pretty much a complete non-issue in practice these days,
LinuxThreads was a Linux 2.4 thread implementation that nobody
maintains anymore[2], all modern Linux distros use NPTL threads which
don't suffer from this discrepancy. Debian GNU/kFreeBSD does use
LinuxThreads in the 6.0 release, but they too will be moving away from
it in future releases, and really, nobody uses Debian GNU/kFreeBSD
anyway.
This caching makes it unnecessarily tedious to fork an embedded Perl
interpreter. When someone that constructs an embedded perl interpreter
and forks their application, the fork(2) system call isn't going to
run Perl_pp_fork(), and thus the return value of $$ and getppid()
doesn't reflect the current process. See [3] for a bug in uWSGI
related to this, and Perl::AfterFork on the CPAN for XS code that you
need to run after forking a PerlInterpreter unbeknownst to perl.
We've already been failing the tests in t/op/getpid.t on these Linux
systems that nobody apparently uses, the Debian GNU/kFreeBSD users did
notice and filed #96270, this patch fixes that failure by changing the
tests to test for different behavior under LinuxThreads, I've tested
that this works on my Debian GNU/kFreeBSD 6.0.4 virtual machine.
If this change is found to be unacceptable (i.e. we want to continue
to emulate POSIX thread semantics for the sake of LinuxThreads) we
also need to revert v5.14.0-251-g0e21945, because currently we're only
emulating POSIX semantics for getppid(), not getpid(). But I don't
think we should do that, both v5.14.0-251-g0e21945 and this commit are
awesome.
This commit includes a change to embedvar.h made by "make
regen_headers".
1. http://www.nntp.perl.org/group/perl.perl5.porters/2002/08/msg64603.html
2. http://pauillac.inria.fr/~xleroy/linuxthreads/
3. http://projects.unbit.it/uwsgi/ticket/85
|
|
|
|
|
|
|
| |
It can return via 'goto &sub', but not via 'goto LABEL'.
The docs originally just said 'via goto'
See [perl #44367].
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This commit changes it to use two spaces, for several reasons. It was
already inconsistent. Although it used one space in most cases, the
rest of Perl’s documentation uses two. pod2man expects two spaces, as
it adds two spaces for sentences ending at the end of a line in the
middle of a paragraph, as it was designed to work with Perl’s origi-
nal pod docs, which used two spaces. If this document used one space
throughout, one would have to go through it and make sure no sentences
end at the ends of lines except at the end of a paragraph.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit reimplements $[ using PL_check hooks, custom pp func-
tions and ties.
Outside of its compile-time use, $[ is now parsed as a simple varia-
ble, so function calls like foo($[) are permitted, which was not the
case with the former implementation removed by e1dccc0. I consider
that a bug fix.
The ‘That use of $[ is unsupported’ errors are out of necessity
deferred to run-time and implemented by a tied $[.
Indices between 0 and the array base are now treated consistently, as
are indices between a negative array base and zero. That, too, is
a bug fix.
|
|
|
|
| |
Signed-off-by: David Golden <dagolden@cpan.org>
|
| |
|
|
|
|
|
|
|
| |
This is a little arbitrary, for example one could argue that @INC and %INC
belong in there. My main goal was to move stuff that you're less likely to
care about later in the document. Basically, this is the stuff that wizards
care about and mere mortals generally don't.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
$[ remains as a variable. It no longer has compile-time magic.
At runtime, it always reads as zero, accepts a write of zero, but dies
on writing any other value.
|
| |
|
|
|
|
| |
Signed-off-by: David Golden <dagolden@cpan.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While trying to understand a bug report at
http://www.perlmonks.org/?node_id=906466
I realized that the documentation for $! was not crystal clear. For example
If used numerically, yields the current value of the
C C<errno> variable, or in other words,
if a system or library call fails, it sets this variable.
That's not "in other words", these are totally different
concepts. And it isn't clear whether this variable refers to
errno or $! (I assumed the latter, and was wrong, as Devel::Peek
demonstrated). And $! cannot be undef, as asserted (later),
because errno always contains a value, however irrelevant.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
The new entry is a bit too futuristic: assignment to $[ still works
and it is not read-only.
This does not fully restore the old description, as it contained
grammatical errors and parts of it were not updated when 5.10 changed
the scoping.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Signed-off-by: Florian Ragwitz <rafl@debian.org>
[rafl@debian.org: Minor rewording based on input from TIMB]
|
| |
|
| |
|