blog20100901

2013/08/20 - プログラミング言語 Perl にまつわる etc. - Perl monger
参考 : perldoc, perldoc.jp, search.cpan.org, perldoc.perl.org ...
「 初めての Perl 第 6 版 」(オライリー・ジャパン発行 ISBN978-4-87311-567-2) 」
「 続・初めての Perl 改訂版 」(オライリー・ジャパン発行 ISBN4-87311-305-9) 」
「 Effective Perl 第 2 版 」(翔泳社発行 ISBN978-4-7981-3981-4) 」 ... etc,.

Perl Perl_7 mod_perl 翻訳 Web Server

Perl mp2 翻訳 mod_perl 2.0 の名前変更 (d182)

目次 - Perl Index


Theme



Perl について、復習を兼ねて断片的な情報を掲載して行く連載その d182 回。

今回は、「 mod_perl Home / The mod_perl Web Site / Documentation / mod_perl 2.0 Documentation / mod_perl 2.0 renaming 」を翻訳して確認します。

正確な内容は 原文 を確認してください。誤解や誤訳がある場合はご指摘ください。







説明 : Description



This document discusses the effects of the decision to rename parts of the mod_perl API.

このドキュメントは mod_perl API の一部をリネームする決定の影響を論じます。


概要 : Synopsis



During a sequence of release candidates leading up to the official release of mod_perl 2, in late December, 2004 there was considerable discussion regarding the choice of namespaces for the 2.0 API. The main concern expressed was that some of the Apache::* modules used in mod_perl 2 had the same names as those in mod_perl 1. After a lively and, at times, heated debate, a proposal was made to rename parts of the mod_perl 2 API - see the thread at http://marc.theaimsgroup.com/?t=111135037100002&r=1&w=2. This proposal was subsequently voted on and then adopted.

mod_perl 2 の公式リリースにいたる一連のリリース候補の間, 2004 年, 12 月下旬に 2.0 API の名前空間のチョイスに関する相当な議論がありました。表された主な懸念は mod_perl 2 で使われる Apache::* の一部が mod_perl 1 のものと同じことでした。活発で, ときおり, 白熱したディベートの後で, mod_perl 2 API の一部をリネームする提案がされました - http://marc.theaimsgroup.com/?t=111135037100002&r=1&w=2 のスレッドを参照してください。この提案はその後に投票されて採択されました。


変更点 : Changes



The main changes involved in this renaming are as follows.

このリネームが伴う主な変更は次のとおりです。

  • Rename all Apache::* modules to Apache2::*, save for the following exceptions:

    次の例外を除いて, すべての Apache::* モジュールを Apache2::* にリネームする:

    • The Apache::Test* modules in the Apache-Test distribution are unaffected by this rename.

      Apache-Test ディストリビューションの Apache::Test* モジュールはこのリネームの影響をうけない。

    • Constants under the Apache::* namespace, such as Apache::OK, are now called as Apache2::Const::* (for example, Apache2::Const::OK).

      Apache::OK のような, Apache::* 名前空間のものにある定数は, Apache2::Const::* とコールされるようになった (例えば, Apache2::Const::OK)。

    • Constants under the APR::* namespace, such as APR::SUCCESS, are now called as APR::Const::* (for example, APR::Const::SUCCESS).

      APR::SUCCESS のような, APR::* 名前空間のもとにある定数は, APR::Const::* とコールされるようになった (例えば, APR::Const::SUCCESS)。



  • Apache->request() has been renamed to Apache2::RequestUtil->request().

    Apache->request() は Apache2::RequestUtil->request() にリネームされた。

  • Apache->server() has been renamed to Apache2::ServerUtil->server().

    Apache->server() は Apache2::ServerUtil->server() にリネームされた。

  • Rename mod_perl.pm to mod_perl2.pm

    mod_perl.pm は mod_perl2.pm にリネーム

  • Discontinue the practice of installing mod_perl in a relative Apache2 subdirectory, so that the use of Apache2.pm to adjust @INC is no longer needed.

    相対的な Apache2 サブディレクトリに mod_perl をインストールする習慣を中止して, @INC を調整するための Apache2.pm の使用を今後は不要にする。


Concurrent with these changes, a decision was also made to refuse to install mod_perl 2 in the same Perl tree as any installed mod_perl 2 package of version prior to 1.999_22.

これらの変更と同時に, 1.999_22 以前のバージョンの mod_perl 2 パッケージがインストールされたのと同じ Perl ツリーに mod_perl 2 をインストールすることを拒否することも決定されました。


影響 : Effects



The mod_perl developers did not take lightly the effects of changing the API at such a late stage in the development cycle. For most users the change to the new API should be relatively straightforward:

