perlfaq1 >
5.0150044
との差分
perlfaq1 5.0150044 と 5.8.4 の差分
1 | =encoding euc-jp | |
1 | 2 | |
2 | =encoding utf8 | |
3 | ||
4 | 3 | =head1 NAME |
5 | 4 | |
6 | 5 | =begin original |
7 | 6 | |
8 | perlfaq1 - General Questions About Perl | |
7 | perlfaq1 - General Questions About Perl ($Revision: 1.3 $, $Date: 2006/04/08 18:01:46 $) | |
9 | 8 | |
10 | 9 | =end original |
11 | 10 | |
12 | perlfaq1 - Perl に関する一般的な質問 | |
11 | perlfaq1 - Perl に関する一般的な質問 ($Revision: 1.3 $, $Date: 2006/04/08 18:01:46 $) | |
13 | 12 | |
14 | 13 | =head1 DESCRIPTION |
15 | 14 | |
16 | 15 | =begin original |
17 | 16 | |
18 | 17 | This section of the FAQ answers very general, high-level questions |
19 | 18 | about Perl. |
20 | 19 | |
21 | 20 | =end original |
22 | 21 | |
23 | このセクションでは、Perl | |
22 | このセクションでは、Perlに関する非常に一般的な高レベルの質問に答えます。 | |
24 | 23 | |
25 | 24 | =head2 What is Perl? |
26 | 25 | |
27 | 26 | (Perlってなんですか?) |
28 | 27 | |
29 | 28 | =begin original |
30 | 29 | |
31 | 30 | Perl is a high-level programming language with an eclectic heritage |
32 | written by Larry Wall and a cast of thousands. | |
31 | written by Larry Wall and a cast of thousands. It derives from the | |
32 | ubiquitous C programming language and to a lesser extent from sed, | |
34 | ||
33 | awk, the Unix shell, and at least a dozen other tools and languages. | |
35 | ||
36 | Perl は Larry Wall と数多い協力者によって書かれた、折衷的な遺産を持った | |
37 | 高水準プログラミング言語です。 | |
38 | ||
39 | =begin original | |
40 | ||
41 | 34 | Perl's process, file, and text manipulation facilities make it |
42 | 35 | particularly well-suited for tasks involving quick prototyping, system |
43 | 36 | utilities, software tools, system management tasks, database access, |
44 | graphical programming, networking, and web programming. | |
37 | graphical programming, networking, and world wide web programming. | |
38 | These strengths make it especially popular with system administrators | |
39 | and CGI script authors, but mathematicians, geneticists, journalists, | |
40 | and even managers also use Perl. Maybe you should, too. | |
45 | 41 | |
46 | 42 | =end original |
47 | 43 | |
48 | Perl | |
44 | Perl は Larry Wall と数多い協力者によって書かれた、折衷的な遺産を持った | |
45 | 高水準プログラミング言語です。 | |
46 | それは遍在するプログラミング言語であるCから派生し、 | |
47 | そしてそれ程ではないけれども、 | |
48 | sed、awk、Unix のシェルおよび少なくともダース単位の他のツールや言語に | |
49 | 影響を受けています。Perlのプロセス、ファイル及びテキスト操作機能は、 | |
49 | 50 | クィックプロトタイピング、システムユーティリティ、ソフトウェアツール、 |
50 | 51 | システム管理タスク、データベースアクセス、グラフィカルプログラミング、 |
51 | ネットワーキング、そして web プログラミングを含んだタスクに | |
52 | ネットワーキング、そして world wide web プログラミングを含んだタスクに | |
52 | 53 | 特に適したものになっています。 |
54 | これらの強みは、システム管理者やCGI スクリプトの作者に特に人気を博すもとと | |
55 | なっていますが、数学者、遺伝学者、ジャーナリスト、そして管理者も | |
56 | また Perl を利用しているのです。たぶんあなたもそうなるでしょう。 | |
53 | 57 | |
54 | = | |
58 | =head2 Who supports Perl? Who develops it? Why is it free? | |
55 | 59 | |
56 | Perl | |
60 | (だれがPerlをサポートしているのですか? 誰が開発しているのですか? なぜフリーなのでしょうか?) | |
57 | lesser extent from sed, awk, the Unix shell, and many other tools | |
58 | and languages. | |
59 | 61 | |
60 | =end original | |
61 | ||
62 | Perl は遍在するプログラミング言語である C から派生し、そして | |
63 | それ程ではないけれども、 | |
64 | sed、awk、Unix のシェルおよび多くのその他のツールや言語に | |
65 | 影響を受けています。 | |
66 | ||
67 | 62 | =begin original |
68 | 63 | |
69 | These strengths make it especially popular with web developers | |
70 | and system administrators. Mathematicians, geneticists, journalists, | |
71 | managers and many other people also use Perl. | |
72 | ||
73 | =end original | |
74 | ||
75 | これらの強みは、特に web 開発者とシステム管理者に人気を博しています。 | |
76 | 数学者、遺伝学者、ジャーナリスト、管理者やその他の多くの人々も Perl を | |
77 | 利用しています。 | |
78 | ||
79 | =head2 Who supports Perl? Who develops it? Why is it free? | |
80 | ||
81 | (だれが Perl をサポートしているのですか? 誰が開発しているのですか? なぜフリーなのでしょうか?) | |
82 | ||
83 | =begin original | |
84 | ||
85 | 64 | The original culture of the pre-populist Internet and the deeply-held |
86 | 65 | beliefs of Perl's author, Larry Wall, gave rise to the free and open |
87 | distribution policy of | |
66 | distribution policy of perl. Perl is supported by its users. The | |
88 | 67 | core, the standard Perl library, the optional modules, and the |
89 | documentation you're reading now were all written by volunteers. | |
68 | documentation you're reading now were all written by volunteers. See | |
69 | the personal note at the end of the README file in the perl source | |
70 | distribution for more details. See L<perlhist> (new as of 5.005) | |
71 | for Perl's milestone releases. | |
90 | 72 | |
91 | 73 | =end original |
92 | 74 | |
93 | 75 | pre-populist なインターネットの独特の文化と、Perl の作者である Larry |
94 | Wall の強い信条が、 | |
76 | Wall の強い信条が、perl のフリーでオープンな配布政策を生じさせました。 | |
95 | 77 | Perl はその利用者によってサポートされています。コア、Perl の標準 |
96 | 78 | ライブラリ、オプションモジュール、そしてあなたが今読んでいる資料は |
97 | 全てボランティアの手で書かれました。 | |
79 | 全てボランティアの手で書かれました。詳細は perl ソース配布セットの | |
80 | README ファイルの最後にあるパーソナルノートを参照して下さい。 | |
81 | Perl のマイルストーンリリースについてはL<perlhist>(5.005で追加) | |
82 | を参照してください | |
98 | 83 | |
99 | 84 | =begin original |
100 | 85 | |
101 | ||
86 | In particular, the core development team (known as the Perl Porters) | |
102 | are a | |
87 | are a rag-tag band of highly altruistic individuals committed to | |
103 | 88 | producing better software for free than you could hope to purchase for |
104 | money. You may snoop on pending developments via the | |
89 | money. You may snoop on pending developments via the archives at | |
105 | ||
90 | http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/ | |
106 | ||
91 | and http://archive.develooper.com/perl5-porters@perl.org/ | |
92 | or the news gateway nntp://nntp.perl.org/perl.perl5.porters or | |
93 | its web interface at http://nntp.perl.org/group/perl.perl5.porters , | |
94 | or read the faq at http://simon-cozens.org/writings/p5p-faq , | |
107 | 95 | or you can subscribe to the mailing list by sending |
108 | perl5-porters- | |
96 | perl5-porters-request@perl.org a subscription request | |
109 | 97 | (an empty message with no subject is fine). |
110 | 98 | |
111 | 99 | =end original |
112 | 100 | |
113 | (Perl Porters として知られる)コア開発チームは、お金を出してで | |
101 | 特に、(Perl Porters として知られる)コア開発チームは、お金を出してで | |
114 | 購入したいと思うレベルのものよりも、さらに良いソフトウェアを無 | |
102 | も購入したいと思うレベルのものよりも、さらに良いソフトウェアを無 | |
115 | 作り出すのだと誓っている、非常に利他的な人達の集 | |
103 | 料で作り出すのだと誓っている、非常に利他的な人達の寄せ集め部隊です。 | |
116 | ||
104 | http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/ | |
117 | ||
105 | や | |
118 | ||
106 | http://archive.develooper.com/perl5-porters@perl.org/ | |
119 | ||
107 | またはニュースゲートウェイ nntp://nntp.perl.org/perl.perl5.porters または | |
108 | その web インターフェースである http://nntp.perl.org/group/perl.perl5.porters , | |
109 | または http://simon-cozens.org/writings/p5p-faq の FAQ を | |
110 | 通して延び延びとなっている開発についてかぎまわることもできます。 | |
111 | あるいは、perl5-porters-request@perl.org へ登録願いを出すことに | |
120 | 112 | よってメイリングリストに参加することもできます |
121 | 113 | (タイトルなしの空メールでかまいません)。 |
122 | 114 | |
123 | 115 | =begin original |
124 | 116 | |
125 | 117 | While the GNU project includes Perl in its distributions, there's no |
126 | such thing as "GNU Perl". Perl is not produced nor maintained by the | |
118 | such thing as "GNU Perl". Perl is not produced nor maintained by the | |
127 | Free Software Foundation. Perl's licensing terms are also more open | |
119 | Free Software Foundation. Perl's licensing terms are also more open | |
128 | 120 | than GNU software's tend to be. |
129 | 121 | |
130 | 122 | =end original |
131 | 123 | |
132 | GNU プロジェクトはその配布セットに | |
124 | GNU プロジェクトはその配布セットにPerlを含んでいますが、"GNU Perl" | |
133 | のようなものはありません。 | |
125 | のようなものはありません。Perl は Free Software Foundation による作成も | |
134 | ||
126 | 保守もされてはいません。Perl のライセンス条件は GNU ソフトウェアが | |
135 | Perl のライセンス条件は GNU ソフトウェアが | |
136 | 127 | 通常取っているよりもさらにオープンなものとなっています。 |
137 | 128 | |
138 | 129 | =begin original |
139 | 130 | |
140 | 131 | You can get commercial support of Perl if you wish, although for most |
141 | users the informal support will more than suffice. See the answer to | |
132 | users the informal support will more than suffice. See the answer to | |
142 | "Where can I buy a commercial version of | |
133 | "Where can I buy a commercial version of perl?" for more information. | |
143 | 134 | |
144 | 135 | =end original |
145 | 136 | |
146 | あなたが望むなら、Perl の商用サポートを受けることが出来ます | |
137 | あなたが望むなら、Perl の商用サポートを受けることが出来ます。 | |
147 | けれども、大半の利用者にとっては、非公式のサポートは | |
138 | けれども、大半の利用者にとっては、非公式のサポートは | |
148 | ||
139 | 期待水準以上のものでしょう。 | |
149 | ||
140 | 詳しくは "Where can I buy a commercial version of perl?" | |
141 | (どこで商用版Perlを買うことが出来ますか?) の回答を参照してください。 | |
150 | 142 | |
151 | 143 | =head2 Which version of Perl should I use? |
152 | 144 | |
153 | 145 | (どのバージョンの Perl を使うべきなのでしょうか?) |
154 | 146 | |
155 | 147 | =begin original |
156 | 148 | |
157 | ||
149 | You should definitely use version 5. Version 4 is old, limited, and | |
150 | no longer maintained; its last patch (4.036) was in 1992, long ago and | |
151 | far away. Sure, it's stable, but so is anything that's dead; in fact, | |
152 | perl4 had been called a dead, flea-bitten camel carcass. The most | |
153 | recent production release is 5.8.2 (although 5.005_03 and 5.6.2 are | |
154 | still supported). The most cutting-edge development release is 5.9. | |
155 | Further references to the Perl language in this document refer to the | |
156 | production release unless otherwise specified. There may be one or | |
157 | more official bug fixes by the time you read this, and also perhaps | |
158 | some experimental versions on the way to the next release. | |
159 | All releases prior to 5.004 were subject to buffer overruns, a grave | |
160 | security issue. | |
158 | 161 | |
159 | 162 | =end original |
160 | 163 | |
161 | ||
164 | 明らかにバージョン 5を使うべきです。バージョン 4は古く、機能も限定されていて、 | |
165 | もはや保守もされていません。その最後のパッチ(4.036)は 1992 年で、 | |
166 | そして長い時間が経っています。確かに perl4 は安定しているかもしれませんが、 | |
167 | もはやそれは死んだものなのです。 | |
168 | 実際、perl4 はハエのたかったラクダの死骸と呼ばれていました。 | |
169 | 最新の本番リリースは 5.8.2 です(5.005_03 と 5.6.2 もまだサポートされていますが)。 | |
170 | 最も先頭をいっているのは開発リリース 5.9 です。本ドキュメントでは | |
171 | 特に断りのない限りこれらのバージョンのことを指します。あなたがこれを | |
172 | 読んでいる間にも、少なからぬバグフィックスが行われているでしょう。 | |
173 | そして、次のリリースに向けた試験バージョンが試されているでしょう。 | |
174 | 5.004 より前のリリースは全てバッファオーバーランがあることが指摘されていて、 | |
175 | これはセキュリティ上問題です。 | |
162 | 176 | |
163 | = | |
177 | =head2 What are perl4 and perl5? | |
164 | 178 | |
165 | ||
179 | (perl4 と perl5 ってなんですか?) | |
166 | answer that fits everyone. In general, you want to use either the current | |
167 | stable release, or the stable release immediately prior to that one. | |
168 | Currently, those are perl5.18.x and perl5.16.x, respectively. | |
169 | 180 | |
170 | =end original | |
171 | ||
172 | これはしばしば見解と嗜好の問題であり、誰にでも適応する一つの答えというものは | |
173 | ありません。 | |
174 | 一般的に、現在の安定版か、その一つ前の安定版を使いたいでしょう。 | |
175 | 現在のところ、それぞれ perl5.18.x と perl5.16.x となります。 | |
176 | ||
177 | 181 | =begin original |
178 | 182 | |
179 | ||
183 | Perl4 and perl5 are informal names for different versions of the Perl | |
180 | ||
184 | programming language. It's easier to say "perl5" than it is to say | |
185 | "the 5(.004) release of Perl", but some people have interpreted this | |
186 | to mean there's a language called "perl5", which isn't the case. | |
187 | Perl5 is merely the popular name for the fifth major release (October 1994), | |
188 | while perl4 was the fourth major release (March 1991). There was also a | |
189 | perl1 (in January 1988), a perl2 (June 1988), and a perl3 (October 1989). | |
181 | 190 | |
182 | 191 | =end original |
183 | 192 | |
184 | ||
193 | perl4 と perl5 は、perl プログラミング言語の異なったバージョンの | |
185 | ||
194 | 非公式な名称です。"Perl の 5(.004) リリース"というより、"perl5" と言う方が | |
195 | 簡単です。 | |
196 | しかし、ある人々は、大文字ではない"perl5"と呼ばれる言語があることを | |
197 | 意味するのだと解釈しました。 | |
198 | perl5 は単に五番目のメジャーリリース(1994 年 10 月)の普及した名称ですが、 | |
199 | 一方 perl4 は四番目のメジャーリリース(1991 年 3 月)でした。 | |
200 | 同様に、perl1(1988 年 1 月)、 | |
201 | perl2(1988 年 6 月) そしてperl3(1989 年 10 月)もありました。 | |
186 | 202 | |
187 | =over 4 | |
188 | ||
189 | =item * | |
190 | ||
191 | 203 | =begin original |
192 | 204 | |
193 | ||
205 | The 5.0 release is, essentially, a ground-up rewrite of the original | |
194 | ||
206 | perl source code from releases 1 through 4. It has been modularized, | |
207 | object-oriented, tweaked, trimmed, and optimized until it almost doesn't | |
208 | look like the old code. However, the interface is mostly the same, and | |
209 | compatibility with previous releases is very high. | |
210 | See L<perltrap/"Perl4 to Perl5 Traps">. | |
195 | 211 | |
196 | 212 | =end original |
197 | 213 | |
198 | ||
214 | 5.0 のリリースは本質的に、リリース 1 からリリース 4 までの | |
199 | ||
215 | perl ソースコードの完全な書き換えです。 | |
216 | それは、旧コードには似ても似つかなくなるまで、モジュール化され、 | |
217 | オブジェクト指向となり、微調整され、整備され、最適化されました。 | |
218 | しかしながら、インターフェースはほとんど同じであり、以前のバージョンとの | |
219 | 互換性は非常に高いです。 | |
220 | L<perltrap/"Perl4 to Perl5 Traps">を参照してください。 | |
200 | 221 | |
201 | =item * | |
202 | ||
203 | 222 | =begin original |
204 | 223 | |
205 | The | |
224 | To avoid the "what language is perl5?" confusion, some people prefer to | |
225 | simply use "perl" to refer to the latest version of perl and avoid using | |
226 | "perl5" altogether. It's not really that big a deal, though. | |
206 | 227 | |
207 | 228 | =end original |
208 | 229 | |
209 | ||
230 | 「perl5 はどんな言語ですか?」という混乱を避けるため、ある人々は | |
231 | perl の最新バージョンに言及するのに単に"perl"を使うのを好み、全体に | |
232 | "perl5"を使うのを避けています。本当はたいした事ではないのですが。 | |
210 | 233 | |
211 | =item * | |
212 | ||
213 | 234 | =begin original |
214 | 235 | |
215 | ||
236 | See L<perlhist> for a history of Perl revisions. | |
216 | so you'll have an easier time finding help for those. | |
217 | 237 | |
218 | 238 | =end original |
219 | 239 | |
220 | Perl の | |
240 | Perl の改訂の歴史に関しては L<perlhist> を参照してください。 | |
221 | それらに対する助けは早く得られます。 | |
222 | 241 | |
223 | = | |
242 | =head2 What is Ponie? | |
224 | 243 | |
225 | 244 | =begin original |
226 | 245 | |
227 | ||
246 | At The O'Reilly Open Source Software Convention in 2003, Artur | |
228 | ||
247 | Bergman, Fotango, and The Perl Foundation announced a project to | |
229 | ||
248 | run perl5 on the Parrot virtual machine named Ponie. Ponie stands for | |
249 | Perl On New Internal Engine. The Perl 5.10 language implementation | |
250 | will be used for Ponie, and there will be no language level | |
251 | differences between perl5 and ponie. Ponie is not a complete rewrite | |
252 | of perl5. | |
230 | 253 | |
231 | 254 | =end original |
232 | 255 | |
233 | ||
256 | 2003 年の O'Reilly Open Source Software Convention で、 | |
234 | ||
257 | Artur Bergman, Fotango, The Perl Foundation は perl5 を Parrot 仮想マシンで | |
235 | ||
258 | 動作させるプロジェクトである Ponie をアナウンスしました。 | |
259 | Ponie は Perl On New Internal Engine の略です。 | |
260 | Perl 5.10 の言語実装は Ponie が用いられ、perl5 と ponie は言語レベルでの | |
261 | 違いはない予定です。Ponie は perl5 の完全な書き換えではありません。 | |
236 | 262 | |
237 | =item * | |
238 | ||
239 | 263 | =begin original |
240 | 264 | |
241 | ||
265 | For more details, see http://www.poniecode.org/ | |
242 | you may want to wait a few months after their release and see what | |
243 | problems others have if you are risk averse. | |
244 | 266 | |
245 | 267 | =end original |
246 | 268 | |
247 | ||
269 | 詳細については、http://www.poniecode.org/ を見てください。 | |
248 | もしリスクを嫌うならリリース後数ヶ月待って他の人がどんな問題を | |
249 | 抱えたかを確認したいかもしれません。 | |
250 | 270 | |
251 | = | |
271 | =head2 What is perl6? | |
252 | 272 | |
253 | ||
273 | (perl6ってなんですか?) | |
254 | 274 | |
255 | The immediate, previous releases (i.e. perl5.14.x ) are usually maintained | |
256 | for a while, although not at the same level as the current releases. | |
257 | ||
258 | =end original | |
259 | ||
260 | 直前のリリース (つまり perl5.14.x ) は普通しばらくの間 | |
261 | メンテナンスされますが、カレントリリースと同じレベルではありません。 | |
262 | ||
263 | =item * | |
264 | ||
265 | 275 | =begin original |
266 | 276 | |
267 | ||
277 | At The Second O'Reilly Open Source Software Convention, Larry Wall | |
268 | ||
278 | announced Perl6 development would begin in earnest. Perl6 was an oft | |
269 | ||
279 | used term for Chip Salzenberg's project to rewrite Perl in C++ named | |
280 | Topaz. However, Topaz provided valuable insights to the next version | |
281 | of Perl and its implementation, but was ultimately abandoned. | |
270 | 282 | |
271 | 283 | =end original |
272 | 284 | |
273 | ||
285 | 第 2 回 O'Reilly Open Source Software Convention において、 Larry Wall は | |
274 | ||
286 | Perl6 の開発を本格的に開始するとアナウンスしました。 | |
275 | ||
287 | Perl6 は Chip Salzenberg による Topaz と呼ばれる Perl を C++ で書き直す | |
288 | プロジェクトでしばしば使われていました。Topaz は Perl の次のバージョンと | |
289 | その実装への価値ある知見をもたらしましたが、完全に中断しています。 | |
276 | 290 | |
277 | =item * | |
278 | ||
279 | 291 | =begin original |
280 | 292 | |
281 | ||
293 | If you want to learn more about Perl6, or have a desire to help in | |
282 | ||
294 | the crusade to make Perl a better place then peruse the Perl6 developers | |
283 | ||
295 | page at http://dev.perl.org/perl6/ and get involved. | |
284 | 296 | |
285 | 297 | =end original |
286 | 298 | |
287 | ||
299 | Perl6 についてもっと知りたい、または Perl をよりよき場所へと導く | |
288 | ||
300 | 十字軍を助けたいなら、Perl6 開発者ページ http://dev.perl.org/perl6/ を | |
289 | ||
301 | 熟読して、参加してください。 | |
290 | さらなる情報についてはどうか L<http://rakudo.org/> を参照してください。 | |
291 | 302 | |
292 | =item * | |
293 | ||
294 | 303 | =begin original |
295 | 304 | |
296 | ||
305 | Perl6 is not scheduled for release yet, and Perl5 will still be supported | |
297 | ||
306 | for quite awhile after its release. Do not wait for Perl6 to do whatever | |
298 | ||
307 | you need to do. | |
299 | minor release). The experimental versions may include features that | |
300 | don't make it into the stable versions, and have an odd number as the | |
301 | minor release (i.e. perl5.19.x, where 9 is the minor release). | |
302 | 308 | |
303 | 309 | =end original |
304 | 310 | |
305 | ||
311 | Perl6 はまだリリースの予定はなく、Perl5 は Perl6 がリリースされた後も | |
306 | ||
312 | しばらくの間サポートされます。 | |
307 | ||
313 | 何かをしようとする時に、Perl6を待つ必要はありません。 | |
308 | 実験版は安定版に含まれていない機能が含まれていて、マイナーリリース番号に | |
309 | 奇数を使います(例えば、perl5.19.x; 19 がマイナーリリース番号です)。 | |
310 | 314 | |
311 | =back | |
312 | ||
313 | =head2 What are Perl 4, Perl 5, or Perl 6? | |
314 | ||
315 | (Perl 4, Perl 5, Perl 6 って何ですか?) | |
316 | ||
317 | 315 | =begin original |
318 | 316 | |
319 | In short, Perl 4 is the parent to both Perl 5 and Perl 6. Perl 5 is the older | |
320 | sibling, and though they are different languages, someone who knows one will | |
321 | spot many similarities in the other. | |
322 | ||
323 | =end original | |
324 | ||
325 | 短く言うと、Perl 4 は Perl 5 と Perl 6 双方の親です。 | |
326 | Perl 5 は兄で、違う言語ではありますが、片方を知っている人はもう片方にも | |
327 | 多くの類似性を見つけるでしょう。 | |
328 | ||
329 | =begin original | |
330 | ||
331 | The number after Perl (i.e. the 5 after Perl 5) is the major release | |
332 | of the perl interpreter as well as the version of the language. Each | |
333 | major version has significant differences that earlier versions cannot | |
334 | support. | |
335 | ||
336 | =end original | |
337 | ||
338 | "Perl" の後ろの数字(例えば "Perl 5" の 5)は perl インタプリタの | |
339 | メジャーリリース番号であり、言語のバージョンでもあります。 | |
340 | メジャーバージョン毎に、以前のバージョンでは対応できない | |
341 | 大きな違いがあります。 | |
342 | ||
343 | =begin original | |
344 | ||
345 | The current major release of Perl is Perl 5, first released in | |
346 | 1994. It can run scripts from the previous major release, Perl 4 | |
347 | (March 1991), but has significant differences. | |
348 | ||
349 | =end original | |
350 | ||
351 | 現在の Perl のメジャーリリースは Perl 5 あり、1994 年に最初に | |
352 | リリースされました。 | |
353 | 以前のメジャーリリースである Perl 4 (1991 年 3 月リリース) のスクリプトも | |
354 | 動きますが、重大な違いがあります。 | |
355 | ||
356 | =begin original | |
357 | ||
358 | Perl 6 is a reinvention of Perl, it is a language in the same lineage but | |
359 | not compatible. The two are complementary, not mutually exclusive. Perl 6 is | |
360 | not meant to replace Perl 5, and vice versa. See L</"What is Perl 6?"> below | |
361 | to find out more. | |
362 | ||
363 | =end original | |
364 | ||
365 | Perl 6 は Perl の再開発です; これは同じ一族ですが互換性はありません。 | |
366 | この二つは補完的であり、排他的ではありません。 | |
367 | Perl 6 は Perl 5 の置き換えを意味しませんし、逆もまた真なりです。 | |
368 | さらなる情報については L</"What is Perl 6?"> を参照してください。 | |
369 | ||
370 | =begin original | |
371 | ||
372 | See L<perlhist> for a history of Perl revisions. | |
373 | ||
374 | =end original | |
375 | ||
376 | Perl の改訂の歴史に関しては L<perlhist> を参照してください。 | |
377 | ||
378 | =head2 What is Perl 6? | |
379 | ||
380 | (Perl 6 ってなんですか?) | |
381 | ||
382 | =begin original | |
383 | ||
384 | Perl 6 was I<originally> described as the community's rewrite of Perl 5. | |
385 | Development started in 2002; syntax and design work continue to this day. | |
386 | As the language has evolved, it has become clear that it is a separate | |
387 | language, incompatible with Perl 5 but in the same language family. | |
388 | ||
389 | =end original | |
390 | ||
391 | Perl 6 は I<元々は> コミュニティによる Perl 5 の書き直しとされていました。 | |
392 | 開発は 2002 年に開始されました; 文法と設計の作業は現在でも続いています。 | |
393 | 言語が進化するにつれて、Perl 5 とは同じ言語ファミリではありますが | |
394 | 別の互換性のない言語であることがはっきりしてきました。 | |
395 | ||
396 | =begin original | |
397 | ||
398 | Contrary to popular belief, Perl 6 and Perl 5 peacefully coexist with one | |
399 | another. Perl 6 has proven to be a fascinating source of ideas for those | |
400 | using Perl 5 (the L<Moose> object system is a well-known example). There is | |
401 | overlap in the communities, and this overlap fosters the tradition of sharing | |
402 | and borrowing that have been instrumental to Perl's success. The current | |
403 | leading implementation of Perl 6 is Rakudo, and you can learn more about | |
404 | it at L<http://rakudo.org>. | |
405 | ||
406 | =end original | |
407 | ||
408 | 一般に信じられていることに反して、Perl 6 と Perl 5 は平和的に共存します。 | |
409 | Perl 6 は Perl 5 を使うときの興味深いアイデアの基と考えられています (L<Moose> | |
410 | オブジェクトシステムはよく知られた例です)。 | |
411 | コミュニティは重なっていて、この重なりは Perl の成功に役だった共有と借用の | |
412 | 伝統を育てています。 | |
413 | 現在の指導的な Perl 6 実装は Rakudo で、L<http://rakudo.org> でさらに | |
414 | 学べます。 | |
415 | ||
416 | =begin original | |
417 | ||
418 | If you want to learn more about Perl 6, or have a desire to help in | |
419 | the crusade to make Perl a better place then read the Perl 6 developers | |
420 | page at L<http://www.perl6.org/> and get involved. | |
421 | ||
422 | =end original | |
423 | ||
424 | Perl 6 についてもっと知りたい、または Perl をよりよき場所へと導く | |
425 | 十字軍を助けたいなら、Perl 6 開発者ページ L<http://www.perl6.org/> を | |
426 | 読んで、参加してください。 | |
427 | ||
428 | =begin original | |
429 | ||
430 | 317 | "We're really serious about reinventing everything that needs reinventing." |
431 | 318 | --Larry Wall |
432 | 319 | |
433 | 320 | =end original |
434 | 321 | |
435 | 322 | "We're really serious about reinventing everything that needs reinventing." |
436 | 323 | --Larry Wall |
437 | 324 | |
438 | 325 | =head2 How stable is Perl? |
439 | 326 | |
440 | (Perl | |
327 | (Perlはどのくらい安定しているのでしょうか?) | |
441 | 328 | |
442 | 329 | =begin original |
443 | 330 | |
444 | 331 | Production releases, which incorporate bug fixes and new functionality, |
445 | are widely tested before release. Since the 5.000 release, we have | |
332 | are widely tested before release. Since the 5.000 release, we have | |
446 | averaged about one production release per year. | |
333 | averaged only about one production release per year. | |
447 | 334 | |
448 | 335 | =end original |
449 | 336 | |
450 | 337 | バグのフィックスと新機能を組み入れた本番リリースは、リリース前に |
451 | 広くテストされます。 | |
338 | 広くテストされます。平均すると、5.000 のリリースからはだいたい一年に一回の割で | |
452 | 平均すると、5.000 のリリースからはだいたい一年に一回の割で | |
453 | 339 | 本番リリースをしてきました。 |
454 | 340 | |
455 | 341 | =begin original |
456 | 342 | |
457 | ||
343 | Larry and the Perl development team occasionally make changes to the | |
458 | 344 | internal core of the language, but all possible efforts are made toward |
459 | backward compatibility. | |
345 | backward compatibility. While not quite all perl4 scripts run flawlessly | |
346 | under perl5, an update to perl should nearly never invalidate a program | |
347 | written for an earlier version of perl (barring accidental bug fixes | |
348 | and the rare new keyword). | |
460 | 349 | |
461 | 350 | =end original |
462 | 351 | |
463 | 352 | Larry と Perl 開発チームは時折言語内部のコアに対する変更を行いますが、 |
464 | 可能な限り旧版との互換性維持に努めています。 | |
353 | 可能な限り旧版との互換性維持に努めています。全ての perl4 スクリプトが | |
354 | perl5 の下で無傷で走るわけではありませんが、perl のアップデートによって、 | |
355 | (偶発的なバグフィックスの排除とまれな新しいキーワードがなければ) | |
356 | 以前のバージョンの perl 向けに書かれたプログラムを無効になってしまうことは | |
357 | ほとんどありえないでしょう。 | |
465 | 358 | |
466 | =head2 How often are new versions of Perl released? | |
467 | ||
468 | (どのくらいのペースで新しいバージョンの Perl はリリースされますか?) | |
469 | ||
470 | =begin original | |
471 | ||
472 | Recently, the plan has been to release a new version of Perl roughly every | |
473 | April, but getting the release right is more important than sticking rigidly to | |
474 | a calendar date, so the release date is somewhat flexible. The historical | |
475 | release dates can be viewed at L<http://www.cpan.org/src/README.html>. | |
476 | ||
477 | =end original | |
478 | ||
479 | 最近は、新しいバージョンの Perl をおおよそ毎年 4 月にリリースする計画ですが、 | |
480 | 正しくリリースすることがカレンダー日付に厳格にこだわるよりも重要なので、 | |
481 | リリース日はやや柔軟です。 | |
482 | 歴史上のリリース日は L<http://www.cpan.org/src/README.html> で見られます。 | |
483 | ||
484 | ||
485 | =begin original | |
486 | ||
487 | Even numbered minor versions (5.14, 5.16, 5.18) are production versions, and | |
488 | odd numbered minor versions (5.15, 5.17, 5.19) are development versions. Unless | |
489 | you want to try out an experimental feature, you probably never want to install | |
490 | a development version of Perl. | |
491 | ||
492 | =end original | |
493 | ||
494 | 偶数のマイナーバージョン (5.14, 5.16, 5.18) は製品版バージョンで、 | |
495 | 偶数のマイナーバージョン (5.15, 5.17, 5.19) は開発版バージョンです。 | |
496 | 実験的な機能を試したいのでないかぎり、おそらく決して Perl の開発版を | |
497 | インストールしようとしない方がよいでしょう。 | |
498 | ||
499 | =begin original | |
500 | ||
501 | The Perl development team are called Perl 5 Porters, and their | |
502 | organization is described at L<http://perldoc.perl.org/perlpolicy.html>. | |
503 | The organizational rules really just boil down to one: Larry is always | |
504 | right, even when he was wrong. | |
505 | ||
506 | =end original | |
507 | ||
508 | Perl 開発チームは Perl 5 Porters と呼ばれ、その組織は | |
509 | L<http://perldoc.perl.org/perlpolicy.html> に記述されています。 | |
510 | 組織の規則は要約するとただ一つです: Larry は常に正しいです; | |
511 | たとえ以前は間違っていてもです。 | |
512 | ||
513 | 359 | =head2 Is Perl difficult to learn? |
514 | 360 | |
515 | (Perl | |
361 | (Perlは学ぶのが難しいのでしょうか?) | |
516 | 362 | |
517 | 363 | =begin original |
518 | 364 | |
519 | No, Perl is easy to start | |
365 | No, Perl is easy to start learning--and easy to keep learning. It looks | |
520 | 366 | like most programming languages you're likely to have experience |
521 | 367 | with, so if you've ever written a C program, an awk script, a shell |
522 | 368 | script, or even a BASIC program, you're already partway there. |
523 | 369 | |
524 | 370 | =end original |
525 | 371 | |
526 | いいえ | |
372 | いいえ。Perlは学び始めるのが容易で -- しかも学び続けるのが容易なのです。 | |
527 | ||
373 | Perlはあなたが(たぶん)慣れ親しんできたたいていのプログラミング | |
528 | ||
374 | 言語のように見えます。ですから、C プログラムを、awk スクリプトを、 | |
529 | ||
375 | シェルスクリプトを、はたまたBASICのプログラムであろうと書いたことがあるのなら、 | |
530 | ||
376 | 既に習得の途上にあるわけです。 | |
531 | あるのなら、既に習得の途上にあるわけです。 | |
532 | 377 | |
533 | 378 | =begin original |
534 | 379 | |
535 | Most tasks only require a small subset of the Perl language. One of | |
380 | Most tasks only require a small subset of the Perl language. One of | |
536 | 381 | the guiding mottos for Perl development is "there's more than one way |
537 | to do it" (TMTOWTDI, sometimes pronounced "tim toady"). Perl's | |
382 | to do it" (TMTOWTDI, sometimes pronounced "tim toady"). Perl's | |
538 | 383 | learning curve is therefore shallow (easy to learn) and long (there's |
539 | 384 | a whole lot you can do if you really want). |
540 | 385 | |
541 | 386 | =end original |
542 | 387 | |
543 | 388 | たいていのタスクは Perl 言語の小さなサブセットを要求するだけです。 |
544 | Perl | |
389 | Perlの開発における指導的モットーのひとつは、「それを行うやり方は | |
545 | 390 | 一つではない」("there's more than one way to do it)というもので |
546 | す(TMTOWTDI、時々"tim toady"と発音される)。 | |
391 | す(TMTOWTDI、時々"tim toady"と発音される)。それ故、Perl の習得曲線は浅く | |
547 | それ故、Perl の習得曲線は浅く | |
548 | 392 | (学びやすく)長い(もしほんとうに望むのならできることは山ほどある)のです。 |
549 | 393 | |
550 | 394 | =begin original |
551 | 395 | |
552 | 396 | Finally, because Perl is frequently (but not always, and certainly not by |
553 | 397 | definition) an interpreted language, you can write your programs and test |
554 | 398 | them without an intermediate compilation step, allowing you to experiment |
555 | and test/debug quickly and easily. This ease of experimentation flattens | |
399 | and test/debug quickly and easily. This ease of experimentation flattens | |
556 | 400 | the learning curve even more. |
557 | 401 | |
558 | 402 | =end original |
559 | 403 | |
560 | 最後に、Perl はしばしば(しかし常に、ではありません | |
404 | 最後に、Perl はしばしば(しかし常に、ではありません。定義によります) | |
561 | 言われるようにインタープリター型言語です | |
405 | 言われるようにインタープリター型言語です。つまり、プログラムを書いたら、 | |
562 | 406 | 中間コンパイルステップに入らずそのままテストでき、実験や、 |
563 | 407 | テスト/デバッグをすばやく、かつ容易に行なえるようにしてくれるわけです。 |
564 | 408 | この実験の容易さが、よりいっそう習得曲線を平らにします |
565 | 409 | |
566 | 410 | =begin original |
567 | 411 | |
568 | 412 | Things that make Perl easier to learn: Unix experience, almost any kind |
569 | 413 | of programming experience, an understanding of regular expressions, and |
570 | the ability to understand other people's code. If there's something you | |
414 | the ability to understand other people's code. If there's something you | |
571 | 415 | need to do, then it's probably already been done, and a working example is |
572 | usually available for free. Don't forget | |
416 | usually available for free. Don't forget the new perl modules, either. | |
573 | They're discussed in Part 3 of this FAQ, along with | |
417 | They're discussed in Part 3 of this FAQ, along with CPAN, which is | |
574 | 418 | discussed in Part 2. |
575 | 419 | |
576 | 420 | =end original |
577 | 421 | |
578 | 422 | Perl をより学びやすくするもの: UNIX の経験、ほとんどあらゆる種類の |
579 | 423 | プログラミング経験、正規表現の理解、そして他の人のコードを理解する力。 |
580 | 424 | あなたが何か行う必要がある場合、たぶんそれは行われており、 |
581 | 通常その仕事の事例はフリーで利用することができます。 | |
425 | 通常その仕事の事例はフリーで利用することができます。新しい perl モジュールも | |
582 | ||
426 | 忘れてはなりません。それらは二章で議論されている CPAN と共に、 | |
583 | それらは二章で議論されている L<CPAN|http://www.cpan.org/> と共に、 | |
584 | 427 | この FAQ の三章で議論されています。 |
585 | 428 | |
586 | 429 | =head2 How does Perl compare with other languages like Java, Python, REXX, Scheme, or Tcl? |
587 | 430 | |
588 | 431 | (Java, Python, REXX, Scheme, Tcl といった他の言語と比べて Perl はどうなんでしょうか?) |
589 | 432 | |
590 | 433 | =begin original |
591 | 434 | |
592 | ||
435 | Favorably in some areas, unfavorably in others. Precisely which areas | |
593 | ||
436 | are good and bad is often a personal choice, so asking this question | |
594 | ||
437 | on Usenet runs a strong risk of starting an unproductive Holy War. | |
595 | precisely which areas are good and bad is often a personal choice. | |
596 | 438 | |
597 | 439 | =end original |
598 | 440 | |
599 | ||
441 | いくつかの領域では優っていて、不利な部分もあるというところでしょう。 | |
600 | ||
442 | 正確には、どの領域で有利でどの領域が不利かということは、個々人の好みの問題です。 | |
601 | ||
443 | ですから、この質問を Usenet で尋ねるのは非生産的な | |
602 | ||
444 | 聖戦を始めるという大きなリスクを伴います。 | |
603 | どの分野が悪いかはしばしば個人の選択です。 | |
604 | 445 | |
605 | 446 | =begin original |
606 | 447 | |
607 | ||
448 | Probably the best thing to do is try to write equivalent code to do a | |
608 | ||
449 | set of tasks. These languages have their own newsgroups in which you | |
609 | an | |
450 | can learn about (but hopefully not argue about) them. | |
610 | 451 | |
611 | 452 | =end original |
612 | 453 | |
613 | ||
454 | たぶん最も良い方法は、等価な仕事をするひとそろいのコードを書いてみることです。 | |
614 | ||
455 | これらの言語とも、それらについて(願わくば言い争うためでなく) | |
615 | ||
456 | 習うためのニュースグループを持っています。 | |
616 | 457 | |
617 | 458 | =begin original |
618 | 459 | |
619 | ||
460 | Some comparison documents can be found at http://language.perl.com/versus/ | |
620 | ||
461 | if you really can't stop yourself. | |
621 | to use all the L<resources|http://www.cpan.org/> of each language, | |
622 | as a language is far more than just it's syntax. | |
623 | 462 | |
624 | 463 | =end original |
625 | 464 | |
626 | ||
465 | どうしても、というのなら http://language.perl.com/versus/ に | |
627 | ||
466 | 比較を行ったドキュメントが幾つかあります。 | |
628 | 全ての L<リソース|http://www.cpan.org/> が使えることを確認するのがしばしば | |
629 | 最良の方法です。 | |
630 | 467 | |
631 | 468 | =head2 Can I do [task] in Perl? |
632 | 469 | |
633 | (Perl | |
470 | (Perlで○○を行えますか?) | |
634 | 471 | |
635 | 472 | =begin original |
636 | 473 | |
637 | 474 | Perl is flexible and extensible enough for you to use on virtually any |
638 | 475 | task, from one-line file-processing tasks to large, elaborate systems. |
639 | ||
640 | =end original | |
641 | ||
642 | Perl は、オンラインのファイル処理タスクから複雑なシステムまでほとんど | |
643 | 全てのタスクで使うのに十分な柔軟性があり、高い拡張性を持っています。 | |
644 | ||
645 | =begin original | |
646 | ||
647 | 476 | For many people, Perl serves as a great replacement for shell scripting. |
648 | 477 | For others, it serves as a convenient, high-level replacement for most of |
649 | what they'd program in low-level languages like C or C++. It's ultimately | |
478 | what they'd program in low-level languages like C or C++. It's ultimately | |
650 | 479 | up to you (and possibly your management) which tasks you'll use Perl |
651 | 480 | for and which you won't. |
652 | 481 | |
653 | 482 | =end original |
654 | 483 | |
484 | Perlは、オンラインのファイル処理タスクから複雑なシステムまでほとんど | |
485 | 全てのタスクで使うのに十分な柔軟性があり、高い拡張性を持っています。 | |
655 | 486 | 多くの人々にとっては、Perl はシェルスクリプティングに対する |
656 | 偉大な代用品として仕えます。 | |
487 | 偉大な代用品として仕えます。他の人々にとっては、C やC++ のような | |
657 | ||
488 | 低水準言語でプログラムしてきた大半のものに対する、便利で高水準な | |
658 | ||
489 | 代用品として仕えます。最終的には Perl をどのタスクに使ってどれに | |
659 | 最終的には Perl をどのタスクに使ってどれに | |
660 | 490 | 使わないかはあなた(そしてたぶんあなたの管理)によります。 |
661 | 491 | |
662 | 492 | =begin original |
663 | 493 | |
664 | 494 | If you have a library that provides an API, you can make any component |
665 | 495 | of it available as just another Perl function or variable using a Perl |
666 | 496 | extension written in C or C++ and dynamically linked into your main |
667 | perl interpreter. You can also go the other direction, and write your | |
497 | perl interpreter. You can also go the other direction, and write your | |
668 | 498 | main program in C or C++, and then link in some Perl code on the fly, |
669 | to create a powerful application. See L<perlembed>. | |
499 | to create a powerful application. See L<perlembed>. | |
670 | 500 | |
671 | 501 | =end original |
672 | 502 | |
673 | 503 | API を提供するライブラリがあれば、そこにあるコンポーネントをみんな、 |
674 | ちょうどもうひとつの Perl 関数として、あるいは | |
504 | ちょうどもうひとつの Perl 関数として、あるいはC やC++ で書かれ、 | |
675 | 505 | 主要な perl インタープリタにダイナミックリンクされた Perl エクステンションを |
676 | 使った変数として、利用することができます。 | |
506 | 使った変数として、利用することができます。また、他の方向に行って、 | |
677 | ||
507 | 強力なアプリケーションを制作するために、主要なプログラムを | |
678 | ||
508 | C や C++ で書いて、それをそのままちょっとした Perl コードにリンクさせることも | |
679 | ||
509 | 可能です。L<perlembed> を参照してください。 | |
680 | L<perlembed> を参照してください。 | |
681 | 510 | |
682 | 511 | =begin original |
683 | 512 | |
684 | 513 | That said, there will always be small, focused, special-purpose |
685 | 514 | languages dedicated to a specific problem domain that are simply more |
686 | convenient for certain kinds of problems. Perl tries to be all things | |
515 | convenient for certain kinds of problems. Perl tries to be all things | |
687 | to all people, but nothing special to anyone. Examples of specialized | |
516 | to all people, but nothing special to anyone. Examples of specialized | |
688 | 517 | languages that come to mind include prolog and matlab. |
689 | 518 | |
690 | 519 | =end original |
691 | 520 | |
692 | 521 | ある種の問題に対しては単により便利で、特定の問題領域専用の、小型で、 |
693 | 522 | 集約された、特別な目的を持った言語は常にあるものだと言われています。 |
694 | 523 | Perl はあらゆる人に対してあらゆるものであろうとしていますが、 |
695 | 誰かに対する何か特別なものではありません。 | |
524 | 誰かに対する何か特別なものではありません。特化した言語の例としては | |
696 | ||
525 | prolog と matlab が思い浮かんできます。 | |
697 | 526 | |
698 | 527 | =head2 When shouldn't I program in Perl? |
699 | 528 | |
700 | 529 | (Perl でプログラムするべきではないのはどういう場合ですか?) |
701 | 530 | |
702 | 531 | =begin original |
703 | 532 | |
704 | ||
533 | When your manager forbids it--but do consider replacing them :-). | |
534 | ||
535 | =end original | |
536 | ||
537 | あなたのマネージャがそれを禁じた時です -- しかし、マネージャー達を | |
538 | 交代させることを熟考して下さい :-)。 | |
539 | ||
540 | =begin original | |
541 | ||
542 | Actually, one good reason is when you already have an existing | |
705 | 543 | application written in another language that's all done (and done |
706 | 544 | well), or you have an application language specifically designed for a |
707 | 545 | certain task (e.g. prolog, make). |
708 | 546 | |
709 | 547 | =end original |
710 | 548 | |
711 | 他の言語で記述されていてすでに使われているような(さらに | |
549 | 実際には、他の言語で記述されていてすでに使われているような(さらに | |
712 | 550 | それがうまく動いている)アプリケーションがあるとか、 |
713 | 551 | ある特定のタスクのために特別にデザインされたアプリケーション言語(prolog や |
714 | 552 | make など)があるというのが理由になるでしょう。 |
715 | 553 | |
716 | 554 | =begin original |
717 | 555 | |
718 | ||
556 | For various reasons, Perl is probably not well-suited for real-time | |
719 | ||
557 | embedded systems, low-level operating systems development work like | |
720 | ||
558 | device drivers or context-switching code, complex multi-threaded | |
559 | shared-memory applications, or extremely large applications. You'll | |
560 | notice that perl is not itself written in Perl. | |
721 | 561 | |
722 | 562 | =end original |
723 | 563 | |
724 | ||
564 | 様々な理由により、Perl はリアルタイム組込みシステムとかデバイスドライバや | |
725 | ||
565 | コンテキスト切り替えなどの低レベルなオペレーティングシステムの開発作業、 | |
726 | ||
566 | 複雑なマルチスレッド、共有メモリを使ったアプリケーション、 | |
567 | 非常に大きなアプリケーションなどには向いていません。 | |
568 | あなたは perl が Perl それ自身で記述されてないということに気がつくかも知れません。 | |
727 | 569 | |
570 | =begin original | |
571 | ||
572 | The new, native-code compiler for Perl may eventually reduce the | |
573 | limitations given in the previous statement to some degree, but understand | |
574 | that Perl remains fundamentally a dynamically typed language, not | |
575 | a statically typed one. You certainly won't be chastised if you don't | |
576 | trust nuclear-plant or brain-surgery monitoring code to it. And Larry | |
577 | will sleep easier, too--Wall Street programs not withstanding. :-) | |
578 | ||
579 | =end original | |
580 | ||
581 | Perl 用の新たなネイティブコードコンパイラーは上に挙げた幾つかの弱点を | |
582 | 改善してくれるかもしれません。 | |
583 | けれども、それでも Perl は基本的には動的に型付け(dynamically typed)される | |
584 | 言語であって、静的に型付け(statically typed)される言語ではないということを | |
585 | 理解してください。 | |
586 | 原子力発電所で使うプログラムや脳外科手術モニタリングプログラムを | |
587 | 信用していないのであれば、懲らしめられることはありません。 | |
588 | そして、Larry もまた簡単に眠ってしまいます -- ウォール街は抵抗す | |
589 | るようプログラムされてはいません :-) | |
590 | ||
728 | 591 | =head2 What's the difference between "perl" and "Perl"? |
729 | 592 | |
730 | 593 | (“perl”と“Perl”の違いはなんですか?) |
731 | 594 | |
732 | 595 | =begin original |
733 | 596 | |
734 | ||
597 | One bit. Oh, you weren't talking ASCII? :-) Larry now uses "Perl" to | |
735 | ||
598 | signify the language proper and "perl" the implementation of it, | |
736 | i | |
599 | i.e. the current interpreter. Hence Tom's quip that "Nothing but perl | |
600 | can parse Perl." You may or may not choose to follow this usage. For | |
601 | example, parallelism means "awk and perl" and "Python and Perl" look | |
602 | OK, while "awk and Perl" and "Python and perl" do not. But never | |
603 | write "PERL", because perl is not an acronym, apocryphal | |
604 | folklore and post-facto expansions notwithstanding. | |
737 | 605 | |
738 | 606 | =end original |
739 | 607 | |
740 | ||
608 | 一ビット。ああ、ASCII のことを話してるんじゃないの? :-) | |
741 | ||
609 | Larry は現在“Perl”をその言語の特性を表わすために使い、 | |
742 | インタプリタ | |
610 | “perl”を言語の実装、たとえばインタープリターとして使っています。 | |
743 | ||
611 | Tom の「お言葉」では“違いはないが perl は Perl を解析できる”となります。 | |
612 | たとえば、“awkとperl”とか“PythonとPerl”といった比較は良いように | |
613 | 見えますが、“awkとPerl”とか“Pythonとperl”はそうではありません。 | |
614 | ただし、“PERL”と書いてはいけません。なぜなら、perlは何かの | |
615 | 頭字語ではないからです。 | |
616 | 実際のところは後づけのものがあるのですが。 | |
744 | 617 | |
618 | =head2 Is it a Perl program or a Perl script? | |
619 | ||
620 | (Perl プログラム、それとも Perl スクリプト?) | |
621 | ||
745 | 622 | =begin original |
746 | 623 | |
747 | ||
624 | Larry doesn't really care. He says (half in jest) that "a script is | |
748 | ||
625 | what you give the actors. A program is what you give the audience." | |
749 | 626 | |
750 | 627 | =end original |
751 | 628 | |
752 | ||
629 | Larry は気にしてはいません。冗談交じりに彼がいうには、 | |
753 | ||
630 | “スクリプト(台本)はあなたを俳優にするもの。プログラムはあなたを | |
754 | ||
631 | 観衆にするもの”ということです。 | |
755 | 632 | |
756 | = | |
633 | =begin original | |
757 | 634 | |
758 | ||
635 | Originally, a script was a canned sequence of normally interactive | |
636 | commands--that is, a chat script. Something like a UUCP or PPP chat | |
637 | script or an expect script fits the bill nicely, as do configuration | |
638 | scripts run by a program at its start up, such F<.cshrc> or F<.ircrc>, | |
639 | for example. Chat scripts were just drivers for existing programs, | |
640 | not stand-alone programs in their own right. | |
759 | 641 | |
642 | =end original | |
643 | ||
644 | 元々は、スクリプトとはチャットスクリプトのように、 | |
645 | 通常の対話コマンドの羅列でした。 | |
646 | uucp とか ppp のチャットスクリプト、あるいは F<.cshrc> や F<.ircrc> のような | |
647 | プログラムのスタートアップスクリプトがそうです。 | |
648 | チャットスクリプトは既にあるプログラムを | |
649 | 取り扱うためのドライバであり、独立したプログラムではありません。 | |
650 | ||
760 | 651 | =begin original |
761 | 652 | |
762 | ||
653 | A computer scientist will correctly explain that all programs are | |
654 | interpreted and that the only question is at what level. But if you | |
655 | ask this question of someone who isn't a computer scientist, they might | |
656 | tell you that a I<program> has been compiled to physical machine code | |
657 | once and can then be run multiple times, whereas a I<script> must be | |
658 | translated by a program each time it's used. | |
763 | 659 | |
764 | 660 | =end original |
765 | 661 | |
766 | ||
662 | コンピュータ科学者は全てのプログラムが解釈されることを正しく | |
663 | 説明しようとするでしょう。 | |
664 | しかしもしあなたがコンピュータ科学者ではない人にこの質問をしたならば、 | |
665 | 彼らはI<プログラム>は物理的なマシンコードに一度コンパイルされて | |
666 | 何度もそれを実行することができるのに対して、I<スクリプト>は | |
667 | 使われる度毎に変換されるという回答をするかもしれません。 | |
767 | 668 | |
768 | 669 | =begin original |
769 | 670 | |
770 | ||
671 | Perl programs are (usually) neither strictly compiled nor strictly | |
771 | t | |
672 | interpreted. They can be compiled to a byte-code form (something of a | |
772 | ||
673 | Perl virtual machine) or to completely different languages, like C or | |
773 | s | |
674 | assembly language. You can't tell just by looking at it whether the | |
675 | source is destined for a pure interpreter, a parse-tree interpreter, | |
676 | a byte-code interpreter, or a native-code compiler, so it's hard to give | |
677 | a definitive answer here. | |
774 | 678 | |
775 | 679 | =end original |
776 | 680 | |
777 | ||
681 | Perl プログラムは、通常は厳密な意味においてコンパイルされるということはなく、 | |
778 | ||
682 | さらに厳密な意味において解釈(interpret)されることもありません。 | |
779 | ||
683 | Perl プログラムはバイトコード形式(Perl の仮想機械に対するもの)へ | |
780 | ||
684 | 翻訳することができますし、あるいは C だとかアセンブラのような完全に別な言語へ | |
781 | ||
685 | 翻訳することもできます。 | |
686 | あなたはソースコードが純粋なインタープリターのためにデザインされたのか、 | |
687 | parse-tree インタープリターのためにデザインされたのか、バイトコード | |
688 | インタープリターのためにデザインされたのか、 | |
689 | あるいはネイティブコードコンパイラーのためにデザインされたのかという区別を | |
690 | その外見から判断することはできません。 | |
691 | ですから、ここでこの質問に完璧に答えるのは難しいのです。 | |
782 | 692 | |
783 | print "Just another Perl hacker,"; | |
784 | ||
785 | 693 | =begin original |
786 | 694 | |
787 | ||
695 | Now that "script" and "scripting" are terms that have been seized by | |
788 | ||
696 | unscrupulous or unknowing marketeers for their own nefarious purposes, | |
789 | ||
697 | they have begun to take on strange and often pejorative meanings, | |
790 | ||
698 | like "non serious" or "not real programming". Consequently, some Perl | |
699 | programmers prefer to avoid them altogether. | |
791 | 700 | |
792 | 701 | =end original |
793 | 702 | |
794 | ||
703 | 今では"script"や"scripting"というのは、 | |
795 | ||
704 | 悪徳な目的のために無遠慮な、あるいは無知な商人に捕らえられてしまった用語です。 | |
796 | ||
705 | これらは "non serious" や "not real programming" と同様、 | |
706 | 不思議でしばしば軽蔑的な意味を持ち始めています。 | |
707 | そのようなわけで、これらの単語を使わないようにしている Perl プログラマもいます。 | |
797 | 708 | |
709 | =head2 What is a JAPH? | |
710 | ||
711 | (JAPHってなんですか?) | |
712 | ||
798 | 713 | =begin original |
799 | 714 | |
800 | ||
715 | These are the "just another perl hacker" signatures that some people | |
716 | sign their postings with. Randal Schwartz made these famous. About | |
717 | 100 of the earlier ones are available from | |
718 | http://www.cpan.org/misc/japh . | |
801 | 719 | |
802 | 720 | =end original |
803 | 721 | |
804 | ||
722 | 何人かの人が自分の投稿に“just another perl hacker”というシグネチャーを | |
805 | ||
723 | つかっていました。なかでもRandal Schwartzのものが有名です。 | |
724 | 初期のものから百個ばかりが | |
725 | http://www.cpan.org/misc/japh | |
726 | から入手できます。 | |
806 | 727 | |
807 | =head2 | |
728 | =head2 Where can I get a list of Larry Wall witticisms? | |
808 | 729 | |
809 | ( | |
730 | (Larry Wallの「お言葉」(witticisms)はどこで手に入れられますか?) | |
810 | 731 | |
811 | 732 | =begin original |
812 | 733 | |
813 | ||
734 | Over a hundred quips by Larry, from postings of his or source code, | |
735 | can be found at http://www.cpan.org/misc/lwall-quotes.txt.gz . | |
814 | 736 | |
815 | 737 | =end original |
816 | 738 | |
817 | ||
739 | 投稿されたものとか、ソースコードにあった百個以上のLarryの「お言葉」が | |
740 | http://www.cpan.org/misc/lwall-quotes.txt.gz | |
741 | で見つけられます。 | |
818 | 742 | |
743 | =head2 How can I convince my sysadmin/supervisor/employees to use version 5/5.6.1/Perl instead of some other language? | |
744 | ||
745 | (私に関係するシステム管理者や、雇っている人々に、どうすれば他の言語ではなく Perl/Perl 5/Perl 5.6.1 を使うように説得できるでしょうか?) | |
746 | ||
819 | 747 | =begin original |
820 | 748 | |
821 | ||
749 | If your manager or employees are wary of unsupported software, or | |
822 | ||
750 | software which doesn't officially ship with your operating system, you | |
823 | might | |
751 | might try to appeal to their self-interest. If programmers can be | |
824 | or | |
752 | more productive using and utilizing Perl constructs, functionality, | |
753 | simplicity, and power, then the typical manager/supervisor/employee | |
754 | may be persuaded. Regarding using Perl in general, it's also | |
755 | sometimes helpful to point out that delivery times may be reduced | |
756 | using Perl compared to other languages. | |
825 | 757 | |
826 | 758 | =end original |
827 | 759 | |
828 | ||
760 | あなたのマネージャであるとかあなたが雇っている人々が、 | |
829 | ||
761 | サポートされていないソフトウェアやあなたの使っている | |
830 | ||
762 | オペレーティングシステム用に公式に出荷されていないソフトウェアに対して | |
831 | ||
763 | 用心しているというのであれば、彼ら自身の興味に訴えかけることを | |
832 | ||
764 | 試せるかもしれません。 | |
833 | ||
765 | Perl の構成であるとか、機能性、単純さ、威力を使ったり活用することによって | |
766 | プログラマーがより生産的になるのであれば、典型的な管理者(や雇っている人)などを | |
767 | 説得できるでしょう。 | |
768 | Perl の使用に関しては、同様に(Perl の使用によって)開発時間が | |
769 | 他の言語と比べたときに短縮されることが助けになることがあるかもしれません。 | |
834 | 770 | |
835 | 771 | =begin original |
836 | 772 | |
837 | I | |
773 | If you have a project which has a bottleneck, especially in terms of | |
838 | t | |
774 | translation or testing, Perl almost certainly will provide a viable, | |
839 | ||
775 | quick solution. In conjunction with any persuasion effort, you | |
840 | ||
776 | should not fail to point out that Perl is used, quite extensively, and | |
841 | i | |
777 | with extremely reliable and valuable results, at many large computer | |
842 | ||
778 | software and hardware companies throughout the world. In fact, | |
779 | many Unix vendors now ship Perl by default. Support is usually | |
780 | just a news-posting away, if you can't find the answer in the | |
781 | I<comprehensive> documentation, including this FAQ. | |
843 | 782 | |
844 | 783 | =end original |
845 | 784 | |
846 | ||
785 | もしあなたが特に変換とかテストにおいてボトルネックを抱えたプロジェクトを | |
847 | あ | |
786 | 持っているのであれば、Perl はほぼ確実に明確、かつ迅速な解決策を提供するでしょう。 | |
848 | ||
787 | なんらかの説得の努力と組み合わせて、 | |
849 | ||
788 | あなたは Perl は非常に幅広く使われていて、世界中至る所のコンピューター | |
850 | ||
789 | ソフトウェアやハードウェアの企業において非常に高い信頼と価値ある結果が | |
851 | ||
790 | あることを説明することに失敗すべきでないでしょう。 | |
852 | ||
791 | 現に、多くの UNIX ベンダーは現在デフォルトで Perl を出荷しています。 | |
853 | そして | |
792 | そしてサポートとは、あなたがこのFAQを含めて I<総合的な> ドキュメントに回答を | |
793 | 見つけることができなければ、通常は単に netnews に投稿することです。 | |
854 | 794 | |
855 | 795 | =begin original |
856 | 796 | |
857 | ||
797 | See http://www.perl.org/advocacy/ for more information. | |
858 | available and several popular operating systems come with Perl. Community | |
859 | support in places such as Perlmonks ( L<http://www.perlmonks.com> ) | |
860 | and the various Perl mailing lists ( L<http://lists.perl.org> ) means that | |
861 | you can usually get quick answers to your problems. | |
862 | 798 | |
863 | 799 | =end original |
864 | 800 | |
865 | ||
801 | 詳しい情報は http://www.perl.org/advocacy/ を参照してください。 | |
866 | 利用でき、いくつかの有名なオペレーティングシステムは Perl を同梱しています。 | |
867 | Perlmonks ( L<http://www.perlmonks.com> ) のようにあちこちにあるコミュニティ | |
868 | サポートと、様々な Perl メーリングリスト | |
869 | ( L<http://lists.perl.org> ) によって、たいていはあなたの問題に対する素早い | |
870 | 回答を得られます。 | |
871 | 802 | |
872 | 803 | =begin original |
873 | 804 | |
874 | ||
805 | If you face reluctance to upgrading from an older version of perl, | |
875 | ||
806 | then point out that version 4 is utterly unmaintained and unsupported | |
876 | ||
807 | by the Perl Development Team. Another big sell for Perl5 is the large | |
877 | ||
808 | number of modules and extensions which greatly reduce development time | |
878 | ||
809 | for any given task. Also mention that the difference between version | |
810 | 4 and version 5 of Perl is like the difference between awk and C++. | |
811 | (Well, OK, maybe it's not quite that distinct, but you get the idea.) | |
812 | If you want support and a reasonable guarantee that what you're | |
813 | developing will continue to work in the future, then you have to run | |
814 | the supported version. As of December 2003 that means running either | |
815 | 5.8.2 (released in November 2003), or one of the older releases like | |
816 | 5.6.2 (also released in November 2003; a maintenance release to let perl | |
817 | 5.6 compile on newer systems as 5.6.1 was released in April 2001) or | |
818 | 5.005_03 (released in March 1999), | |
819 | although 5.004_05 isn't that bad if you B<absolutely> need such an old | |
820 | version (released in April 1999) for stability reasons. | |
821 | Anything older than 5.004_05 shouldn't be used. | |
879 | 822 | |
880 | 823 | =end original |
881 | 824 | |
882 | ||
825 | もしあなたが、古いバージョンの perl からのアップグレードに対する不平・ | |
883 | ||
826 | 不満に直面しているのであれば、(perl の)バージョン 4 はまったく | |
884 | ||
827 | 保守されていないことや、Perl 開発チームによるサポートも | |
885 | ||
828 | されていないということを指摘しましょう。 | |
886 | ||
829 | もう一つの Perl5 の大きなウリは、なんらかの仕事をするための開発時間を | |
887 | ||
830 | 大きく削減するようなモジュールやエクステンションが数多くあるということでしょう。 | |
888 | ||
831 | 同様に、Perl のバージョン 4 と 5 との間の違いはawkとC++との間にある違い | |
889 | あ | |
832 | (うん、まあそんなには違ってないんだろうけどでも趣旨はわかるでしょ?)くらい | |
833 | 大きいということに言及しましょう。 | |
834 | もしあなたが将来に渡り開発し続けているものに対してのサポートや現実的な | |
835 | 利益というものを欲しているのであれば、サポートされているバージョンを | |
836 | 使うべきでしょう。 | |
837 | 2003 年 12 月の時点では、これはリリース 5.8.2 (2003 年 11 月リリース)か | |
838 | リリース 5.6.2 (これも2003 年 11 月リリース; | |
839 | 2001 年 4 月リリースのリリース 5.6.1 より新しいシステムで 5.6 をコンパイルするための | |
840 | メンテナンスリリース)か | |
841 | 5.005_03(1999 年 3 月リリース)といった古いバージョンのひとつのことを意味しますが、 | |
842 | もしB<どうしても>安定性のために古いバージョンが必要なら、 | |
843 | 5.004_05(1999 年 4 月リリース)でもそう悪くはありません。 | |
844 | 5.004_05 より古いものは使うべきではありません。 | |
890 | 845 | |
891 | 846 | =begin original |
892 | 847 | |
893 | ||
848 | Of particular note is the massive bug hunt for buffer overflow | |
849 | problems that went into the 5.004 release. All releases prior to | |
850 | that, including perl4, are considered insecure and should be upgraded | |
851 | as soon as possible. | |
894 | 852 | |
895 | 853 | =end original |
896 | 854 | |
897 | ||
855 | 注意すべきことがらとして、5.004 に至るまでバッファーオーバーフローの | |
856 | 可能性がありました。 | |
857 | Perl4 も含めてこれ以前の全てのリリースは安全性に問題があります。 | |
858 | 速やかにバージョンアップすべきです。 | |
898 | 859 | |
899 | = | |
860 | =begin original | |
900 | 861 | |
901 | ||
862 | In August 2000 in all Linux distributions a new security problem was | |
863 | found in the optional 'suidperl' (not built or installed by default) | |
864 | in all the Perl branches 5.6, 5.005, and 5.004, see | |
865 | http://www.cpan.org/src/5.0/sperl-2000-08-05/ | |
866 | Perl maintenance releases 5.6.1 and 5.8.0 have this security hole closed. | |
867 | Most, if not all, Linux distribution have patches for this | |
868 | vulnerability available, see http://www.linuxsecurity.com/advisories/ , | |
869 | but the most recommendable way is to upgrade to at least Perl 5.6.1. | |
902 | 870 | |
903 | = | |
871 | =end original | |
904 | 872 | |
905 | ||
873 | 2000 年 8 月に、全ての Linux ディストリビューションは Perl 5.6, 5.005, 5.004 に | |
874 | 含まれる、オプションの 'suidperl' (デフォルトではビルドやインストールは | |
875 | されません) に新しいセキュリティ問題があるのを発見しました。 | |
876 | http://www.cpan.org/src/5.0/sperl-2000-08-05/ | |
877 | を参照してください。 | |
878 | Perl のメンテナンスリリースである 5.6.1 と 5.8.0 ではこのセキュリティホールは | |
879 | 修正されています。全てではないものの、ほとんどの Linux ディストリビューションでは | |
880 | この脆弱性のためのパッチを用意しています。 | |
881 | http://www.linuxsecurity.com/advisories/ を参照して下さい。 | |
882 | しかし、もっとも推奨されるのは少なくとも 5.6.1 にアップグレードすることです。 | |
906 | 883 | |
907 | 884 | =head1 AUTHOR AND COPYRIGHT |
908 | 885 | |
909 | Copyright (c) 1997 | |
886 | Copyright (c) 1997, 1998, 1999, 2000, 2001 Tom Christiansen and Nathan | |
910 | o | |
887 | Torkington. All rights reserved. | |
911 | 888 | |
912 | 889 | This documentation is free; you can redistribute it and/or modify it |
913 | 890 | under the same terms as Perl itself. |
914 | 891 | |
915 | 892 | Irrespective of its distribution, all code examples here are in the public |
916 | domain. You are permitted and encouraged to use this code and any | |
893 | domain. You are permitted and encouraged to use this code and any | |
917 | 894 | derivatives thereof in your own programs for fun or for profit as you |
918 | see fit. A simple comment in the code giving credit to the FAQ would | |
895 | see fit. A simple comment in the code giving credit to the FAQ would | |
919 | 896 | be courteous but is not required. |
920 | ||
921 | =begin meta | |
922 | ||
923 | Translate: 吉村 寿人 <JAE00534@niftyserve.or.jp> | |
924 | Update: SHIRAKATA Kentaro <argrath@ub32.org> (5.6.1-5.14.1, 5.00150039) | |
925 | Status: completed | |
926 | ||
927 | =end meta |