私がこのダミーのPerlパッケージを持っているとしましょうtest.pm
:
package test;
use strict;
use warnings;
=head1 DESCRIPTION
=head2 env
Return the environment name.
=cut
sub env { return "environment name"; }
=head2 hst
Return the history file name.
=cut
sub hst { return "history file"; }
=head2 hst_dir
Return the directory containing the history file.
=cut
sub hst_dir { return "history directory"; }
1;
Test::Spelling
次に、コマンドラインから...を使用してスペルチェックを実行します。
$ perl -MTest::More -MTest::Spelling \
> -e 'pod_file_spelling_ok("test.pm", "spell check"); done_testing;'
...、および私の関数名env
とhst
はタイプミスとしてマークされていますが、hst_dir
受け入れられます:
not ok 1 - spell check
# Failed test 'spell check'
# at -e line 1.
# Errors:
# env
# hst
1..1
# Looks like you failed 1 test of 1.
カスタム辞書をでリストできることは知っていますadd_stopwords()
が、私の意見では、関数名のスペルチェックはまったく行わないでください。
ドキュメントの細かい部分を見逃しましたか?