名前¶
PAR::Dist - PARディストリビューションの作成と操作
概要¶
As a shell command:
シェルコマンドで:
    % perl -MPAR::Dist -eblib_to_par
In programs:
プログラムから:
    use PAR::Dist;
    my $dist = blib_to_par();   # ./blib/を使ってPARファイルを作成
    install_par($dist);         # それをシステムにインストール
    uninstall_par($dist);       # システムからアンインストール
    sign_par($dist);            # Module::Signatureを使って署名
    verify_par($dist);          # Module::Signatureを使って照合
    install_par("http://example.com/DBI-latest.par");   # これも動作する
説明¶
This module creates and manipulates PAR distributions. They are architecture-specific PAR files, containing everything under blib/ of CPAN distributions after their make or Build stage.
このモジュールはPARディストリビューションの生成と操作を行なう。 PARディストリビューションはアーキテクチャに特化したPARファイルで、 makeあるいはBuild段階が済んだCPANディストリビューションの blib/下にある全ファイルを含んでいる。
The naming convention for such distributions is:
このようなディストリビューションに対する慣習的な名前は:
    NAME-VERSION-ARCH-PERL_VERSION.par
For example, PAR-Dist-0.01-i386-freebsd-5.8.0.par corresponds to the 0.01 release of PAR-Dist on CPAN, built for perl 5.8.0 running on i386-freebsd.
例えば、PAR-Dist-0.01-i386-freebsd-5.8.0.parは、 CPANのPAR-Distリリース0.01、i386-freebsd上で実行される perl 5.8.0用にビルトされたものに対応する。
関数¶
Five functions are exported by default. They can take either a hash of named arguments, a single $dist argument, or no arguments (in which case the first PAR file in the current directory is used).
デフォルトでは五つの関数がエクスポートされる。これらの関数は、名前付き 引数のハッシュ、単一の$dist引数、あるいは引数無し (現在のディレクトリにある最初のPARファイルを使う場合)のいずれかを 取ることができる。
Therefore, under a directory containing only a single test.par, all invocations below are equivalent:
よって、ただtest.parだけを含むディレクトリ下では、下記の呼び出しは 全て等価である:
    % perl -MDist::PAR -e"install_par( dist => 'test.par' )"
    % perl -MDist::PAR -e"install_par( 'test.par' )"
    % perl -MDist::PAR -einstall_par;
If $dist resembles a URL, LWP::Simple::mirror is called to mirror it locally under $ENV{PAR_TEMP} (or $TEMP/par/ if unspecified), and the function will act on the fetched local file instead.
$distがURLに似ている場合、LWP::Simple::mirrorが呼び出されて ローカルの$ENV{PAR_TEMP}(未指定の場合は$TEMP/par/)下に ミラーする。この場合そのローカルファイルに対して関数は作用する。
blib_to_par¶
Builds a PAR distribution from the blib/ subdirectory under $path, or under the current directory if unspecified. If blib/ does not exist, it automatically runs Build, make, Build.PL or Makefile.PL to create it.
$path下、あるいは指定していなければ現在のディレクトリ下の blib/サブディレクトリからPARディストリビューションをビルトする。 blib/が存在しない場合、そのディレクトリを作成するために Build、make、Build.PLあるいはMakefile.PLが自動的に実行される。
Returns the filename or the generated PAR distribution.
戻り値はファイル名か生成されたPARディストリビューション。
install_par¶
Installs a PAR distribution into the system, using ExtUtils::Install::install_default.
PARディストリビューションをシステムにインストールする。これは ExtUtils::Install::install_defaultを使ってなされる。
uninstall_par¶
Uninstalls all previously installed contents of a PAR distribution, using ExtUtils::Install::uninstall.
以前インストールしたPARディストリビューションをアンインストールする。 これはExtUtils::Install::uninstallを使ってなされる。
sign_par¶
Digitally sign a PAR distribution using gpg or Crypt::OpenPGP, via Module::Signature.
PARディストリビューションにデジタル署名を行なう。これは Module::Signatureを通じてgpgかCrypt::OpenPGPを使ってなされる。
verify_par¶
Verify the digital signature of a PAR distribution using gpg or Crypt::OpenPGP, via Module::Signature.
PARディストリビューションのデジタル署名を照合する。これは Module::Signatureを通じてgpgかCrypt::OpenPGPを使ってなされる。
Returns a boolean value indicating whether verification passed; $! is set to the return code of Module::Signature::verify.
照合が通るかどうかを示すのにブール値が返される;$!に Module::Signature::verifyの返りコードがセットされる。
参考¶
PAR, ExtUtils::Install, Module::Signature, LWP::Simple
作者¶
Autrijus Tang <autrijus@autrijus.org>
PAR has a mailing list, <par@perl.org>, that you can write to; send an empty mail to <par-subscribe@perl.org> to join the list and participate in the discussion.
Please send bug reports to <bug-par@rt.cpan.org>.
著作権¶
Copyright 2003 by Autrijus Tang <autrijus@autrijus.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.