5.14.1
Other versions:
5.12.1
5.10.1

名前

perlhack - How to hack on Perl

perlhack - Perl をハックする方法

説明

This document explains how Perl development works. It includes details about the Perl 5 Porters email list, the Perl repository, the Perlbug bug tracker, patch guidelines, and commentary on Perl development philosophy.

This document explains how Perl development works. It includes details about the Perl 5 Porters email list, the Perl repository, the Perlbug bug tracker, patch guidelines, and commentary on Perl development philosophy. (TBT)

SUPER QUICK PATCH GUIDE

If you just want to submit a single small patch like a pod fix, a test for a bug, comment fixes, etc., it's easy! Here's how:

If you just want to submit a single small patch like a pod fix, a test for a bug, comment fixes, etc., it's easy! Here's how: (TBT)

  • Check out the source repository

    The perl source is in a git repository. You can clone the repository with the following command:

    The perl source is in a git repository. You can clone the repository with the following command: (TBT)

      % git clone git://perl5.git.perl.org/perl.git perl
  • Make your change

    Hack, hack, hack.

    Hack, hack, hack. (TBT)

  • Test your change

    You can run all the tests with the following commands:

    You can run all the tests with the following commands: (TBT)

      % ./Configure -des -Dusedevel
      % make test

    Keep hacking until the tests pass.

    Keep hacking until the tests pass. (TBT)

  • Commit your change

    Committing your work will save the change on your local system:

    Committing your work will save the change on your local system: (TBT)

      % git commit -a -m 'Commit message goes here'

    Make sure the commit message describes your change in a single sentence. For example, "Fixed spelling errors in perlhack.pod".

    Make sure the commit message describes your change in a single sentence. For example, "Fixed spelling errors in perlhack.pod". (TBT)

  • Send your change to perlbug

    The next step is to submit your patch to the Perl core ticket system via email.

    The next step is to submit your patch to the Perl core ticket system via email. (TBT)

    Assuming your patch consists of a single git commit, you can send it to perlbug with this command line:

    Assuming your patch consists of a single git commit, you can send it to perlbug with this command line: (TBT)

      % git format-patch HEAD^1..HEAD
      % perlbug -s '[PATCH] `git log --pretty=format:%s HEAD^1..HEAD`' -f 0001-*.patch

    The perlbug program will ask you a few questions about your email address and the patch you're submitting. Once you've answered them you can submit your patch.

    The perlbug program will ask you a few questions about your email address and the patch you're submitting. Once you've answered them you can submit your patch. (TBT)

  • Thank you

    The porters appreciate the time you spent helping to make Perl better. Thank you!

    The porters appreciate the time you spent helping to make Perl better. Thank you! (TBT)

BUG REPORTING

If you want to report a bug in Perl, you must use the perlbug command line tool. This tool will ensure that your bug report includes all the relevant system and configuration information.

If you want to report a bug in Perl, you must use the perlbug command line tool. This tool will ensure that your bug report includes all the relevant system and configuration information. (TBT)

To browse existing Perl bugs and patches, you can use the web interface at http://rt.perl.org/.

To browse existing Perl bugs and patches, you can use the web interface at http://rt.perl.org/. (TBT)

Please check the archive of the perl5-porters list (see below) and/or the bug tracking system before submitting a bug report. Often, you'll find that the bug has been reported already.

Please check the archive of the perl5-porters list (see below) and/or the bug tracking system before submitting a bug report. Often, you'll find that the bug has been reported already. (TBT)

You can log in to the bug tracking system and comment on existing bug reports. If you have additional information regarding an existing bug, please add it. This will help the porters fix the bug.

You can log in to the bug tracking system and comment on existing bug reports. If you have additional information regarding an existing bug, please add it. This will help the porters fix the bug. (TBT)

PERL 5 PORTERS

The perl5-porters (p5p) mailing list is where the Perl standard distribution is maintained and developed. The people who maintain Perl are also referred to as the "Perl 5 Porters", or just the "porters".

The perl5-porters (p5p) mailing list is where the Perl standard distribution is maintained and developed. The people who maintain Perl are also referred to as the "Perl 5 Porters", or just the "porters". (TBT)

A searchable archive of the list is available at http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/. There is also another archive at http://archive.develooper.com/perl5-porters@perl.org/.

A searchable archive of the list is available at http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/. There is also another archive at http://archive.develooper.com/perl5-porters@perl.org/. (TBT)

perl-changes mailing list

The perl5-changes mailing list receives a copy of each patch that gets submitted to the maintenance and development branches of the perl repository. See http://lists.perl.org/list/perl5-changes.html for subscription and archive information.

The perl5-changes mailing list receives a copy of each patch that gets submitted to the maintenance and development branches of the perl repository. See http://lists.perl.org/list/perl5-changes.html for subscription and archive information. (TBT)

GETTING THE PERL SOURCE

All of Perl's source code is kept centrally in a Git repository at perl5.git.perl.org. The repository contains many Perl revisions from Perl 1 onwards and all the revisions from Perforce, the previous version control system.

Perlのソースコードはすべて、perl5.git.perl.org の Git リポジトリに 集中管理されています。 このリポジトリには、Perl 1 以降の多くの Perl リビジョンと、 以前使用していたバージョン管理システムである Perforce のすべての リビジョンが含まれています。

For much more detail on using git with the Perl repository, please see perlgit.

For much more detail on using git with the Perl repository, please see perlgit. (TBT)

Git 経由の読み込みアクセス

You will need a copy of Git for your computer. You can fetch a copy of the repository using the git protocol:

あなたのコンピュータ用の Git が必要です。 git プロトコルを使用して、リポジトリのコピーを フェッチできます。

  % git clone git://perl5.git.perl.org/perl.git perl

This clones the repository and makes a local copy in the perl directory.

これにより、リポジトリが複製され、perl ディレクトリに ローカルコピーが作成されます。

If you cannot use the git protocol for firewall reasons, you can also clone via http, though this is much slower:

ファイアウォールの関係で git プロトコルが使えない場合、 http 経由でもクローンできますが、はるかに遅いです:

  % git clone http://perl5.git.perl.org/perl.git perl

Web 経由の読み込みアクセス

You may access the repository over the web. This allows you to browse the tree, see recent commits, subscribe to RSS feeds for the changes, search for particular commits and more. You may access it at http://perl5.git.perl.org/perl.git. A mirror of the repository is found at http://github.com/mirrors/perl.

Web 経由でリポジトリにアクセスできます。 これにより、ツリーの参照、最近のコミットの表示、変更の RSS フィードの購読、 特定のコミットの検索などが可能になります。 次の場所からアクセスできます: http://perl5.git.perl.org/perl.git. リポジトリのミラーは以下にあります found at http://github.com/mirrors/perl.

Read access via rsync

You can also choose to use rsync to get a copy of the current source tree for the bleadperl branch and all maintenance branches:

You can also choose to use rsync to get a copy of the current source tree for the bleadperl branch and all maintenance branches: (TBT)

    % rsync -avz rsync://perl5.git.perl.org/perl-current .
    % rsync -avz rsync://perl5.git.perl.org/perl-5.12.x .
    % rsync -avz rsync://perl5.git.perl.org/perl-5.10.x .
    % rsync -avz rsync://perl5.git.perl.org/perl-5.8.x .
    % rsync -avz rsync://perl5.git.perl.org/perl-5.6.x .
    % rsync -avz rsync://perl5.git.perl.org/perl-5.005xx .

