develooper Front page | perl.perl5.porters | Postings from March 2019

[perl #133934] perlipc modernization

Thread Previous | Thread Next
Dan Book
March 15, 2019 02:39
[perl #133934] perlipc modernization
Message ID:
# New Ticket Created by  Dan Book 
# Please include the string:  [perl #133934]
# in the subject line of all future correspondence about this issue. 
# <URL: >

Currently I am very unlikely to direct anyone to the otherwise very useful
perlipc for documentation, as it almost entirely uses bareword filehandles
and the two-argument form of open. Two patches will be attached.

The first corrects this by replacing bareword filehandles with lexicals,
and using three-arg open where possible, and slightly reorganizes the
explanation of forking and Unix platforms (forking is a property of using
three-arg pipe open which works fine back to 5.6, not the list form which
requires 5.8). Also the explanation of lexical filehandles is removed since
they are used all over perldocs now and there's nothing special about them

The second patch is a more general cleanup of consistency, as currently the
examples are very inconsistent in strict safety and variable declaration.
The patch makes all the examples strict safe, the "full script" examples
consistently use strict and warnings, removes unnecessary forward
declaration of variables (this practice leads to bugs), links to the core
modules IPC::Open2/3 and Socket as they're mentioned, removed -w from
shebangs (replaced by use warnings, due to the problems described by, and includes a waitpid line at the end of the IPC::Open2
example since it's required for proper usage of the module. Also one
cleanup of a sentence fragment that's apparently been there since 1997! (

I hope that at least the first patch can be applied, if the second is not



Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About