=encoding utf8 =head1 NAME =begin original cpanfile - A format for describing CPAN dependencies for Perl applications =end original cpanfile - PerlアプリケーションのためにCPANの依存性を記述するためのフォーマット =head1 SYNOPSIS requires 'Catalyst', '5.8000'; # 5.8000 or newer requires 'Catalyst::View::JSON', '>= 0.30, < 0.40'; recommends 'JSON::XS', '2.0'; conflicts 'JSON', '< 1.0'; on 'test' => sub { requires 'Test::More', '>= 0.96, < 2.0'; recommends 'Test::TCP', '1.12'; }; on 'develop' => sub { recommends 'Devel::NYTProf'; }; feature 'sqlite', 'SQLite support' => sub { recommends 'DBD::SQLite'; }; =head1 VERSION =begin original This doucment describes cpanfile format version 1.0. =end original このドキュメントは cpanfile フォーマット バージョン 1.0 について書いています。 =head1 DESCRIPTION =begin original C describes CPAN dependencies required to execute associated Perl code. =end original C は、関連する Perl のコードを実行するために必要とされている CPAN の依存について記述します。 =head1 シンタックス =over 4 =item requires, recommends, suggests, conflicts requires $module, $version_requirement; =begin original Describes the requirement for a module. See L for the meanings of each requirement type. =end original モジュールの要求を記述します。それぞれの要求のタイプの意味については、L を見てください。 =begin original When version requirement is omitted, it is assumed that C<0> is passed, meaning any version of the module would satisfy the requirement. =end original バージョンの要求が省略された場合、C<0>が渡されたと想定します。 どのバージョンでも要求を満たすことを意味します。 =begin original Version requirement can either be a version number or a string that satisfies L, such as C<< >= 1.0, != 1.1 >>. =end original バージョンの要求はバージョン番号か、Lを満たす C<< >=1.0, !=1.1 >>のような文字列のいずれも可能です。 =item on on $phase => sub { ... }; =begin original Describe requirements for a specific phase. Available phases are C, C, C, C and C. =end original 特定のフェーズ用の要求を記述できます。利用可能なフェーズは、 C、C、C、C と C です。 =item feature feature $identifier, $description => sub { ... }; =begin original Group requirements with features. Description can be omitted, when it is assumed to be the same as identifier. See L for more details. =end original 機能に対する要求をグループ化します。識別子と同じと想定できるときは 説明は省くことができます。詳細は L を見てください。 =item configure_requires, build_requires, test_requires, author_requires configure_requires $module, $version; # on 'configure' => sub { requires $module, $version } build_requires $module, $version; # on 'build' => sub { requires $module, $version }; test_requires $module, $version; # on 'test' => sub { requires $module, $version }; author_requires $module, $version; # on 'develop' => sub { requires $module, $version }; =begin original Shortcut for C in specific phase. This is mainly provided for compatibilities with L DSL. =end original 特定のフェーズのCのショートカットです。主に、LのDSL と互換性をもたせるために提供されています。 =back =head1 USAGE =begin original C is a format to describe dependencies. How to use this file is dependent on the tools reading/writing it. =end original C は、依存を記述するためのフォーマットです。このファイルの使い方は それを読む/書くツールに依存します。 =begin original Usually, you're expected to place the C in the root of the directory containing the associated code. =end original 普通、Cを関連するコードが含まれているルートディレクトリに置くと 予期します。 =begin original Tools supporting C format (e.g. L and L) will automatically detect the file and install dependencies for the code to run. =end original Cフォーマットをサポートするツール(例: LやL)は、 ファイルを自動的に見つけ、実行するコードのために依存をインストールします。 =begin original There are also tools to support converting cpanfile to CPAN toolchain compatible formats, such as L, L, L, so that C can be used to describe dependencies for a CPAN distribution as well. =end original cpanfileをCPANツールチェインと互換性のあるフォーマットに変換するツールも あります。L、 L、 Lなどです。 そのため、Cは、 CPANディストリビューションの依存性を記述するためにも使えます。 =head1 AUTHOR Tatsuhiko Miyagawa =head1 ACKNOWLEDGEMENTS =begin original The format (DSL syntax) is inspired by L and L. =end original このフォーマット(DSLシンタックス)は、L と Lにインスパイアされています。 =begin original C specification (this document) is based on Ruby's L specification. =end original C の仕様(このドキュメント) は Ruby の L の仕様に基づいています。 =head1 SEE ALSO L L L =cut