The Many Versions of Perl


 
Network Programming with Perl
By Lincoln  D.  Stein
Slots : 1
Table of Contents
Preface

    Content

All good things evolve to meet changing conditions, and Perl has gone through several major changes in the course of its short life. This book was written for version of Perl in the 5.X series (5.003 and higher recommended). At the time I wrote this preface (August 2000), the most recent version of Perl was 5.6, with the release of 5.7 expected imminently. I expect that Perl versions 5.8 and 5.9 ( assuming there will be such versions) will be compatible with the code examples given here as well.

Over the horizon, however, is Perl version 6. Version 6, which is expected to be in early alpha form by the summer of 2001, will fix many of the idiosyncrasies and misfeatures of earlier versions of Perl. In so doing, however, it is expected to break most existing scripts. Fortunately, the Perl language developers are committed to developing tools to automatically port existing scripts to version 6. With an eye to this, I have tried to make the examples in this book generic, avoiding the more obscure Perl constructions.

Cross-Platform Compatibility

More serious are the differences between implementations of Perl on various operating systems. Perl started out on UNIX (and Linux) systems, but has been ported to many different operating systems, including Microsoft Windows, the Macintosh, VMS, OS/2, Plan9, and others. A script written for the Windows platform will run on UNIX or Macintosh without modifications.

The problem is that the I/O subsystem (the part of the system that manages input and output operations) is the part that differs most dramatically from operating system to operating system. This restricts the ability of Perl to make its I/O system completely portable. While Perl's basic I/O functionality is identical from port to port, some of the more sophisticated operations are either missing or behave significantly differently on non-UNIX platforms. This affects network programming, of course, because networking is fundamentally about input and output.

In this book, Chapters 1 through 9 use generic networking calls that will run on all platforms. The exception to this rule is the last example in Chapter 5, which calls a function that isn't implemented on the Macintosh, fork() , and some of the introductory discussion in Chapter 2 of process management on UNIX systems. The techniques discussed in these chapters are all you need for the vast majority of client programs, and are sufficient to get a simple server up and running. Chapters 10 through 22 deal with more advanced topics in server design. The table here shows whether the features in the chapters are supported by UNIX, Windows, or the Macintosh ports of Perl.

Chapter Subject UNIX/Linux Windows Macintosh
1 “9 Basic network programming + + +
10 Forking servers + P -
11 Multithreaded servers + + -
12 Multiplexing + + +
13 Nonblocking I/O + + +
14 Server bulletproofing + P -
15 Preforking and prethreading + - -
16 IO::Poll + - -
17 TCP urgent data + - -
18 UDP + + +
19 UDP servers + + +
20 Broadcasting + + +
21 Multicasting + - -
22 UNIX-domain sockets + - -
Key : + features supported; - features unsupported; P partial support

The nice thing is that the non-UNIX ports of Perl are improving rapidly , and there is a good chance that new features will be available at the time you read this.


   
Top


Network Programming with Perl
Network Programming with Perl
ISBN: 0201615711
EAN: 2147483647
Year: 2000
Pages: 173

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net