Mingw32 PERL_OBJECT tweaks
[p5sagit/p5-mst-13.2.git] / pod / perlfaq2.pod
CommitLineData
68dc0745 1=head1 NAME
2
c8db1d39 3perlfaq2 - Obtaining and Learning about Perl ($Revision: 1.20 $, $Date: 1998/07/05 15:07:20 $)
68dc0745 4
5=head1 DESCRIPTION
6
7This section of the FAQ answers questions about where to find
8source and documentation for Perl, support and training, and
9related matters.
10
11=head2 What machines support Perl? Where do I get it?
12
13The standard release of Perl (the one maintained by the perl
14development team) is distributed only in source code form. You can
15find this at http://www.perl.com/CPAN/src/latest.tar.gz, which is a
16gzipped archive in POSIX tar format. This source builds with no
17porting whatsoever on most Unix systems (Perl's native environment),
2d7a9237 18as well as Windows NT, Plan 9, VMS, QNX, OS/2, and the Amiga.
19
20Binary distributions for various platforms can be found
21http://www.perl.com/CPAN/ports/ directory. Some of these ports (especially
5a964f20 22the ones not part of the standard sources) may behave differently
2d7a9237 23than what is documented in the standard source documentation. These
24differences can be either positive (e.g. extensions for the features of the
25particular platform that are not supported in the source release of perl)
26or negative (e.g. might be based upon a less current source release of perl).
27
28A useful FAQ for Win32 Perl users is:
68dc0745 29http://www.endcontsw.com/people/evangelo/Perl_for_Win32_FAQ.html
5a964f20 30[This FAQ is seriously outdated as of May 1998--it is only relevant to
2d7a9237 31the perl that ActiveState distributes, especially where it describes
32various inadequacies and differences with the standard perl extension
33build support.]
68dc0745 34
35=head2 How can I get a binary version of Perl?
36
37If you don't have a C compiler because for whatever reasons your
38vendor did not include one with your system, the best thing to do is
39grab a binary version of gcc from the net and use that to compile perl
40with. CPAN only has binaries for systems that are terribly hard to
41get free compilers for, not for Unix systems.
42
3fe9a6f1 43Your first stop should be http://www.perl.com/CPAN/ports to see what
44information is already available. A simple installation guide for
45MS-DOS is available at http://www.cs.ruu.nl/~piet/perl5dos.html , and
46similarly for Windows 3.1 at http://www.cs.ruu.nl/~piet/perlwin3.html
47.
48
49=head2 I don't have a C compiler on my system. How can I compile perl?
50
51Since you don't have a C compiler, you're doomed and your vendor
52should be sacrificed to the Sun gods. But that doesn't help you.
53
54What you need to do is get a binary version of gcc for your system
55first. Consult the Usenet FAQs for your operating system for
56information on where to get such a binary version.
57
68dc0745 58=head2 I copied the Perl binary from one machine to another, but scripts don't work.
59
60That's probably because you forgot libraries, or library paths differ.
61You really should build the whole distribution on the machine it will
62eventually live on, and then type C<make install>. Most other
63approaches are doomed to failure.
64
65One simple way to check that things are in the right place is to print out
46fc3d4c 66the hard-coded @INC which perl is looking for.
68dc0745 67
68 perl -e 'print join("\n",@INC)'
69
70If this command lists any paths which don't exist on your system, then you
71may need to move the appropriate libraries to these locations, or create
72symlinks, aliases, or shortcuts appropriately.
73
3fe9a6f1 74You might also want to check out L<perlfaq8/"How do I keep my own
75module/library directory?">.
76
68dc0745 77=head2 I grabbed the sources and tried to compile but gdbm/dynamic loading/malloc/linking/... failed. How do I make it work?
78
79Read the F<INSTALL> file, which is part of the source distribution.
46fc3d4c 80It describes in detail how to cope with most idiosyncracies that the
68dc0745 81Configure script can't work around for any given system or
82architecture.
83
84=head2 What modules and extensions are available for Perl? What is CPAN? What does CPAN/src/... mean?
85
86CPAN stands for Comprehensive Perl Archive Network, a huge archive
87replicated on dozens of machines all over the world. CPAN contains
46fc3d4c 88source code, non-native ports, documentation, scripts, and many
68dc0745 89third-party modules and extensions, designed for everything from
90commercial database interfaces to keyboard/screen control to web
91walking and CGI scripts. The master machine for CPAN is
92ftp://ftp.funet.fi/pub/languages/perl/CPAN/, but you can use the
93address http://www.perl.com/CPAN/CPAN.html to fetch a copy from a
94"site near you". See http://www.perl.com/CPAN (without a slash at the
95end) for how this process works.
96
97CPAN/path/... is a naming convention for files available on CPAN
98sites. CPAN indicates the base directory of a CPAN mirror, and the
99rest of the path is the path from that directory to the file. For
100instance, if you're using ftp://ftp.funet.fi/pub/languages/perl/CPAN
101as your CPAN site, the file CPAN/misc/japh file is downloadable as
102ftp://ftp.funet.fi/pub/languages/perl/CPAN/misc/japh .
103
104Considering that there are hundreds of existing modules in the
105archive, one probably exists to do nearly anything you can think of.
106Current categories under CPAN/modules/by-category/ include perl core
107modules; development support; operating system interfaces; networking,
108devices, and interprocess communication; data type utilities; database
109interfaces; user interfaces; interfaces to other languages; filenames,
110file systems, and file locking; internationalization and locale; world
111wide web support; server and daemon utilities; archiving and
112compression; image manipulation; mail and news; control flow
113utilities; filehandle and I/O; Microsoft Windows modules; and
114miscellaneous modules.
115
116=head2 Is there an ISO or ANSI certified version of Perl?
117
118Certainly not. Larry expects that he'll be certified before Perl is.
119
120=head2 Where can I get information on Perl?
121
5a964f20 122The complete Perl documentation is available with the perl distribution.
123If you have perl installed locally, you probably have the documentation
124installed as well: type C<man perl> if you're on a system resembling Unix.
125This will lead you to other important man pages, including how to set your
126$MANPATH. If you're not on a Unix system, access to the documentation
127will be different; for example, it might be only in HTML format. But all
128proper perl installations have fully-accessible documentation.
68dc0745 129
130You might also try C<perldoc perl> in case your system doesn't
131have a proper man command, or it's been misinstalled. If that doesn't
132work, try looking in /usr/local/lib/perl5/pod for documentation.
133
134If all else fails, consult the CPAN/doc directory, which contains the
135complete documentation in various formats, including native pod,
136troff, html, and plain text. There's also a web page at
137http://www.perl.com/perl/info/documentation.html that might help.
138
68dc0745 139Many good books have been written about Perl -- see the section below
140for more details.
141
142=head2 What are the Perl newsgroups on USENET? Where do I post questions?
143
144The now defunct comp.lang.perl newsgroup has been superseded by the
145following groups:
146
147 comp.lang.perl.announce Moderated announcement group
148 comp.lang.perl.misc Very busy group about Perl in general
5a964f20 149 comp.lang.perl.moderated Moderated discussion group
68dc0745 150 comp.lang.perl.modules Use and development of Perl modules
151 comp.lang.perl.tk Using Tk (and X) from Perl
152
153 comp.infosystems.www.authoring.cgi Writing CGI scripts for the Web.
154
5a964f20 155Actually, the moderated group hasn't passed yet, but we're
156keeping our fingers crossed.
157
68dc0745 158There is also USENET gateway to the mailing list used by the crack
159Perl development team (perl5-porters) at
5a964f20 160news://news.perl.com/perl.porters-gw/ .
68dc0745 161
162=head2 Where should I post source code?
163
164You should post source code to whichever group is most appropriate,
165but feel free to cross-post to comp.lang.perl.misc. If you want to
166cross-post to alt.sources, please make sure it follows their posting
167standards, including setting the Followup-To header line to NOT
168include alt.sources; see their FAQ for details.
169
5a964f20 170If you're just looking for software, first use Alta Vista, Deja News, and
171search CPAN. This is faster and more productive than just posting
172a request.
173
68dc0745 174=head2 Perl Books
175
7b8d334a 176A number of books on Perl and/or CGI programming are available. A few of
68dc0745 177these are good, some are ok, but many aren't worth your money. Tom
178Christiansen maintains a list of these books, some with extensive
179reviews, at http://www.perl.com/perl/critiques/index.html.
180
181The incontestably definitive reference book on Perl, written by the
182creator of Perl and his apostles, is now in its second edition and
183fourth printing.
184
185 Programming Perl (the "Camel Book"):
186 Authors: Larry Wall, Tom Christiansen, and Randal Schwartz
187 ISBN 1-56592-149-6 (English)
188 ISBN 4-89052-384-7 (Japanese)
5a964f20 189 (French, German, and Italian translations also available)
68dc0745 190
191Note that O'Reilly books are color-coded: turquoise (some would call
192it teal) covers indicate perl5 coverage, while magenta (some would
193call it pink) covers indicate perl4 only. Check the cover color
194before you buy!
195
5a964f20 196If you're already a hard-core systems programmer, then the Camel Book
197might suffice for you to learn Perl from. But if you're not, check
198out I<Learning Perl> by Randal and Tom. The second edition of "Llama
199Book" has a blue cover, and is updated for the 5.004 release of Perl.
200
201If you're not an accidental programmer, but a more serious and possibly
202even degreed computer scientist who doesn't need as much hand-holding as
203we try to provide in the Llama or its defurred cousin the Gecko, please
204check out the delightful book, I<Perl: The Programmer's Companion>,
205written by Nigel Chapman.
206
c8db1d39 207You can order O'Reilly books directly from O'Reilly & Associates,
5a964f20 2081-800-998-9938. Local/overseas is 1-707-829-0515. If you can
209locate an O'Reilly order form, you can also fax to 1-707-829-0104.
210See http://www.ora.com/ on the Web.
211
68dc0745 212What follows is a list of the books that the FAQ authors found personally
213useful. Your mileage may (but, we hope, probably won't) vary.
214
5a964f20 215Recommended books on (or muchly on) Perl are the following.
216Those marked with a star may be ordered from O'Reilly.
68dc0745 217
5a964f20 218=over
68dc0745 219
5a964f20 220=item References
68dc0745 221
5a964f20 222 *Programming Perl
223 by Larry Wall, Tom Christiansen, and Randal L. Schwartz
68dc0745 224
5a964f20 225 *Perl 5 Desktop Reference
226 By Johan Vromans
68dc0745 227
5a964f20 228=item Tutorials
229
230 *Learning Perl [2nd edition]
231 by Randal L. Schwartz and Tom Christiansen
68dc0745 232
5a964f20 233 *Learning Perl on Win32 Systems
234 by Randal L. Schwartz, Erik Olson, and Tom Christiansen,
235 with foreword by Larry Wall
68dc0745 236
5a964f20 237 Perl: The Programmer's Companion
238 by Nigel Chapman
68dc0745 239
5a964f20 240 Cross-Platform Perl
241 by Eric F. Johnson
68dc0745 242
5a964f20 243 MacPerl: Power and Ease
244 by Vicki Brown and Chris Nandor, foreword by Matthias Neeracher
68dc0745 245
5a964f20 246=item Task-Oriented
247
248 *The Perl Cookbook
249 by Tom Christiansen and Nathan Torkington
250 with foreword by Larry Wall
251
252 Perl5 Interactive Course [2nd edition]
253 by Jon Orwant
254
255 *Advanced Perl Programming
256 by Sriram Srinivasan
68dc0745 257
5a964f20 258 Effective Perl Programming
259 by Joseph Hall
68dc0745 260
5a964f20 261=item Special Topics
262
263 *Mastering Regular Expressions
264 by Jeffrey Friedl
265
266 How to Set up and Maintain a World Wide Web Site [2nd edition]
267 by Lincoln Stein
268
269=back
270
271=head2 Perl in Magazines
272
273The first and only periodical devoted to All Things Perl, I<The
274Perl Journal> contains tutorials, demonstrations, case studies,
275announcements, contests, and much more. TPJ has columns on web
276development, databases, Win32 Perl, graphical programming, regular
277expressions, and networking, and sponsors the Obfuscated Perl Contest.
278It is published quarterly by Jon Orwant. See http://www.tpj.com/ or
279send mail to subscriptions@tpj.com.
280
281Beyond this, magazines that frequently carry high-quality articles
282on Perl are I<Web Techniques> (see http://www.webtechniques.com/),
c8db1d39 283I<Performance Computing> (http://www.performance-computing.com/), and Usenix's
5a964f20 284newsletter/magazine to its members, I<login:>, at http://www.usenix.org/.
285Randal's Web Technique's columns are available on the web at
286http://www.stonehenge.com/merlyn/WebTechniques/.
68dc0745 287
288=head2 Perl on the Net: FTP and WWW Access
289
290To get the best (and possibly cheapest) performance, pick a site from
291the list below and use it to grab the complete list of mirror sites.
3fe9a6f1 292From there you can find the quickest site for you. Remember, the
68dc0745 293following list is I<not> the complete list of CPAN mirrors.
294
295 http://www.perl.com/CPAN (redirects to another mirror)
296 http://www.perl.org/CPAN
297 ftp://ftp.funet.fi/pub/languages/perl/CPAN/
298 http://www.cs.ruu.nl/pub/PERL/CPAN/
299 ftp://ftp.cs.colorado.edu/pub/perl/CPAN/
300
46fc3d4c 301http:/www.oasis.leo.org/perl/ has, amongst other things, source to
302versions 1 through 5 of Perl.
303
68dc0745 304=head2 What mailing lists are there for perl?
305
306Most of the major modules (tk, CGI, libwww-perl) have their own
307mailing lists. Consult the documentation that came with the module for
308subscription information. The following are a list of mailing lists
309related to perl itself.
310
311If you subscribe to a mailing list, it behooves you to know how to
312unsubscribe from it. Strident pleas to the list itself to get you off
313will not be favorably received.
314
315=over 4
316
317=item MacPerl
318
319There is a mailing list for discussing Macintosh Perl. Contact
320"mac-perl-request@iis.ee.ethz.ch".
321
322Also see Matthias Neeracher's (the creator and maintainer of MacPerl)
46fc3d4c 323webpage at http://www.iis.ee.ethz.ch/~neeri/macintosh/perl.html for
68dc0745 324many links to interesting MacPerl sites, and the applications/MPW
325tools, precompiled.
326
327=item Perl5-Porters
328
329The core development team have a mailing list for discussing fixes and
330changes to the language. Send mail to
331"perl5-porters-request@perl.org" with help in the body of the message
332for information on subscribing.
333
334=item NTPerl
335
336This list is used to discuss issues involving Win32 Perl 5 (Windows NT
5a964f20 337and Win95). Subscribe by mailing ListManager@ActiveWare.com with the
68dc0745 338message body:
339
340 subscribe Perl-Win32-Users
341
342The list software, also written in perl, will automatically determine
5a964f20 343your address, and subscribe you automatically. To unsubscribe, mail
68dc0745 344the following in the message body to the same address like so:
345
346 unsubscribe Perl-Win32-Users
347
348You can also check http://www.activeware.com/ and select "Mailing Lists"
349to join or leave this list.
350
351=item Perl-Packrats
352
353Discussion related to archiving of perl materials, particularly the
c8db1d39 354Comprehensive Perl Archive Network (CPAN). Subscribe by emailing
68dc0745 355majordomo@cis.ufl.edu:
356
357 subscribe perl-packrats
358
359The list software, also written in perl, will automatically determine
360your address, and subscribe you automatically. To unsubscribe, simple
361prepend the same command with an "un", and mail to the same address
362like so:
363
364 unsubscribe perl-packrats
365
366=back
367
368=head2 Archives of comp.lang.perl.misc
369
370Have you tried Deja News or Alta Vista?
371
372ftp.cis.ufl.edu:/pub/perl/comp.lang.perl.*/monthly has an almost
373complete collection dating back to 12/89 (missing 08/91 through
37412/93). They are kept as one large file for each month.
375
376You'll probably want more a sophisticated query and retrieval mechanism
377than a file listing, preferably one that allows you to retrieve
378articles using a fast-access indices, keyed on at least author, date,
379subject, thread (as in "trn") and probably keywords. The best
380solution the FAQ authors know of is the MH pick command, but it is
381very slow to select on 18000 articles.
382
383If you have, or know where can be found, the missing sections, please
384let perlfaq-suggestions@perl.com know.
385
386=head2 Perl Training
387
5a964f20 388While some large training companies offer their own courses on
c8db1d39 389Perl, you may prefer to contact individuals near and dear to
390the heart of Perl development. Two well-known members of the
391Perl development team head companies which offer such things
392are Tom Christiansen <perl-classes@perl.com> and Randal Schwartz
393<perl-training-info@stonehenge.com>, plus their respective minions,
394who offer a variety of professional tutorials and seminars on Perl.
395These courses include large public seminars, private corporate training,
396and fly-ins to Colorado and Oregon. Contact Tom or Randal for details,
397or see http://www.perl.com/perl/info/training.html on the web.
68dc0745 398
399=head2 Where can I buy a commercial version of Perl?
400
401In a sense, Perl already I<is> commercial software: It has a licence
402that you can grab and carefully read to your manager. It is
403distributed in releases and comes in well-defined packages. There is a
404very large user community and an extensive literature. The
405comp.lang.perl.* newsgroups and several of the mailing lists provide
406free answers to your questions in near real-time. Perl has
407traditionally been supported by Larry, dozens of software designers
408and developers, and thousands of programmers, all working for free
409to create a useful thing to make life better for everyone.
410
411However, these answers may not suffice for managers who require a
412purchase order from a company whom they can sue should anything go
413wrong. Or maybe they need very serious hand-holding and contractual
414obligations. Shrink-wrapped CDs with perl on them are available from
415several sources if that will help.
416
417Or you can purchase a real support contract. Although Cygnus historically
418provided this service, they no longer sell support contracts for Perl.
419Instead, the Paul Ingram Group will be taking up the slack through The
420Perl Clinic. The following is a commercial from them:
421
422"Do you need professional support for Perl and/or Oraperl? Do you need
423a support contract with defined levels of service? Do you want to pay
424only for what you need?
425
426"The Paul Ingram Group has provided quality software development and
427support services to some of the world's largest corporations for ten
428years. We are now offering the same quality support services for Perl
429at The Perl Clinic. This service is led by Tim Bunce, an active perl
430porter since 1994 and well known as the author and maintainer of the
431DBI, DBD::Oracle, and Oraperl modules and author/co-maintainer of The
432Perl 5 Module List. We also offer Oracle users support for Perl5
433Oraperl and related modules (which Oracle is planning to ship as part
434of Oracle Web Server 3). 20% of the profit from our Perl support work
435will be donated to The Perl Institute."
436
437For more information, contact the The Perl Clinic:
438
439 Tel: +44 1483 424424
440 Fax: +44 1483 419419
441 Web: http://www.perl.co.uk/
442 Email: perl-support-info@perl.co.uk or Tim.Bunce@ig.co.uk
443
444=head2 Where do I send bug reports?
445
446If you are reporting a bug in the perl interpreter or the modules
5a964f20 447shipped with perl, use the I<perlbug> program in the perl distribution or
448mail your report to perlbug@perl.com.
68dc0745 449
46fc3d4c 450If you are posting a bug with a non-standard port (see the answer to
68dc0745 451"What platforms is Perl available for?"), a binary distribution, or a
46fc3d4c 452non-standard module (such as Tk, CGI, etc), then please see the
68dc0745 453documentation that came with it to determine the correct place to post
454bugs.
455
5a964f20 456Read the perlbug(1) man page (perl5.004 or later) for more information.
68dc0745 457
458=head2 What is perl.com? perl.org? The Perl Institute?
459
5a964f20 460The perl.com domain is Tom Christiansen's domain. He created it as a
461public service long before perl.org came about. Despite the name, it's a
462pretty non-commercial site meant to be a clearinghouse for information
463about all things Perlian, accepting no paid advertisements, bouncy
464happy gifs, or silly java applets on its pages. The Perl Home Page at
465http://www.perl.com/ is currently hosted on a T3 line courtesy of Songline
466Systems, a software-oriented subsidiary of O'Reilly and Associates.
467
68dc0745 468perl.org is the official vehicle for The Perl Institute. The motto of
469TPI is "helping people help Perl help people" (or something like
46fc3d4c 470that). It's a non-profit organization supporting development,
68dc0745 471documentation, and dissemination of perl. Current directors of TPI
472include Larry Wall, Tom Christiansen, and Randal Schwartz, whom you
473may have heard of somewhere else around here.
474
68dc0745 475=head2 How do I learn about object-oriented Perl programming?
476
477L<perltoot> (distributed with 5.004 or later) is a good place to start.
478Also, L<perlobj>, L<perlref>, and L<perlmod> are useful references,
479while L<perlbot> has some excellent tips and tricks.
480
481=head1 AUTHOR AND COPYRIGHT
482
5a964f20 483Copyright (c) 1997, 1998 Tom Christiansen and Nathan Torkington.
484All rights reserved.
485
c8db1d39 486When included as an integrated part of the Standard Distribution
487of Perl or of its documentation (printed or otherwise), this works is
488covered under Perl's Artistic Licence. For separate distributions of
489all or part of this FAQ outside of that, see L<perlfaq>.
490
491Irrespective of its distribution, all code examples here are public
492domain. You are permitted and encouraged to use this code and any
493derivatives thereof in your own programs for fun or for profit as you
494see fit. A simple comment in the code giving credit to the FAQ would
495be courteous but is not required.