(Add the --delete option to remove leftover files.)

(Add the --delete option to remove leftover files.) (TBT)

To get a full list of the available sync points:

To get a full list of the available sync points: (TBT)

    % rsync perl5.git.perl.org::

Write access via git

If you have a commit bit, please see perlgit for more details on using git.

If you have a commit bit, please see perlgit for more details on using git. (TBT)

PATCHING PERL

If you're planning to do more extensive work than a single small fix, we encourage you to read the documentation below. This will help you focus your work and make your patches easier to incorporate into the Perl source.

If you're planning to do more extensive work than a single small fix, we encourage you to read the documentation below. This will help you focus your work and make your patches easier to incorporate into the Perl source. (TBT)

Submitting patches

If you have a small patch to submit, please submit it via perlbug. You can also send email directly to perlbug@perl.org. Please note that messages sent to perlbug may be held in a moderation queue, so you won't receive a response immediately.

If you have a small patch to submit, please submit it via perlbug. You can also send email directly to perlbug@perl.org. Please note that messages sent to perlbug may be held in a moderation queue, so you won't receive a response immediately. (TBT)

You'll know your submission has been processed when you receive an email from our ticket tracking system. This email will give you a ticket number. Once your patch has made it to the ticket tracking system, it will also be sent to the perl5-porters@perl.org list.

You'll know your submission has been processed when you receive an email from our ticket tracking system. This email will give you a ticket number. Once your patch has made it to the ticket tracking system, it will also be sent to the perl5-porters@perl.org list. (TBT)

Patches are reviewed and discussed on the p5p list. Simple, uncontroversial patches will usually be applied without any discussion. When the patch is applied, the ticket will be updated and you will receive email. In addition, an email will be sent to the p5p list.

Patches are reviewed and discussed on the p5p list. Simple, uncontroversial patches will usually be applied without any discussion. When the patch is applied, the ticket will be updated and you will receive email. In addition, an email will be sent to the p5p list. (TBT)

In other cases, the patch will need more work or discussion. That will happen on the p5p list.

In other cases, the patch will need more work or discussion. That will happen on the p5p list. (TBT)

You are encouraged to participate in the discussion and advocate for your patch. Sometimes your patch may get lost in the shuffle. It's appropriate to send a reminder email to p5p if no action has been taken in a month. Please remember that the Perl 5 developers are all volunteers, and be polite.

You are encouraged to participate in the discussion and advocate for your patch. Sometimes your patch may get lost in the shuffle. It's appropriate to send a reminder email to p5p if no action has been taken in a month. Please remember that the Perl 5 developers are all volunteers, and be polite. (TBT)

Changes are always applied directly to the main development branch, called "blead". Some patches may be backported to a maintenance branch. If you think your patch is appropriate for the maintenance branch, please explain why when you submit it.

Changes are always applied directly to the main development branch, called "blead". Some patches may be backported to a maintenance branch. If you think your patch is appropriate for the maintenance branch, please explain why when you submit it. (TBT)

あなたのパッチを受け入れてもらうために

If you are submitting a code patch there are several things that you can do to help the Perl 5 Porters accept your patch.

コードパッチを送信する場合は、Perl 5 Porters があなたのパッチを 受け入れるのを助けるためにできることがいくつかあります。

Patch style

If you used git to check out the Perl source, then using git format-patch will produce a patch in a style suitable for Perl. The format-patch command produces one patch file for each commit you made. If you prefer to send a single patch for all commits, you can use git diff.

If you used git to check out the Perl source, then using git format-patch will produce a patch in a style suitable for Perl. The format-patch command produces one patch file for each commit you made. If you prefer to send a single patch for all commits, you can use git diff. (TBT)

  % git co blead
  % git pull
  % git diff blead my-branch-name

This produces a patch based on the difference between blead and your current branch. It's important to make sure that blead is up to date before producing the diff, that's why we call git pull first.

This produces a patch based on the difference between blead and your current branch. It's important to make sure that blead is up to date before producing the diff, that's why we call git pull first. (TBT)

We strongly recommend that you use git if possible. It will make your life easier, and ours as well.

We strongly recommend that you use git if possible. It will make your life easier, and ours as well. (TBT)

However, if you're not using git, you can still produce a suitable patch. You'll need a pristine copy of the Perl source to diff against. The porters prefer unified diffs. Using GNU diff, you can produce a diff like this:

However, if you're not using git, you can still produce a suitable patch. You'll need a pristine copy of the Perl source to diff against. The porters prefer unified diffs. Using GNU diff, you can produce a diff like this: (TBT)

  % diff -Npurd perl.pristine perl.mine

Make sure that you make realclean in your copy of Perl to remove any build artifacts, or you may get a confusing result.

Make sure that you make realclean in your copy of Perl to remove any build artifacts, or you may get a confusing result. (TBT)

Commit message

As you craft each patch you intend to submit to the Perl core, it's important to write a good commit message. This is especially important if your submission will consist of a series of commits.

Perl コアに投稿しようとするパッチを作成する際には、 適切なコミットメッセージを作成することが重要です。 This is especially important if your submission will consist of a series of commits. (TBT)

The first line of the commit message should be a short description without a period. It should be no longer than the subject line of an email, 50 characters being a good rule of thumb.

The first line of the commit message should be a short description without a period. It should be no longer than the subject line of an email, 50 characters being a good rule of thumb. (TBT)

A lot of Git tools (Gitweb, GitHub, git log --pretty=oneline, ...) will only display the first line (cut off at 50 characters) when presenting commit summaries.

A lot of Git tools (Gitweb, GitHub, git log --pretty=oneline, ...) will only display the first line (cut off at 50 characters) when presenting commit summaries. (TBT)

The commit message should include a description of the problem that the patch corrects or new functionality that the patch adds.

コミットメッセージは、パッチによって修正される問題の説明、または パッチによって追加される新機能の説明を含む必要があります。

As a general rule of thumb, your commit message should help a programmer who knows the Perl core quickly understand what you were trying to do, how you were trying to do it, and why the change matters to Perl.

一般的な経験則として、コミットメッセージによって、Perl コアを 知っているプログラマーは、何をしようとしているのか、 どのようにしようとしているのか、そしてなぜ変更が Perl にとって 重要なのかをすぐに理解する助けになるはずです。

  • Why

    Your commit message should describe why the change you are making is important. When someone looks at your change in six months or six years, your intent should be clear.

    コミットメッセージに、 自分が行っている変更がなぜ重要なのかを記述すべきだということです。 6 ヶ月や6 年後に誰かがあなたの変更を見たとき、 あなたの意図は明確であるべきです。

    If you're deprecating a feature with the intent of later simplifying another bit of code, say so. If you're fixing a performance problem or adding a new feature to support some other bit of the core, mention that.

    後で別のコードを単純化するために機能を非推奨にしているのであれば、 そう書いてください。 パフォーマンスの問題を修正したり、コアの他の部分をサポートするための 新機能を追加しているのであれば、そのことに言及してください。

  • What

    Your commit message should describe what part of the Perl core you're changing and what you expect your patch to do.

    コミットメッセージには、Perlコアのどの部分を変更しようとしているのか、 パッチに何を期待しているのかを記述する必要があります。

  • How

    While it's not necessary for documentation changes, new tests or trivial patches, it's often worth explaining how your change works. Even if it's clear to you today, it may not be clear to a porter next month or next year.

    文書の変更、新しいテスト、簡単なパッチなどでは必要ありませんが、 変更がどのように機能するかを説明する価値があることがよくあります。 今日ははっきりしていても、来月や来年にははっきりしないかもしれません。

