Debian Codegraph @

00perl

raw
1 Perl5 FAQ
2
3 <<<Obtaining Perl5>>>
4
5 You can find the latest and greatest release of Perl5 from the
6 following CPAN URL, which directs you to the nearest site from you
7 maybe:
8
9 http://www.perl.com/CPAN/src/5.0/
10
11 <<<Installing Perl5>>>
12
13 (1) Type "./Configure -d" to let "Configure" check your system
14 configuration. The "-d" option lets Perl5 choose default values rather
15 than asking questions to you. "Configure" creates the "config.sh" file
16 as a result.
17
18 % cd _somewhere_perl5_locates_
19 % ./Configure -d
20
21 (2) Edit "config.sh" at the final stage of "Configure" using shell escape.
22
23 e.g. !vi config.sh
24
25 If you want to use RPOP, "sperl" is required. To gain "sperl", ensure
26 that "d_dosuid" is 'defined' in "config.sh".
27
28 e.g. d_dosuid='define'
29
30 Unfortunately dynamic loading doesn't work on some OSes. In this case,
31 ensure that Perl5 uses static loading instead.
32
33 e.g. dynamic_ext=''
34 static_ext='DB_File Fcntl IO NDBM_File Opcode POSIX SDBM_File Socket'
35
36 You may want to modify "libs" to pacify warning concerned with locale.
37 See below.
38
39 (3) When you finish editing, "Configure" reflects "config.sh" to all
40 Makefiles and etc. Then type "make", "make test", and "make install".
41
42 % make
43 % make test
44 % su
45 # make install
46
47
48 <<<Pacifying Perl5 Warning>>>
49
50 Perl5 warns if appropriate locale for "LANG" is not found.
51
52 On FreeBSD, you should link Perl5 to the "xpg4" library. This is
53 accomplished by adding "-libxpg4" to "libs" in "config.sh". An example
54 is as follows:
55
56 libs='-lxpg4 -lm -lc -lcrypt'
57
58 Ensure that "-lxpg4" is on the top of the list. Of course, you need to
59 reflect this modification to all sub-directory files and make Perl5.
60
61 Even if your Perl5 is locale ready, Perl5 warns. This is because path
62 is missing.
63
64 Suppose that you set "LANG" "japanese" on BSD/OS 3.0. Perl5 warns as
65 follows:
66
67 warning: setlocale(LC_CTYPE, "") failed.
68 warning: LC_ALL = "(null)", LC_CTYPE = "(null)", LANG = "japanese",
69 warning: falling back to the "C" locale.
70
71 The best solution is to create an alias link to one of existing
72 locales. For instance, BSD/OS has /usr/share/locale/Japanese-EUC. So,
73 create "japanese" link, which is the value of "LANG", to it.
74
75 % su
76 # cd /usr/share/locale
77 # ln -s Japanese-EUC japanese