名前¶
Module::Install::ReadmeMarkdownFromPod - create README.mkdn from POD
Module::Install::ReadmeMarkdownFromPod - PODから README.mkdnの生成
概要¶
# in Makefile.PL
use inc::Module::Install;
name 'Some-Module';
readme_markdown_from 'lib/Some/Module.pm';
説明¶
Module::Install::ReadmeMarkdownFromPod is a Module::Install extension that generates a README.mkdn file automatically from an indicated file containing POD whenever the author runs Makefile.PL. This file is used by GitHub to display nicely formatted information about a repository.
Module::Install::ReadmeMarkdownFromPodは Module::Installの拡張であり, Makefile.PLを実行したときに指定したファイルに含まれる PODから自動的に README.mkdnを生成します. このファイルは GitHubで見やすいようにフォーマットされた リポジトリの情報を示すために使われてます.
関数¶
readme_markdown_from-
Does nothing on the user-side. On the author-side it will generate a
README.mkdnfile using Pod::Markdown from the POD in the file passed as a parameter.readme_markdown_from 'lib/Some/Module.pm';If a second parameter is set to a true value then the
README.mkdnwill be removed atmake distclean.readme_markdown_from 'lib/Some/Module.pm' => 'clean';It will die unless a file name is given.
readme_markdown_from_pod-
Like
readme_markdown_frombut assumes thatall_fromhas been called before and uses the filename stored there to generate theREADME.mkdn. It then callsreadme_markdown_fromwith that filename. If this function is given an optional boolean parameter, that will be passed toreadme_markdown_fromas well, indicating whether to clean up the generatedREADME.mkdnfile atmake distcleantime. readme_from_pod-
Like
readme_markdown_from_pod, but affects the plain-textREADMEfile generation done in Module::Install::ReadmeFromPod. This function would be better placed in that module and might move there eventually. It is given here as a convenience because if you want to generate bothREADMEandREADME.mkdnyou can do this here without repeating the filename given inall_from. reference_module-
A utility function that saves you from repeatedly naming a reference module from which to extract information.
reference_module 'lib/Some/Module.pm';is equivalent to:
all_from 'lib/Some/Module.pm'; readme_from 'lib/Some/Module.pm'; readme_markdown_from 'lib/Some/Module.pm';It will die unless a file name is given. Note that
reference_modulewill not work with Shipit::Step::FindVersion because that module is looking for aversion_fromorall_fromstring inMakefile.PL
readme_markdown_from-
ユーザ側では何も行いません. 作者側でパラメータとして渡されたファイルに 含まれる PODから
README.mkdnファイルを Pod::Markdownを使って生成します.readme_markdown_from 'lib/Some/Module.pm';第二引数に真となる値が設定された場合,
make distcleanをした場合にREADME.mkdnを 削除します.readme_markdown_from 'lib/Some/Module.pm' => 'clean';ファイル名が与えられない場合は dieします.
readme_markdown_from_pod-
readme_markdown_fromと似ていますが,all_fromが事前に呼ばれていることが前提であり, そこで指定されたファイルからREADME.mkdnの生成します. 内部ではreadme_markdown_fromにその名前を指定して呼び出しています. この関数はオプショナルな booleanパラメータを指定することができます.readme_markdown_fromと同様であり,make distcleanをした場合に 生成したREADME.mkdnを削除します. readme_from_pod-
readme_markdown_fromと似ていますが, Module::Install::ReadmeFromPodを 使ってプレーンテキストのREADMEを生成します. この関数はそのモジュールがあり, 最終的にそちらを使うのであれば, いい選択でしょう.READMEとREADME.mkdnの両方を生成したい場合に, all_fromに与えるファイル名を 繰り返し書くことがないので, 便利に使えるでしょう. reference_module-
情報の抽出を行うために参照するモジュールの名前を繰り返し書かないで済むようにする ユーティリティ関数です.
reference_module 'lib/Some/Module.pm';は以下と等価です.
all_from 'lib/Some/Module.pm'; readme_from 'lib/Some/Module.pm'; readme_markdown_from 'lib/Some/Module.pm';ファイル名が与えられない場合は dieします.
reference_moduleは Shipit::Step::FindVersionと合わせて利用することはできません. なぜならそのモジュールはMakefile.PLからversion_fromかall_fromという文字列を見つけようと するからです.
BUGS AND LIMITATIONS¶
No bugs have been reported.
Please report any bugs or feature requests through the web interface at http://rt.cpan.org.
今のところ報告されたバグはありません.
バグが見つかったり, 実装して欲しい機能がある場合は http://rt.cpan.org ウェブインタフェースを使ってレポートしてください.
INSTALLATION¶
See perlmodinstall for information and options on installing Perl modules.
Perlモジュールのインストールについての情報とオプションについては perlmodinstallを 参照してください.
AVAILABILITY¶
The latest version of this module is available from the Comprehensive Perl Archive Network (CPAN). Visit http://www.perl.com/CPAN/ to find a CPAN site near you. Or see http://search.cpan.org/dist/Module-Install-ReadmeMarkdownFromPod/.
The development version lives at http://github.com/hanekomu/module-install-readmemarkdownfrompod/. Instead of sending patches, please fork this project using the standard git and github infrastructure.
このモジュールの最新バージョンは CPANから利用することができます. http://www.perl.com/CPAN/であなたに最も近い CPANサイトを探して見てください. もしくは http://search.cpan.org/dist/Module-Install-ReadmeMarkdownFromPod/ を参照してください.
開発中のバージョンは http://github.com/hanekomu/module-install-readmemarkdownfrompod/ にあります. パッチを送る代わりに, gitと githubの基盤を使ってこのプロジェクトを, ぜひ forkしてみてください.
作者¶
Marcel Grünauer, <marcel@cpan.org>
コピーライト & ライセンス¶
Copyright 2009 by Marcel Grünauer
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.