mod_perl 開発者はこのような開発サイクル後半でのAPI 変更の影響を軽く受け止めることはできませんでした。ほとんどのユーザには新しい API への変更は比較的容易なはずです:


  • Before installing mod_perl 2, either remove an earlier mod_perl 2 installation (prior to 1.999022), or else choose to install the new version in a different area. To remove enough of a prior installation of mod_perl 2 in order to satisfy this requirement, one can do, on Unix,

    mod_perl 2 をインストールする前に, 以前の mod_perl 2 インストール (1.999022 以前) を削除する, あるいは異なるエリアへ新しいバージョンをインストールするかのいずれかを選択する。この要件を満たすために以前の mod_perl 2 の以前のを十分に削除するためには, Unix で, これを実行できる,

    % find /usr/lib/perl5 -name 'Apache2*' -exec rm -rf {} \;

    where /usr/lib/perl5 is the top-level root of your Perl tree. Note that this will also remove any 3rd party Apache modules installed under an Apache2 subdirectory. In many situations you would want to do this, as such modules will need porting to the new API. However, if there are modules under this location that you want to keep, you can use

    ここで /usr/lib/perl5 はあなたの Perl ツリーのトップレベルルート。これは Apache2 サブディレクトリ配下にインストールされた3rd パーティの Apache モジュールも削除することに注意。多くの場合このようなモジュールは新しい API への移植が必要なので, あなたはこれを行うはず。しかし, あなたが維持したいモジュールがこのロケーションにあるなら, あなたはこれを使える

    % find /usr/lib/perl5 -name 'Apache2*' -exec ls -lR {} \;

    to list the files under this tree.

    このツリー配下のファイルをリストするために。
    For Win32 ppm users, the command

    Win32 ppm ユーザは, このコマンド

    ppm> remove mod_perl

    within the ppm shell will remove an installed mod_perl ppm package.

    ppm シェル内でインストールされた mod_perl ppm パッケージを削除する。


  • If building mod_perl 2 from source, the Makefile.PL argument of MP_INST_APACHE2 is no longer supported.

    ソースから mod_perl 2 をビルドする場合, Makefile.PL の引数 MP_INST_APACHE2 はもうサポートされない。


  • Replace the use of

    スクリプトやモジュールでのこれの使用を

    use Apache::SomeCoreModule;

    in a script or module by

    これでリプレイスする

    use Apache2::SomeCoreModule;

    Similarly, an Apache directive

    同様に, httpd.conf ファイル内の Apache ディレクティブ

    PerlModule Apache::SomeCoreModule

    in an httpd.conf file should be replaced by

    はこれでリプレイスしなければならない

    PerlModule Apache2::SomeCoreModule

    and mod_perl should be replaced by mod_perl2 in the same places.

    それから mod_perl は同じ場所で mod_perl2 によってリプレイスされなければならない。
    Note that "core modules" are defined as those that ship with the mod_perl 2 distribution. Other CPAN modules in the Apache:: namespace may not follow the same conventions.

    "core モジュール" は mod_perl 2 ディストリビューションに付属するものとして定義されることに注意。Apache:: 名前空間の他の CPAN モジュールは同じ規則に従わないかもしれない。


  • Replace the use of constants Apache::* by Apache2::Const::* and APR::* by APR::Const::*.

    使用する定数 Apache::* を Apache2::Const::* で APR::* を APR::Const::* でリプレイスする。


  • Remove any occurrences of

    スクリプトやモジュールでの

    use Apache2;

    in a script or module, as well as

    これ, および Apachce 構成ファイルでの

    PerlModule Apache2

    in an Apache configuration file.

    この存在を削除する。


  • In a script or module, replace Apache->request() by Apache2::RequestUtil->request() and Apache->server() by Apache2::ServerUtil->server().

    スクリプトやモジュール内の, Apache->request() を Apache2::RequestUtil->request() で Apache->server() を Apahce2::ServerUtil->server() でリプレイスする。


  • If using CGI.pm you will need to upgrade to version 3.11 - versions 3.10 and older contain bugs and versions 3.07 and older do not support support the new mod_perl API. you can get CGI.pm from http://search.cpan.org/dist/CGI.pm/.

    CGI.pm を使っている場合あなたはバージョン 3.11 にアップグレードする必要がある - バージョン 3.10 以前はバグを含んでおりバージョン 3.07 以前は新しい mod_perl API のサポートをサポートしていない。あなたは http://search.cpan/org/dist/CGI.pm/ から CGI.pm をゲットできる。


Beginning with mod_perl-1.999_22, an environment variable $ENV{MOD_PERL_API_VERSION} has been added to specify which mod_perl version is being used.

mod_perl-1.999_22 以降, 環境変数 $ENV{MOD_PERL_API_VERSION} がどの mod_perl バージョンが使われているかを特定するために追加されました。


関連項目 : See Also



The directions for installing mod_perl 2.0 . Help is also available through the archives of and subscribing to the mod_perl mailing list.

installing mod_perl 2.0 のための指示です。mod_perl mailing list のアーカイブやサブスクライブを通じてもヘルプは利用可能です。


作者 : Authors


The mod_perl development team and numerous contributors.

mod_perl 開発チームと多数のコントリビュータです。


NEXT



次回は、「 mod_perl 」公式サイト (https://perl.apache.org/index.html) より「 User's guide 」を確認します。


参考情報は書籍「 続・初めての Perl 改訂版 」, 「 Effective Perl 第 2 版 」を中心に perldoc, Wikipedia および各 Web サイト。それと詳しい先輩。

目次 - Perl Index













































同じカテゴリー(Perl)の記事
 Perl mp2 翻訳 Web コンテンツ圧縮の FAQ (d228) (2023-10-11 23:49)
 Perl mp2 翻訳 既知のブラウザのバグの回避策をいくつか (d227) (2023-05-26 15:41)
 Perl mp2 翻訳 Perl と Apache でのキュートなトリック (d226) (2023-05-19 17:05)
 Perl mp2 翻訳 テンプレートシステムの選択 (d225) (2022-08-15 22:23)
 Perl mp2 翻訳 大規模 E コマースサイトの構築 (d224) (2022-06-15 20:43)
 Perl mp2 翻訳 チュートリアル (d223) (2022-06-15 20:42)
上の画像に書かれている文字を入力して下さい
 
<ご注意>
書き込まれた内容は公開され、ブログの持ち主だけが削除できます。

Llama
リャマ
TI-DA
てぃーだブログ
プロフィール
セラ (perlackline)
セラ (perlackline)
QRコード
QRCODE
オーナーへメッセージ

PAGE TOP ▲