Installing on Unix

Typically, the Perl kit will be packed as either a tar file or a set of shar (shell archive) scripts; in either case, the file will be in a compressed format. If you got your version of Perl directly from CPAN, it is probably in “tar-gzipped” format; tar and gzip are popular Unix data-archiving formats. In any case, once you’ve downloaded the distribution, you need to uncompress and unpack it. The filename indicates the kind of compression that was used. A .Z extension indicates you need to uncompress the file first, while a .gz extension indicates you need to gunzip the file. You then unpack the file as appropriate, read the README and INSTALL files, and run a massive shell script called Configure , which tries to figure out everything about your system and creates the file Config.pm to store the information. After this is done, you do a series of “makes” to find header file dependencies, to compile Perl (and a2p, which translates awk scripts to Perl), to run regression tests, and to install Perl in your system directories.

If you opt to build your own Perl under Win32, you will find that the Perl source kit is also shipped in zip format, which you can easily extract with pkunzip or Winzip (http://www.winzip.com).

If you’re building Perl under Unix, it is likely that your architecture and development environment is supported by Configure. You shouldn’t have any problems with the build process or running the test suite. One common problem is not making sure that Perl is linked against all the libraries it needs to build correctly. Also, you should say “yes” when Configure asks if you want dynamic loading, if your system supports it. Otherwise, you won’t be able to install modules that use XS, which provides an interface between Perl and C.

If you are running Linux, and you’ve installed Perl from a tarball (or rpm package), you should make sure everything is there; one way to do that is to check the Config.pm file. If MakeMaker is not correctly installed, you might need to build Perl yourself.

It’s possible you’ll get a compiled (binary) copy of Perl, rather than the source. In that case, make sure you get suidperl,[1] a2p, s2p, and the Perl library routines. Install these files in the directories that your version was compiled for. Note that binary distributions of Perl are made available because they’re handy, not because you are restricted from getting the source and compiling it yourself. The people who give you the binary distribution ought to provide you with some form of access to the source, if only a pointer to where they got the source. See the Copying file in the distribution for more information.



[1] Be care ful with suidperl. Most people do not understand the complexities and pitfalls of suidperl. Also, it will likely be deprecated after the Perl 5.8 release.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.22.61.30