A commit message isn't intended to take the place of comments in your code. Commit messages should describe the change you made, while code comments should describe the current state of the code.

コミットメッセージは、コード内のコメントに代わるものではありません。 コミットメッセージには変更内容が記述され、コードコメントにはコードの 現在の状態が記述されます。

If you've just implemented a new feature, complete with doc, tests and well-commented code, a brief commit message will often suffice. If, however, you've just changed a single character deep in the parser or lexer, you might need to write a small novel to ensure that future readers understand what you did and why you did it.

新機能を実装したばかりで、文書、テスト、コメント付きのコードが 揃っている場合は、簡単なコミットメッセージで十分なことがよくあります。 ただし、パーサや字句解析器の奥深くにある 1 文字を変更しただけの場合は、 将来の読者が自分のしたこととその理由を確実に理解できるように、 短い小説を書く必要があるかもしれません。

コメント、コメント、コメント

Be sure to adequately comment your code. While commenting every line is unnecessary, anything that takes advantage of side effects of operators, that creates changes that will be felt outside of the function being patched, or that others may find confusing should be documented. If you are going to err, it is better to err on the side of adding too many comments than too few.

コードに適切なコメントを付けるようにしてください。 すべての行にコメントを付ける必要はありませんが、演算子の副作用を利用するもの、 パッチされている関数の外部で感じられる変更を生成するもの、 または他の人が混乱を感じる可能性のあるものはすべて 文書化する必要があります。 過ちを起こす場合は、コメントの数が少なすぎる過ちよりも、 コメントの数が多すぎる過ちの方がましです。

The best comments explain why the code does what it does, not what it does.

The best comments explain why the code does what it does, not what it does. (TBT)

スタイル

In general, please follow the particular style of the code you are patching.

一般に、パッチを適用するコードは特定のスタイルに従ってください。

In particular, follow these general guidelines for patching Perl sources:

