Module-Install-ReadmeMarkdownFromPod-0.03 > Module::Install::ReadmeMarkdownFromPod
Module-Install-ReadmeMarkdownFromPod-0.03

名前

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::ReadmeMarkdownFromPodModule::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.mkdn file 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.mkdn will be removed at make 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_from but assumes that all_from has been called before and uses the filename stored there to generate the README.mkdn. It then calls readme_markdown_from with that filename. If this function is given an optional boolean parameter, that will be passed to readme_markdown_from as well, indicating whether to clean up the generated README.mkdn file at make distclean time.

readme_from_pod

Like readme_markdown_from_pod, but affects the plain-text README file 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 both README and README.mkdn you can do this here without repeating the filename given in all_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_module will not work with Shipit::Step::FindVersion because that module is looking for a version_from or all_from string in Makefile.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を生成します. この関数はそのモジュールがあり, 最終的にそちらを使うのであれば, いい選択でしょう. READMEREADME.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_moduleShipit::Step::FindVersionと合わせて利用することはできません. なぜならそのモジュールは Makefile.PLから version_fromall_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.

SEE ALSO

Pod::Markdown

Module::Install

Module::Install::ReadmeFromPod