CPANTSテスト項目の和訳
CPANTSをご存知だろうか? 俺も最近自作モジュールをCPANに登録したい欲望があっていろいろ調べているうちに見つけたサイトなんだ。何かと言えば、CPANに登録されているモジュールを”あるルール”で評価しているサイトなんだ。
「評価」といってもコーディングの善し悪しではなくて、あくまで配布パッケージとして良い状態を保っているかどうかを評価している。例えば、「READMD」が含まれているか? みたいなことだ。全部英語なんだけど、ぜひ広まってほしいものばかりなので、大急ぎで和訳してみた。興味があれば、読んでみてください。
なお、これらは「正確な直訳」というよりは英文の意図を汲んで、勝手に日本語にしたような感じなので、両方読むと微妙に違いがあるかも。分かりづらい点はいくらでも聞いてください。また、もっといい訳があれば、指摘してください。
○extractable
- Shortcoming
- This package uses an unknown packaging format. CPANTS can handle tar.gz, tgz and zip archives. No kwalitee metrics have been calculated.
- Remedy
- Pack the distribution with tar & gzip or zip.
○伸張できるか(解凍できるか?)
- 何がだめか
- このパッケージは適切な配布フォーマットではありません。CPANTSはtar.gz, tgz, zipのみサポートしています。採点できません。
- どうすればよいか?
- tar.gz, tgz, zipで圧縮してください。
○extracts_nicely
- Shortcoming
- This package doesn't create a directory and extracts its content into this directory. Instead, it spews its content into the current directory, making it really hard/annoying to remove the unpacked package.
- Remedy
- Issue the command to pack the distribution in the directory above it. Or use a buildtool ('make dist' or 'Build dist')
○美しく書き出すか?(訳注:ちょっと日本語へん?)
○has_version
- Shortcoming
- The package filename (eg. Foo-Bar-1.42.tar.gz) does not include a version number (or something that looks like a reasonable version number to CPAN::DistnameInfo)
- Remedy
- Add a version number to the packed distribution. Or use a buildtool ('make dist' or 'Build dist')
○バージョンが宣言されているか?
- 何がだめか
- パッケージ名(例:Foo-Bar-1.42.tar.gz)にバージョンを示す文字が入っていません(もしくはCPAN::DistnameInfoがバージョンだと認識できる情報がふくまれていません)。
- どうすればよいか?
- パッケージにバージョン番号を含めてください(または、ビルドツールを使用してください('make dist'または'Build dist'))。
○has_proper_version
- Shortcoming
- The version number isn't a number. It probably contains letter besides a leading 'v', which it shouldn't
- Remedy
- Remove all letters from the version number. If you want to mark a release as a developer release, use the scheme 'Module-1.00_01'
○正しいバージョンを持っているか?
- 何がだめか
- バージョン番号に数字以外の文字が入っています(訳注:まぁ、下線とかいいんでしょう→1.00_01等)。
- どうすればよいか?
- 数字以外の文字を取り除いてください。開発用バージョンとしてリリースしたいときは'Module-1.00_01'というフォーマットを使ってください(訳注:訳が不安)
○no_cpants_errors
- Shortcoming
- There where problems during CPANTS testing. Those problems are either caused by some very strange behaviour of this distribution or a bug in CPANTS.
- Remedy
- Contact me, as this distribution seems to have triggered a bug in CPANTS. I'll try to improve CPANTS (unless the problem is caused by some very strange behaviour of the distribution.)
○CPANTSエラーが無いこと
- 何がだめか
- CPANTSテストで問題が発生しています。配布パッケージがとても変な挙動をしているか、CPANTS側のバグです。
- どうすればよいか?
- 連絡ください。あなたの配布パッケージはCPANTSのバグを露呈させました。CPANTSの向上に努めます(あなたのパッケージが変な挙動したのでなければ)。
○has_readme
- Shortcoming
- The file 'README' is missing from this distribution. The README provide some basic information to users prior to downloading and unpacking the distribution.
- Remedy
- Add a README to the distribution. It should contain a quick description of your module and how to install it.
○READMEファイルがあるか?
- 何がだめか
- READMEファイルが見つかりません。READMEはインストールとダウンロードに関して基本的な情報を提供します。
- どうすればよいか?
- READMEを配布パッケージに追加してください。それはパッケージの概要とインストール方法が含まれているべきです。
○has_manifest
- Shortcoming
- The file 'MANIFEST' is missing from this distribution. The MANIFEST lists all files included in the distribution.
- Remedy
- Add a MANIFEST to the distribution. Your buildtool should be able to autogenerate it (eg 'make manifest' or './Build manifest')
○MANIFESTファイルがあるか?
- 何がだめか
- MANIFESTファイルが配布パッケージに含まれていません。MANIFESTには配布パッケージに含まれるファイルのリストが書かれています。
- どうすればよいか?
- MANIFESTを配布パッケージに追加してください。あなたのビルドツールが自動生成してくれるはずです(例:make manifest・./Build manifest)。
○has_meta_yml
- Shortcoming
- The file 'META.yml' is missing from this distribution. META.yml is needed by people maintaining module collections (like CPAN), for people writing installation tools, or just people who want to know some stuff about a distribution before downloading it.
- Remedy
- Add a META.yml to the distribution. Your buildtool should be able to autogenerate it.
○META.ymlファイルがあるか?
- 何がだめか
- META.ymlが配布パッケージに含まれていません。META.ymlはCPANのようにモジュールを管理する人やインストールツールの開発者、ただ単にモジュールについてダウンロードする前に知りたい人にとって必要になります。
- どうすればよいか?
- 配布パッケージにMETA.ymlを追加してください。あなたのビルドツールが自動生成してくれるはずです。
○has_buildtool
○ビルドツールが含まれているか?
- 何がだめか
- Metafile.PLまたはBuild.PLがありません。これが無いと人間がインストールすることを難しくするし、CPAN/CPANPLUSのような自動化ツールによるインストールを不可能にします。
- どうすればよいか?
- Module::Build(推奨)やExtUtils::MakeMakerのようなビルドツールを使用して配布パッケージを作ってください。
○has_changelog
- Shortcoming
- The distribution hasn't got a Changelog (named something like m/^chang(es?|log)|history$/i. A Changelog helps people decide if they want to upgrade to a new version.
- Remedy
- Add a Changelog (best named 'Changes') to the distribution. It should list at least major changes implemented in newer versions.
○ChangeLogがありません。
○no_symlinks
- Shortcoming
- This distribution includes symbolic links (symlinks). This is bad, because there are operating systems that do not handle symlinks.
- Remedy
- Remove the symlinkes from the distribution.
○シンボリックリンクを含んでいます。
○has_tests
- Shortcoming
- This distribution doesn't contain either a file called 'test.pl' or a directory called 't'. This indicates that it doesn't contain even the most basic test-suite. This is really BAD!
- Remedy
- Add tests!
○テストがあるか?
- 何がだめか
- この配布パッケージはテスト用のファイルであるtest.plか't'というディレクトリを含んでいません。これは基本的なテストでさえも含まないということを意味します。これではだめです!
- どうすればよいか?
- テストしなさい!
○proper_libs
- Shortcoming
- There is more than one .pm file in the base dir, or the .pm files are not in directory lib.
- Remedy
- Move your *.pm files in a directory named 'lib'. The directory structure should look like 'lib/Your/Module.pm' for a module named 'Your::Module'.
○libディレクトリが正しく使われているか
○use_strict
- Shortcoming
- This distribution does not use 'strict' in all of its modules.
- Remedy
- Add 'use strict' to all modules.
○strictプラグマを使っているか?
- 何がだめか
- この配布パッケージはstrictプラグマをまったく使っていません。
- どうすればよいか?
- 全部のモジュールにuse strictを追加してください。
○has_test_pod
- Shortcoming
- Doesn't include a test for pod correctness (Test::Pod)
- Remedy
- Add a test using Test::Pod to check for pod correctness.
○Test::Podを使っているか?
- 何がだめか
- PODの正しさを保つためのテストが含まれていません(Test::Pod)
- どうすればよいか?
- Test::Podを使ったテストを追加してください。
○has_test_pod_coverage
- Shortcoming
- Doesn't include a test for pod coverage (Test::Pod::Coverage)
- Remedy
- Add a test using Test::Pod::Coverage to check for POD coverage.
○Test::Pod::Coverageを使っているか
- 何がだめか
- (訳注:翻訳が不安)PODの対象をテストしていません(Test::Pod::Coverage)
- どうすればよいか?
- PODの対象をテストするためのテスト(Test::Pod::Coverage)を追加してください。
○is_prereq
- Shortcoming
- This distribution is not required by another distribution by another author.
- Remedy
- Convince / force / bribe another CPAN author to use this distribution.
○必要とされていません!
- 何がだめか
- この配布パッケージは他の開発者の配布パッケージから使われていません。
- どうすればよいか?
- 納得させるか・力ずくか・賄賂でも贈って他のCPAN Authorから使ってもらってください。
○no_pod_errors
- Shortcoming
- The documentation for this distribution contains syntactic errors in its POD.
- Remedy
- Remove the POD errors. You can check for POD errors automatically by including Test::Pod to your test suite.
○PODにエラーがないか
- 何がだめか
- この配布パッケージにPODの文法エラーがあります。
- どうすればよいか?
- PODの文法エラーを取り除いてください。Test::Podを使えば自動的にエラーを見つけることが出来ます。