特に、Perl ソースにパッチを適用する場合は、次の一般的なガイドラインに 従ってください:

  • 8-wide tabs (no exceptions!)

    8-wide tabs (no exceptions!) (TBT)

  • 4-wide indents for code, 2-wide indents for nested CPP #defines

    4-wide indents for code, 2-wide indents for nested CPP #defines (TBT)

  • Try hard not to exceed 79-columns

    Try hard not to exceed 79-columns (TBT)

  • ANSI C prototypes

    ANSI C prototypes (TBT)

  • Uncuddled elses and "K&R" style for indenting control constructs

    Uncuddled elses and "K&R" style for indenting control constructs (TBT)

  • No C++ style (//) comments

    No C++ style (//) comments (TBT)

  • Mark places that need to be revisited with XXX (and revisit often!)

    Mark places that need to be revisited with XXX (and revisit often!) (TBT)

  • Opening brace lines up with "if" when conditional spans multiple lines; should be at end-of-line otherwise

    Opening brace lines up with "if" when conditional spans multiple lines; should be at end-of-line otherwise (TBT)

  • In function definitions, name starts in column 0 (return value is on previous line)

    In function definitions, name starts in column 0 (return value is on previous line) (TBT)

  • Single space after keywords that are followed by parens, no space between function name and following paren

    Single space after keywords that are followed by parens, no space between function name and following paren (TBT)

  • Avoid assignments in conditionals, but if they're unavoidable, use extra paren, e.g. "if (a && (b = c)) ..."

    Avoid assignments in conditionals, but if they're unavoidable, use extra paren, e.g. "if (a && (b = c)) ..." (TBT)

  • "return foo;" rather than "return(foo);"

    "return foo;" rather than "return(foo);" (TBT)

  • "if (!foo) ..." rather than "if (foo == FALSE) ..." etc.

    "if (!foo) ..." rather than "if (foo == FALSE) ..." etc. (TBT)

テストスイート

If your patch changes code (rather than just changing documentation), you should also include one or more test cases which illustrate the bug you're fixing or validate the new functionality you're adding. In general, you should update an existing test file rather than create a new one.

パッチによってコードが変更された場合(単なる文書の変更ではなく)、 修正しようとしているバグを説明するか、 追加しようとしている新機能を検証するテストケースを一つ以上含める 必要があります。 一般的には、新しいテストファイルを作成するのではなく、 既存のテストファイルを更新するべきです。

Your test suite additions should generally follow these guidelines (courtesy of Gurusamy Sarathy <gsar@activestate.com>):

テストスイートの追加は、一般的に次のガイドラインに従う必要があります (Gurusamy Sarthy <gsar@activestate.com> による):

  • Know what you're testing. Read the docs, and the source.

    Know what you're testing. Read the docs, and the source. (TBT)

  • Tend to fail, not succeed.

    Tend to fail, not succeed. (TBT)

  • Interpret results strictly.

    Interpret results strictly. (TBT)

  • Use unrelated features (this will flush out bizarre interactions).

    Use unrelated features (this will flush out bizarre interactions). (TBT)

  • Use non-standard idioms (otherwise you are not testing TIMTOWTDI).

    Use non-standard idioms (otherwise you are not testing TIMTOWTDI). (TBT)

  • Avoid using hardcoded test numbers whenever possible (the EXPECTED/GOT found in t/op/tie.t is much more maintainable, and gives better failure reports).

    Avoid using hardcoded test numbers whenever possible (the EXPECTED/GOT found in t/op/tie.t is much more maintainable, and gives better failure reports). (TBT)

  • Give meaningful error messages when a test fails.

    Give meaningful error messages when a test fails. (TBT)

  • Avoid using qx// and system() unless you are testing for them. If you do use them, make sure that you cover _all_ perl platforms.

    Avoid using qx// and system() unless you are testing for them. If you do use them, make sure that you cover _all_ perl platforms. (TBT)

  • Unlink any temporary files you create.

    Unlink any temporary files you create. (TBT)

  • Promote unforeseen warnings to errors with $SIG{__WARN__}.

    Promote unforeseen warnings to errors with $SIG{__WARN__}. (TBT)

  • Be sure to use the libraries and modules shipped with the version being tested, not those that were already installed.

    Be sure to use the libraries and modules shipped with the version being tested, not those that were already installed. (TBT)

  • Add comments to the code explaining what you are testing for.

    Add comments to the code explaining what you are testing for. (TBT)

  • Make updating the '1..42' string unnecessary. Or make sure that you update it.

    Make updating the '1..42' string unnecessary. Or make sure that you update it. (TBT)

  • Test _all_ behaviors of a given operator, library, or function.

    Test _all_ behaviors of a given operator, library, or function. (TBT)

    Test all optional arguments.

    Test all optional arguments. (TBT)

    Test return values in various contexts (boolean, scalar, list, lvalue).

    Test return values in various contexts (boolean, scalar, list, lvalue). (TBT)

    Use both global and lexical variables.

    Use both global and lexical variables. (TBT)

    Don't forget the exceptional, pathological cases.

    Don't forget the exceptional, pathological cases. (TBT)

コアモジュールにパッチを当てる

This works just like patching anything else, with one extra consideration.

これは他のパッチと同じように動作しますが、一つ特別な注意が必要です。

Some core modules also live on CPAN and are maintained outside of the Perl core. When the author updates the module, the updates are simply copied into the core.

Some core modules also live on CPAN and are maintained outside of the Perl core. When the author updates the module, the updates are simply copied into the core. (TBT)

Modules in the cpan/ directory of the source tree are maintained outside of the Perl core. See that module's listing on documentation or its listing on http://search.cpan.org/ for more information on reporting bugs and submitting patches.

Modules in the cpan/ directory of the source tree are maintained outside of the Perl core. See that module's listing on documentation or its listing on http://search.cpan.org/ for more information on reporting bugs and submitting patches. (TBT)

In contrast, modules in the dist/ directory are maintained in the core.

In contrast, modules in the dist/ directory are maintained in the core. (TBT)

Updating perldelta

For changes significant enough to warrant a pod/perldelta.pod entry, the porters will greatly appreciate it if you submit a delta entry along with your actual change. Significant changes include, but are not limited to:

For changes significant enough to warrant a pod/perldelta.pod entry, the porters will greatly appreciate it if you submit a delta entry along with your actual change. Significant changes include, but are not limited to: (TBT)

  • Adding, deprecating, or removing core features

    Adding, deprecating, or removing core features (TBT)

  • Adding, deprecating, removing, or upgrading core or dual-life modules

    Adding, deprecating, removing, or upgrading core or dual-life modules (TBT)

  • Adding new core tests

    Adding new core tests (TBT)

  • Fixing security issues and user-visible bugs in the core

    Fixing security issues and user-visible bugs in the core (TBT)

  • Changes that might break existing code, either on the perl or C level

    Changes that might break existing code, either on the perl or C level (TBT)

  • Significant performance improvements

    Significant performance improvements (TBT)

  • Adding, removing, or significantly changing documentation in the pod/ directory

    Adding, removing, or significantly changing documentation in the pod/ directory (TBT)

  • Important platform-specific changes

    Important platform-specific changes (TBT)

Please make sure you add the perldelta entry to the right section within pod/perldelta.pod. More information on how to write good perldelta entries is available in the Style section of Porting/how_to_write_a_perldelta.pod.

Please make sure you add the perldelta entry to the right section within pod/perldelta.pod. More information on how to write good perldelta entries is available in the Style section of Porting/how_to_write_a_perldelta.pod. (TBT)

What makes for a good patch?

New features and extensions to the language can be contentious. There is no specific set of criteria which determine what features get added, but here are some questions to consider when developing a patch:

New features and extensions to the language can be contentious. There is no specific set of criteria which determine what features get added, but here are some questions to consider when developing a patch: (TBT)

Does the concept match the general goals of Perl?

Our goals include, but are not limited to:

目標には次のようなものがありますが、これには限りません:

  1. Keep it fast, simple, and useful.

    Keep it fast, simple, and useful. (TBT)

  2. Keep features/concepts as orthogonal as possible.

    Keep features/concepts as orthogonal as possible. (TBT)

  3. No arbitrary limits (platforms, data sizes, cultures).

    No arbitrary limits (platforms, data sizes, cultures). (TBT)

  4. Keep it open and exciting to use/patch/advocate Perl everywhere.

    Keep it open and exciting to use/patch/advocate Perl everywhere. (TBT)

  5. Either assimilate new technologies, or build bridges to them.

    Either assimilate new technologies, or build bridges to them. (TBT)

Where is the implementation?

All the talk in the world is useless without an implementation. In almost every case, the person or people who argue for a new feature will be expected to be the ones who implement it. Porters capable of coding new features have their own agendas, and are not available to implement your (possibly good) idea.

実装なしでは、世界のすべての話は役に立ちません。 ほとんどすべての場合、新機能を主張する人は、それを実装する人であることが 期待されます。 新機能をコーディングできる porters は独自のアジェンダを持っており、 あなたの(おそらく良い)アイデアを実装するためには利用できません。

Backwards compatibility

It's a cardinal sin to break existing Perl programs. New warnings can be contentious--some say that a program that emits warnings is not broken, while others say it is. Adding keywords has the potential to break programs, changing the meaning of existing token sequences or functions might break programs.

既存の Perl プログラムを破壊することは重大な罪です。 新しい警告については議論の余地があります -- 警告を発するプログラムは破壊されないとする人もいれば、 破壊されるとする人もいます。 キーワードを追加するとプログラムが破壊される可能性があり、 既存のトークンシーケンスや関数の意味を変更すると プログラムが破壊される可能性があります。

The Perl 5 core includes mechanisms to help porters make backwards incompatible changes more compatible such as the feature and deprecate modules. Please use them when appropriate.

The Perl 5 core includes mechanisms to help porters make backwards incompatible changes more compatible such as the feature and deprecate modules. Please use them when appropriate. (TBT)

Could it be a module instead?

Perl 5 has extension mechanisms, modules and XS, specifically to avoid the need to keep changing the Perl interpreter. You can write modules that export functions, you can give those functions prototypes so they can be called like built-in functions, you can even write XS code to mess with the runtime data structures of the Perl interpreter if you want to implement really complicated things.

Perl 5 には、 特に Perl インタプリタを変更し続ける必要がないようにするための、 拡張メカニズム、モジュール、XS があります。 関数をエクスポートするモジュールを書くこともできますし、 組み込み関数のように呼び出すことができるように 関数にプロトタイプを与えることもできますし、 非常に複雑なことを実装したい場合には、 Perl インタプリタの実行時データ構造をいじる XS コードを書くこともできます。

Whenever possible, new features should be prototyped in a CPAN module before they will be considered for the core.

Whenever possible, new features should be prototyped in a CPAN module before they will be considered for the core. (TBT)

Is the feature generic enough?

Is this something that only the submitter wants added to the language, or is it broadly useful? Sometimes, instead of adding a feature with a tight focus, the porters might decide to wait until someone implements the more generalized feature.

これは投稿者だけが言語に追加したいと思っているものなのでしょうか、 それとも広く有用なものなのでしょうか? 時には、焦点を絞った機能を追加する代わりに、porters は誰かが より一般的な機能を実装するまで待つことに決めるかもしれません。

Does it potentially introduce new bugs?

Radical rewrites of large chunks of the Perl interpreter have the potential to introduce new bugs.

Perl インタプリタの大きな部分を大幅に書き換えてしまうと、 新しいバグが発生する可能性があります。

How big is it?

The smaller and more localized the change, the better. Similarly, a series of small patches is greatly preferred over a single large patch.

変化が小さく、局所的であればあるほど良いです。 同様に、一つの大きなパッチより、小さなパッチの連続の方がはるかに 好ましいです。

Does it preclude other desirable features?

A patch is likely to be rejected if it closes off future avenues of development. For instance, a patch that placed a true and final interpretation on prototypes is likely to be rejected because there are still options for the future of prototypes that haven't been addressed.

パッチが将来の開発の道を閉ざす場合、 パッチは却下される可能性が高いです。 例えば、プロトタイプに真の最終解釈を置いたパッチは、 まだ対処されていないプロトタイプの将来の選択肢がまだあるため、 却下される可能性が高いです。

Is the implementation robust?

Good patches (tight code, complete, correct) stand more chance of going in. Sloppy or incorrect patches might be placed on the back burner until the pumpking has time to fix, or might be discarded altogether without further notice.

優れたパッチ(厳密なコード、完全なパッチ、正しいパッチ)は、 入り込む可能性が高くなります。 ずさんなパッチや正しくないパッチは、pumpking が修正する時間があるまで 後回しにされたり、通知なしに完全に廃棄されたりします。

Is the implementation generic enough to be portable?

The worst patches make use of system-specific features. It's highly unlikely that non-portable additions to the Perl language will be accepted.

最悪のパッチは、システム固有の機能を利用しています。 移植性のない Perl 言語への追加が受け入れられる可能性はほとんどありません。

Is the implementation tested?

Patches which change behaviour (fixing bugs or introducing new features) must include regression tests to verify that everything works as expected.

動作を変更するパッチ(バグの修正や新機能の導入)には、 すべてが期待通りに動作することを検証するための 回帰テストを含める必要があります。

Without tests provided by the original author, how can anyone else changing perl in the future be sure that they haven't unwittingly broken the behaviour the patch implements? And without tests, how can the patch's author be confident that his/her hard work put into the patch won't be accidentally thrown away by someone in the future?

元の著者が提供したテストがなければ、将来 Perl を変更する他の人が、 パッチが実装している動作を無意識のうちに破壊していないことを 確認するにはどうすればよいでしょうか? また、テストがなければ、パッチの作成者は、 パッチに加えた自分の苦労が将来誰かによって誤って捨てられないと 確信するにはどうすればよいでしょうか?

Is there enough documentation?

Patches without documentation are probably ill-thought out or incomplete. No features can be added or changed without documentation, so submitting a patch for the appropriate pod docs as well as the source code is important.

文書のないパッチは、おそらく間違っているか不完全です。 文書なしではどんな機能も追加または変更できないので、 ソースコードとともに適切な pod 文書のパッチを提出することは重要です。

Is there another way to do it?

Larry said "Although the Perl Slogan is There's More Than One Way to Do It, I hesitate to make 10 ways to do something". This is a tricky heuristic to navigate, though--one man's essential addition is another man's pointless cruft.

Larry は、「Perl のスローガンはThere's More Than one way to Do It ですが、 何かを行うための 10 の方法を作ることにはためらいがあります」と述べています。 しかし、これは運営のための巧妙なヒューリスティックです -- ある人の 本質的な追加は、別の人の無意味なたわごとです。

Does it create too much work?

Work for the pumpking, work for Perl programmers, work for module authors, ... Perl is supposed to be easy.

pumpking の仕事、Perl プログラマーの仕事、モジュール作成者の仕事…。 Perl は簡単なはずです。

Patches speak louder than words

Working code is always preferred to pie-in-the-sky ideas. A patch to add a feature stands a much higher chance of making it to the language than does a random feature request, no matter how fervently argued the request might be. This ties into "Will it be useful?", as the fact that someone took the time to make the patch demonstrates a strong desire for the feature.

動作するコードは、絵に描いた餅のアイデアよりも常に好まれます。 機能を追加するパッチは、ランダムな機能リクエストよりも、 そのリクエストがどんなに熱心に議論されたとしても、 言語に取り入れられる可能性がはるかに高くなります。 誰かが時間をかけてパッチを作成したという事実は、 その機能に対する強い欲求を示しているため、 これは "Will it be useful?" と結びついています。

テスト

The core uses the same testing style as the rest of Perl, a simple "ok/not ok" run through Test::Harness, but there are a few special considerations.

コアは Perl の他の部分と同じテストスタイルを使っており、 Test::Harness を通して単純な「ok/not ok」を実行しますが、 いくつか特別な考慮事項があります。

There are three ways to write a test in the core. Test::More, t/test.pl and ad hoc print $test ? "ok 42\n" : "not ok 42\n". The decision of which to use depends on what part of the test suite you're working on. This is a measure to prevent a high-level failure (such as Config.pm breaking) from causing basic functionality tests to fail.

コアにテストを記述する方法は三つあります。 Test::More, t/test.pl, アドホックな print $test ? "ok 42\n" : "not ok 42\n" です。 どれを使うかは、テストスイートのどの部分で 作業しているかによって決まります。 これは、高レベルの障害(Config.pm の破損など)によって基本的な機能テストが 失敗しないようにするための手段です。

The t/test.pl library provides some of the features of Test::More, but avoids loading most modules and uses as few core features as possible.

The t/test.pl library provides some of the features of Test::More, but avoids loading most modules and uses as few core features as possible. (TBT)

If you write your own test, use the Test Anything Protocol.

If you write your own test, use the Test Anything Protocol. (TBT)

  • t/base and t/comp

    Since we don't know if require works, or even subroutines, use ad hoc tests for these two. Step carefully to avoid using the feature being tested.

    require が動作するのか、あるいはサブルーチンでさえも分からないので、 この二つに対してはアドホックテストを使ってください。 テスト中の機能を使わないように注意してください。

  • t/cmd, t/run, t/io and t/op

    Now that basic require() and subroutines are tested, you can use the t/test.pl library.

    これで基本的な require() とサブルーチンがテストされたので、 t/test.pl ライブラリを使うことができます。

    You can also use certain libraries like Config conditionally, but be sure to skip the test gracefully if it's not there.

    Config のような特定のライブラリを条件付きで使うこともできますが、 テストがない場合にはテストを省略するようにしてください。

  • Everything else

    Now that the core of Perl is tested, Test::More can and should be used. You can also use the full suite of core modules in the tests.

    Perl のコアがテストされたので、Test::More が使えますし 使うべきです。 また、コアモジュールの完全なスイートをテストで使うこともできます。

When you say "make test", Perl uses the t/TEST program to run the test suite (except under Win32 where it uses t/harness instead). All tests are run from the t/ directory, not the directory which contains the test. This causes some problems with the tests in lib/, so here's some opportunity for some patching.

"make test" とすれば、Perl は t/TEST プログラムを使って テストスイートを実行します(Win32 では、代わりに t/harness を使います)。 すべてのテストは t/ ディレクトリから実行され、テストを含む ディレクトリでは ありません。 このため、lib/ 内のテストで問題が発生するので、パッチを適用する 機会があります。

You must be triply conscious of cross-platform concerns. This usually boils down to using File::Spec and avoiding things like fork() and system() unless absolutely necessary.

クロスプラットフォームに関する懸念を 3 倍意識する必要があります。 これは通常、File::Spec を使い、絶対に必要でない限り fork()system() のようなものを避けることに要約されます。

Special make test targets

(特殊 make test ターゲット)

There are various special make targets that can be used to test Perl slightly differently than the standard "test" target. Not all them are expected to give a 100% success rate. Many of them have several aliases, and many of them are not available on certain operating systems.

標準の "test" ターゲットとは若干異なる方法で Perl をテストするために 使える特殊な make ターゲットがいくつかあります。 すべての make ターゲットが 100% の成功率を示すとは限りません。 これらの多くには複数の別名があり、その多くは特定の オペレーティングシステムでは使えません。

  • test_porting

    This runs some basic sanity tests on the source tree and helps catch basic errors before you submit a patch.

    This runs some basic sanity tests on the source tree and helps catch basic errors before you submit a patch. (TBT)

  • coretest

    Run perl on all core tests (t/* and lib/[a-z]* pragma tests).

    全てのコアテスト (t/*lib/[a-z]* プラグマテスト) で perl を 実行します。

    (Not available on Win32)

    (Win32 では利用できません)

  • test.deparse

    Run all the tests through B::Deparse. Not all tests will succeed.

    全てのテストを B::Deparse を通して実行します。 全てのテストが成功するわけではありません。

    (Not available on Win32)

    (Win32 では利用できません)

  • test.taintwarn

    Run all tests with the -t command-line switch. Not all tests are expected to succeed (until they're specifically fixed, of course).

    全てのテストを -t コマンドラインスイッチ付きで実行します。 全てのテストが成功するとは想定されません(もちろん具体的に修正するまでです)。

    (Not available on Win32)

    (Win32 では利用できません)

  • minitest

    Run miniperl on t/base, t/comp, t/cmd, t/run, t/io, t/op, t/uni and t/mro tests.

    t/base, t/comp, t/cmd, t/run, t/io, t/op, t/uni, t/mro テストで miniperl を実行します。

  • test.valgrind check.valgrind utest.valgrind ucheck.valgrind

    (Only in Linux) Run all the tests using the memory leak + naughty memory access tool "valgrind". The log files will be named testname.valgrind.

    (Linux のみ) 全てのテストをメモリリーク+メモリアクセスツール "valgrind" を使って実行します。 ログファイルの名前は testname.valgrind です。

  • test.torture torturetest

    Run all the usual tests and some extra tests. As of Perl 5.8.0, the only extra tests are Abigail's JAPHs, t/japh/abigail.t.

    全ての通常のテストといくつかの追加のテストを実行します。 Perl 5.8.0 から、追加のテストは Abigail の JAPHs, t/japh/abigail.t だけです。

    You can also run the torture test with t/harness by giving -torture argument to t/harness.

    t/harness-torture 引数を与えることでも t/harness で耐久テストを 実行できます。

  • utest ucheck test.utf8 check.utf8

    Run all the tests with -Mutf8. Not all tests will succeed.

    全てのテストを -Mutf8 で実行します。 全てのテストが成功するわけではありません。

    (Not available on Win32)

    (Win32 では利用できません)

  • minitest.utf16 test.utf16

    Runs the tests with UTF-16 encoded scripts, encoded with different versions of this encoding.

    UTF-16 の様々なバージョンでエンコードされたスクリプトでテストを 実行します。

    make utest.utf16 runs the test suite with a combination of -utf8 and -utf16 arguments to t/TEST.

    make utest.utf16t/TEST-utf8-utf16 引数を組み合わせて テストスイートを実行します。

    (Not available on Win32)

    (Win32 では利用できません)

  • test_harness

    Run the test suite with the t/harness controlling program, instead of t/TEST. t/harness is more sophisticated, and uses the Test::Harness module, thus using this test target supposes that perl mostly works. The main advantage for our purposes is that it prints a detailed summary of failed tests at the end. Also, unlike t/TEST, it doesn't redirect stderr to stdout.

    t/TEST ではなく、t/harness 制御プログラムでテストスイートを実行します。 t/harness はより洗練されており、Test::Harness モジュールを使います; したがって、このテストターゲットを使うと、perl はほとんど動作すると 想定されます。 私たちの目的にとっての主な利点は、失敗したテストの詳細な要約が最後に 出力されることです。 また、t/TEST とは異なり、stderr を stdout にリダイレクトしません。

    Note that under Win32 t/harness is always used instead of t/TEST, so there is no special "test_harness" target.

    Win32 では、t/TEST の代わりに常に t/harness が使われるので、特別な "test_harness" ターゲットはありません。

    Under Win32's "test" target you may use the TEST_SWITCHES and TEST_FILES environment variables to control the behaviour of t/harness. This means you can say

    Win32の "test" ターゲットでは、環境変数 TEST_SWITCHES とTEST_FILES を 使って t/harness の動作を制御することができます。 これは次のようにできるということです:

        nmake test TEST_FILES="op/*.t"
        nmake test TEST_SWITCHES="-torture" TEST_FILES="op/*.t"
  • test-notty test_notty

    Sets PERL_SKIP_TTY_TEST to true before running normal test.

    通常のテストを実行する前に PERL_SKIP_TTY_TEST を真に設定します。

並列テスト

The core distribution can now run its regression tests in parallel on Unix-like platforms. Instead of running make test, set TEST_JOBS in your environment to the number of tests to run in parallel, and run make test_harness. On a Bourne-like shell, this can be done as

コア配布は、Unix 風のプラットフォームでは退行テストを並列に 実行できるようになりました。 make test を実行する代わりに、並列に実行するテストの数を 環境変数 TEST_JOBS に設定して、 make test_harness を実行してください。 Bourne 風のシェルでは、これは次のようになります:

    TEST_JOBS=3 make test_harness  # Run 3 tests in parallel

An environment variable is used, rather than parallel make itself, because TAP::Harness needs to be able to schedule individual non-conflicting test scripts itself, and there is no standard interface to make utilities to interact with their job schedulers.

並列 make 自身ではなく環境変数が使われます; TAP::Harness は衝突しないテストスクリプトを自身でスケジュールできる 必要があり、make ユーティリティとこれらのジョブスケジューラを 相互作用させる標準的なインターフェースはないからです。

Note that currently some test scripts may fail when run in parallel (most notably ext/IO/t/io_dir.t). If necessary, run just the failing scripts again sequentially and see if the failures go away.

現在の所、並列に実行すると失敗するかもしれないテストがいくつか あることに注意してください (もっとも顕著なものは ext/IO/t/io_dir.t)。 もし必要なら、失敗したスクリプトを単に直列に再び実行して、 失敗しなくなるかを見てください。

手動でテストを実行する

You can run part of the test suite by hand by using one of the following commands from the t/ directory:

t/ ディレクトリで以下のコマンドの一つを使うことでテストスイートの一部を 手動で実行できます:

    ./perl -I../lib TEST list-of-.t-files

or

または

    ./perl -I../lib harness list-of-.t-files

(If you don't specify test scripts, the whole test suite will be run.)

(テストスクリプトを指定しないと、テストスイート全体が実行されます。)

Using t/harness for testing

(テストに t/harness を使う)

If you use harness for testing, you have several command line options available to you. The arguments are as follows, and are in the order that they must appear if used together.

テストに harness を使う場合は、いくつかのコマンドラインオプションを 使えます。 引数は次のとおりで、一緒に使った場合に現れなければならない 順序になっています:

    harness -v -torture -re=pattern LIST OF FILES TO TEST
    harness -v -torture -re LIST OF PATTERNS TO MATCH

If LIST OF FILES TO TEST is omitted, the file list is obtained from the manifest. The file list may include shell wildcards which will be expanded out.

LIST OF FILES TO TEST が省略された場合、ファイルリストは マニフェストから取得されます。 ファイルリストにはシェルワイルドカードが含まれている可能性があります。

  • -v

    Run the tests under verbose mode so you can see what tests were run, and debug output.

    テストを詳細モードで実行するので、実行されたテストとデバッグ出力を 確認できます。

  • -torture

    Run the torture tests as well as the normal set.

    通常のセットと同様に拷問テストを実行します。

  • -re=PATTERN

    Filter the file list so that all the test files run match PATTERN. Note that this form is distinct from the -re LIST OF PATTERNS form below in that it allows the file list to be provided as well.

    すべてのテストファイルが PATTERN にマッチングするようにファイルリストを フィルタリングします。 この形式は、ファイルリストも指定できるという点で、次の -re LIST OF PATTERNS 形式とは異なることに注意してください。

  • -re LIST OF PATTERNS

    Filter the file list so that all the test files run match /(LIST|OF|PATTERNS)/. Note that with this form the patterns are joined by '|' and you cannot supply a list of files, instead the test files are obtained from the MANIFEST.

    実行するすべてのテストファイルが match/(LIST OF PATTERNS)/ に マッチングするようにファイルリストをフィルタリングします。 この形式では、パターンは''で結合され、ファイルのリストを指定できません。 かわりに、テストファイルは MANIFEST から取得されます。

You can run an individual test by a command similar to

次のようなコマンドで、個々のテストを実行できます:

    ./perl -I../lib path/to/foo.t

except that the harnesses set up some environment variables that may affect the execution of the test:

ただし、ハーネスは、テストの実行に影響を与える可能性のあるいくつかの 環境変数を設定します:

  • PERL_CORE=1

    indicates that we're running this test as part of the perl core test suite. This is useful for modules that have a dual life on CPAN.

    これは、perl コアテストスイートのこのテスト部分を実行していることを示します。 これは、CPAN上で二重管理されているモジュールに役立ちます。

  • PERL_DESTRUCT_LEVEL=2

    is set to 2 if it isn't set already (see "PERL_DESTRUCT_LEVEL" in perlhacktips).

    まだ設定されていない場合は 2 に設定されます ("PERL_DESTRUCT_LEVEL" in perlhacktips を参照)。

  • PERL

    (used only by t/TEST) if set, overrides the path to the perl executable that should be used to run the tests (the default being ./perl).

    (t/TEST でのみ使用)設定されている場合、テストの実行に使う perl 実行可能ファイルへのパスを上書きします(デフォルトは ./perl)。

  • PERL_SKIP_TTY_TEST

    if set, tells to skip the tests that need a terminal. It's actually set automatically by the Makefile, but can also be forced artificially by running 'make test_notty'.

    設定すると、ターミナルが必要なテストを飛ばします。 これは実際には Makefile で自動的に設定されますが、 'make test_notty' を実行して人為的に設定することもできます。

テストに影響を与えるかも知れないその他の環境変数

  • PERL_TEST_Net_Ping

    Setting this variable runs all the Net::Ping modules tests, otherwise some tests that interact with the outside world are skipped. See perl58delta.

    この変数を設定すると、すべての Net::Ping モジュールテストが実行されます; そうでない場合、外部世界と対話する一部のテストはスキップされます。 perl58delta を参照してください。

  • PERL_TEST_NOVREXX

    Setting this variable skips the vrexx.t tests for OS2::REXX.

    この変数を設定すると、OS2::REXX の vrexx.t テストがスキップされます。

  • PERL_TEST_NUMCONVERTS

    This sets a variable in op/numconvert.t.

    op/numconvert.t に変数を設定します。

See also the documentation for the Test and Test::Harness modules, for more environment variables that affect testing.

テストに影響を与える環境変数については、Test および Test::Harness モジュールの文書も参照してください。

MORE READING FOR GUTS HACKERS

To hack on the Perl guts, you'll need to read the following things:

Perl の本質をハックするためには、以下を読む必要があります:

  • perlsource

    An overview of the Perl source tree. This will help you find the files you're looking for.

    An overview of the Perl source tree. This will help you find the files you're looking for. (TBT)

  • perlinterp

    An overview of the Perl interpreter source code and some details on how Perl does what it does.

    An overview of the Perl interpreter source code and some details on how Perl does what it does. (TBT)

  • perlhacktut

    This document walks through the creation of a small patch to Perl's C code. If you're just getting started with Perl core hacking, this will help you understand how it works.

    This document walks through the creation of a small patch to Perl's C code. If you're just getting started with Perl core hacking, this will help you understand how it works. (TBT)

  • perlhacktips

    More details on hacking the Perl core. This document focuses on lower level details such as how to write tests, compilation issues, portability, debugging, etc.

    More details on hacking the Perl core. This document focuses on lower level details such as how to write tests, compilation issues, portability, debugging, etc. (TBT)

    If you plan on doing serious C hacking, make sure to read this.

    If you plan on doing serious C hacking, make sure to read this. (TBT)

  • perlguts

    This is of paramount importance, since it's the documentation of what goes where in the Perl source. Read it over a couple of times and it might start to make sense - don't worry if it doesn't yet, because the best way to study it is to read it in conjunction with poking at Perl source, and we'll do that later on.

    これは、Perl ソースのどこに何があるかを記述した文書なので、非常に重要です。 この文書を何度か読んでみると、分かりはじめてくるかもしれませんが、 まだでも心配する必要はありません; なぜなら、この文書を学ぶ最善の方法は、Perl ソースを調べながら 読むことであり、これは後で行いますから。

    Gisle Aas's "illustrated perlguts", also known as illguts, has very helpful pictures:

    Gisle Aas の、 illguts としても知られる "illustrated perlguts" には、 とても役に立つ絵があります。

    http://search.cpan.org/dist/illguts/

  • perlxstut and perlxs

    A working knowledge of XSUB programming is incredibly useful for core hacking; XSUBs use techniques drawn from the PP code, the portion of the guts that actually executes a Perl program. It's a lot gentler to learn those techniques from simple examples and explanation than from the core itself.

    XSUB プログラミングの実用的な知識は、コアハッキングに非常に役立ちます; XSUBs では、Perl プログラムを実際に実行するコア部分である PP コードから引き出されたテクニックを使います。 これらのテクニックをコア自体から学ぶよりも、 簡単な例や説明から学ぶ方がはるかにやさしいです。

  • perlapi

    The documentation for the Perl API explains what some of the internal functions do, as well as the many macros used in the source.

    Perl API の文書では、内部関数の機能や、ソースで使われる多くのマクロについて 説明しています。

  • Porting/pumpkin.pod

    This is a collection of words of wisdom for a Perl porter; some of it is only useful to the pumpkin holder, but most of it applies to anyone wanting to go about Perl development.

    これは、Perl porters のための英知を集めたものです; その中にはパンプキンを持っている人にしか役に立たないものもありますが、 そのほとんどは Perl 開発を行おうとする人にも当てはまります。

  • The perl5-porters FAQ

    This should be available from http://dev.perl.org/perl5/docs/p5p-faq.html . It contains hints on reading perl5-porters, information on how perl5-porters works and how Perl development in general works.

    http://dev.perl.org/perl5/docs/p5p-faq.html から入手できます。 perl5-porters を読むためのヒント、perl5-porters がどのように動作するか、 そして Perl 開発がどのように一般的に動作するかについての情報が 含まれています。

CPAN TESTERS AND PERL SMOKERS

The CPAN testers ( http://testers.cpan.org/ ) are a group of volunteers who test CPAN modules on a variety of platforms.

CPAN testers (http://testers.cpan.org/) は、さまざまな プラットフォームで CPAN モジュールをテストするボランティアのグループです。

Perl Smokers ( http://www.nntp.perl.org/group/perl.daily-build/ and http://www.nntp.perl.org/group/perl.daily-build.reports/ ) automatically test Perl source releases on platforms with various configurations.

Perl Smokers ( http://www.nntp.perl.org/group/perl.daily-build/ と http://www.nntp.perl.org/group/perl.daily-build.reports/ ) は、 さまざまな構成のプラットフォームでPerlソースリリースを自動的にテストします。

Both efforts welcome volunteers. In order to get involved in smoke testing of the perl itself visit http://search.cpan.org/dist/Test-Smoke/. In order to start smoke testing CPAN modules visit http://search.cpan.org/dist/CPANPLUS-YACSmoke/ or http://search.cpan.org/dist/minismokebox/ or http://search.cpan.org/dist/CPAN-Reporter/.

どちらの取り組みもボランティアを歓迎しています。 Perl 自体のスモークテストに参加するには、 http://search.cpan.org/dist/Test-Smoke/ を訪れてください。 CPAN モジュールのスモークテストを開始するには、 http://search.cpan.org/dist/CPANPLUS-YACSmoke/ または http://search.cpan.org/dist/minismokebox/ または http://search.cpan.org/dist/CPAN-Reporter/ を訪れてください。

WHAT NEXT?

If you've read all the documentation in the document and the ones listed above, you're more than ready to hack on Perl.

If you've read all the documentation in the document and the ones listed above, you're more than ready to hack on Perl. (TBT)

Here's some more recommendations

Here's some more recommendations (TBT)

  • Subscribe to perl5-porters, follow the patches and try and understand them; don't be afraid to ask if there's a portion you're not clear on - who knows, you may unearth a bug in the patch...

    perl5-porters を購読して、パッチを追いかけ、試してみて理解します; はっきりしない部分を訊ねるのを恐れないでください - あなたがパッチのバグを 掘り出すかも知れないことを知っています…

  • Do read the README associated with your operating system, e.g. README.aix on the IBM AIX OS. Don't hesitate to supply patches to that README if you find anything missing or changed over a new OS release.

    オペレーティングシステムに関連づけられた README (例えば IBM AIX OS なら README.aix) を読みます。 新しい OS のリリースで抜けていたり変更されていることに気付いたら、 その README へのパッチを提供することを遠慮しないでください。

  • Find an area of Perl that seems interesting to you, and see if you can work out how it works. Scan through the source, and step over it in the debugger. Play, poke, investigate, fiddle! You'll probably get to understand not just your chosen area but a much wider range of perl's activity as well, and probably sooner than you'd think.

    自分にとって興味深いと思われる Perl の分野を見つけて、作業をすると どのように動作するかを見ます。 ソースをスキャンして、デバッガでステップ実行します。 遊んでつついて調べていじります! おそらく、選んだ分野だけではなく、perl のもっと広い範囲の動作も 理解する必要があって、それはおそらくあなたが考えているより早いでしょう。

"道はつづくよ、先へ先へと、戸口より出て、遠くへつづく。"

If you can do these things, you've started on the long road to Perl porting. Thanks for wanting to help make Perl better - and happy hacking!

これらのことができれば、Perl porting への長い道の開始です。 Perl をよりよくする助けをしようとしてくれてありがとう - そして happy hacking!

比喩的な引用

If you recognized the quote about the Road above, you're in luck.

上述の道に関する引用に気付いたなら、運があります。

Most software projects begin each file with a literal description of each file's purpose. Perl instead begins each with a literary allusion to that file's purpose.

ほとんどのソフトウェアプロジェクトでは、それぞれのファイルは、ファイルの 目的の文字通りの説明で始まります。 Perl はそうではなく、ファイルの目的の文学的な言及で始まります。

Like chapters in many books, all top-level Perl source files (along with a few others here and there) begin with an epigramic inscription that alludes, indirectly and metaphorically, to the material you're about to read.

多くの本の章のように、トップレベル (およびあちこちにあるいくつかの) Perl ソースファイルは、今から読もうとしているものへの暗示的、間接的、 隠喩的な警句的碑文で始まります。

Quotations are taken from writings of J.R.R. Tolkien pertaining to his Legendarium, almost always from The Lord of the Rings. Chapters and page numbers are given using the following editions:

引用は J.R.R. Tolkien の著作とそれに付随する世界から取られます; ほとんど常に The Lord of the Rings (指輪物語) からです。 章と頁番号は以下の版から取られています:

  • The Hobbit, by J.R.R. Tolkien. The hardcover, 70th-anniversary edition of 2007 was used, published in the UK by Harper Collins Publishers and in the US by the Houghton Mifflin Company.

    J.R.R. Tolkien による The Hobbit (ホビットの冒険)。 イギリスでは Harper Collins Publishers から、アメリカでは the Houghton Mifflin Company から出版された、2007 年の 70 周年記念ハードカバー版が 使われています。

  • The Lord of the Rings, by J.R.R. Tolkien. The hardcover, 50th-anniversary edition of 2004 was used, published in the UK by Harper Collins Publishers and in the US by the Houghton Mifflin Company.

    J.R.R. Tolkien による The Lord of the Rings (指輪物語)。 イギリスでは Harper Collins Publishers から、アメリカでは the Houghton Mifflin Company から出版された、2004 年の 50 周年記念ハードカバー版が 使われています。

  • The Lays of Beleriand, by J.R.R. Tolkien and published posthumously by his son and literary executor, C.J.R. Tolkien, being the 3rd of the 12 volumes in Christopher's mammoth History of Middle Earth. Page numbers derive from the hardcover edition, first published in 1983 by George Allen & Unwin; no page numbers changed for the special 3-volume omnibus edition of 2002 or the various trade-paper editions, all again now by Harper Collins or Houghton Mifflin.

    J.R.R. Tolkien による The Lays of Beleriand; 死後、息子であり 遺著管理者である C.J.R. Tolkien によって出版された 12 巻からなる巨大な History of Middle Earth の第 3 巻。 頁番号は George Allen & Unwin から 1983 年に出版されたハードカバー版に 依っています; Harper Collins や Houghton Mifflin による、2002 年の特別 3 巻 オムニバス版や様々な trade-paper 版でも頁番号は変わっていません。

Other JRRT books fair game for quotes would thus include The Adventures of Tom Bombadil, The Silmarillion, Unfinished Tales, and The Tale of the Children of Hurin, all but the first posthumously assembled by CJRT. But The Lord of the Rings itself is perfectly fine and probably best to quote from, provided you can find a suitable quote there.

その他の JRRT の本である The Adventures of Tom Bombadil (トム・ボンバディルの冒険)、The Silmarillion(シルマリルの物語)、 Unfinished Tales(終わらざりし物語)、 The Tale of the Children of Hurin も引用の元となります (最初のもの以外は 死後 CJRT によって編纂されたものです)。 しかし、適切な引用が見つけられるなら、The Lord of the Rings は引用元として 完全によく、おそらく最良のものです。

So if you were to supply a new, complete, top-level source file to add to Perl, you should conform to this peculiar practice by yourself selecting an appropriate quotation from Tolkien, retaining the original spelling and punctuation and using the same format the rest of the quotes are in. Indirect and oblique is just fine; remember, it's a metaphor, so being meta is, after all, what it's for.

それで、Perl に追加するための新しくて完全なトップレベルソースファイルを 提供しようとしているなら、Tolkien から適切な引用を自分で選択して、 元の綴りと句読点を残して他の引用と同じ形式を使うという、特有の慣例に 従うべきです。 間接的で遠回しでもかまいません; これはメタファーであり、メタであると いうことは、結局、ためにするものであるということを忘れないでください。

作者

This document was originally written by Nathan Torkington, and is maintained by the perl5-porters mailing list.

この文書はもともと Nathan Torkington によって書かれ、 perl5-porters メーリングリストで管理されています。