コンテンツにスキップ

「Plain Old Documentation」の版間の差分

出典: フリー百科事典『ウィキペディア(Wikipedia)』
削除された内容 追加された内容
m編集の要約なし
CasinoKat (会話 | 投稿記録)
「POD文書例」と「外部リンク」を大幅メンテ
22行目: 22行目:

これは文法的に正しい POD であり、節の題名についても規約に従っている。

これは文法的に正しい POD であり、節の題名についても規約に従っている。



{| class="wikitable"

=head1 NAME

!POD文書ソース !! HTML変換結果<ref>上段はHTML表示イメージ(ウィキペディアに適した形に修正しています)、下段はHTMLソース。実際には、ヘッダタグ、節の目次リスト(デフォルト)、フッタタグも出力される。</ref>

|-

podsample - A sample POD document

| style="width:50%; background-color: white; vertical-align:top;" rowspan="2" |

<pre style="overflow:auto; margin-left:0">

=head1 SYNOPSIS

=head1 名前


$here->isa(Piece::Of::Code);

podsample - POD文書のサンプル

print <<"END";


This indented block will not be scanned for formatting

=head1 概要

codes or directives, and spacing will be preserved.


END

$here->isa(Piece::Of::Code);

print <<"END";

=head1 DESCRIPTION

このインデントされたブロックはフォーマットされた

コードか指示のため、走査されずに、スペースは保持

Here's some normal text. It includes text that is

されるでしょう。

B<bolded>, I<italicized>, U<underlined>, and

END

C<$code>-formatted.


=head1 記述

=head2 An Example List


これは標準テキストです。これはB<ボールド>、I<イタリック>、

=over 4

U<アンダーライン>、C<$リテラルコード>のテキスト書式を

内部に含んでいます。

=item * This is a bulleted list.


=head2 例の一覧

=item * Here's another item.


=back 4

=over 4


=item * これは正丸リストです。

=begin html


=item * ここに別口があります。

&lt;img src="fig1.png" align="right" alt="Figure 1." /&gt;


&lt;p&gt;

=back

Here's some embedded HTML. In this block I can


include images, apply &lt;span style="color: green"&gt;

=begin html

styles&lt;/span&gt;, or do anything else I can do with


HTML. POD parsers that aren't outputting HTML will

<img src="Example.png" align="right" alt="範例" />

completely ignore it.

<p>

&lt;/p&gt;

ここに、何らかの埋め込まれたHTMLがあります。

このブロックでは、画像を入れたり、

=end html

<span style="color: green">スタイル</span>を

適用するか、HTMLで記述しています。PODパーサは

=head1 SEE ALSO

HTML出力中にそれを完全に無視することはありません。

</p>

L<perlpod>, L<perldoc>, L<Pod::Parser>.


=end html

=head1 COPYRIGHT


=head1 参照

Copyright 2005 [[:en:J. Random Hacker|J. Random Hacker]] <jrh@cpan.org>.


L<perlpod>, L<perldoc>, L<Pod::Parser>.

Permission is granted to copy, distribute and/or modify this


document under the terms of the GNU Free Documentation

=head1 著作権

License, Version 1.2 or any later version published by the


Free Software Foundation; with no Invariant Sections, with

Copyright 2005 J. Random Hacker <jrh@cpan.org>.

no Front-Cover Texts, and with no Back-Cover Texts.


Permission is granted to copy, distribute and/or modify this

=cut

document under the terms of the GNU Free Documentation

License, Version 1.2 or any later version published by the

Free Software Foundation; with no Invariant Sections, with

no Front-Cover Texts, and with no Back-Cover Texts.


=cut

</pre>

* ActivePerl 5.8.8に最初からインストールされている構文解析器の'''pod2html'''では、U<アンダーライン>、C<$コード> には対応していません。

* 変換ツールによってHTML変換の結果は変わってきます。

| style="width:50%; background-color: white; vertical-align:top" |

<!-- HTMLイメージ -->

<div style="overflow:auto; margin-left:0">

<span style="font-size:188%">名前</span><br />

<p>podsample - POD文書のサンプル</p>

<p>

</p>

<hr />

<div style="font-size:188%; padding-top: .5em; padding-bottom:.17em;">概要</div>

<nowiki>&nbsp;&nbsp;&nbsp;&nbsp;$here-&gt;isa(Piece::Of::Code);</nowiki><br />

<nowiki>&nbsp;&nbsp;&nbsp;&nbsp;print &lt;&lt;&quot;END&quot;;</nowiki><br />

<nowiki>&nbsp;&nbsp;&nbsp;&nbsp;このインデントされたブロックはフォーマットされた</nowiki><br />

<nowiki>&nbsp;&nbsp;&nbsp;&nbsp;コードか指示のため、走査されずに、スペースは保持</nowiki><br />

<nowiki>&nbsp;&nbsp;&nbsp;&nbsp;されるでしょう。</nowiki><br />

<nowiki>&nbsp;&nbsp;&nbsp;&nbsp;END</nowiki>

<p>

</p>

<hr />

<div style="font-size:188%; padding-top: .5em; padding-bottom:.17em;">記述</div>

<p>これは標準テキストです。これは<strong>ボールド</strong>、

<em>イタリック</em>、<ins>アンダーライン</ins>、<code>リテラルコード</code>の

テキスト書式を内部に含んでいます。</p>

<p>

</p>

<div style="font-size:150%; font-weight:bold; padding-top: .5em; padding-bottom:.17em;">例の一覧</div>

<ul>

<li><strong>これは正丸リストです。</strong>

<li><strong>ここに別口があります。</strong>

</ul>

[[Image:Example.png|範例|right|thumb]]

<p>

ここに、何らかの埋め込まれたHTMLがあります。

このブロックでは、画像を入れたり、

<span style="color: green">スタイル</span>を

適用するか、HTMLで記述しています。PODパーサは

HTML出力中にそれを完全に無視することはありません。

</p><p>

</p>

<hr />

<div style="font-size:188%; padding-top: .5em; padding-bottom:.17em;">参照</div>

<p><em>perlpod</em>, <em>perldoc</em>, [[/Pod/Parser|the Pod::Parser manpage]].</p>

<p>

</p>

<hr />

<div style="font-size:188%; padding-top: .5em; padding-bottom:.17em;">著作権</div>

<p>Copyright 2005 J. Random Hacker &lt;[mailto:jrh@cpan.org jrh@cpan.org]&gt;.</p>

<p>Permission is granted to copy, distribute and/or modify this

document under the terms of the GNU Free Documentation

License, Version 1.2 or any later version published by the

Free Software Foundation; with no Invariant Sections, with

no Front-Cover Texts, and with no Back-Cover Texts.</p>

</div>

|-

| style="vertical-align: top" |

<!-- HTMLソース -->

<pre style="overflow:auto; margin-left:0">

<nowiki>&lt;h1&gt;&lt;span id="name"&gt;名前&lt;/span&gt;&lt;/h1&gt;</nowiki>

<nowiki>&lt;p&gt;podsample - POD文書のサンプル&lt;/p&gt;</nowiki>

<nowiki>&lt;p&gt;</nowiki>

<nowiki>&lt;/p&gt;</nowiki>

<nowiki>&lt;hr /&gt;</nowiki>

<nowiki>&lt;h1&gt;&lt;span id="synopsis"&gt;概要&lt;/span&gt;&lt;/h1&gt;</nowiki>

<nowiki>&lt;pre&gt;</nowiki>

<nowiki> $here-&gt;isa(Piece::Of::Code);</nowiki>

<nowiki> print &lt;&lt;&quot;END&quot;;</nowiki>

<nowiki> このインデントされたブロックはフォーマットされた</nowiki>

<nowiki> コードか指示のため、走査されずに、スペースは保持</nowiki>

<nowiki> されるでしょう。</nowiki>

<nowiki> END&lt;/pre&gt;</nowiki>

<nowiki>&lt;p&gt;</nowiki>

<nowiki>&lt;/p&gt;</nowiki>

<nowiki>&lt;hr /&gt;</nowiki>

<nowiki>&lt;h1&gt;&lt;span id="description"&gt;記述&lt;/span&gt;&lt;/h1&gt;</nowiki>

<nowiki>&lt;p&gt;これは標準テキストです。これは&lt;strong&gt;ボールド&lt;/strong&gt;、</nowiki>

<nowiki>&lt;em&gt;イタリック&lt;/em&gt;、&lt;ins&gt;アンダーライン&lt;/ins&gt;、&lt;code&gt;リテラルコード&lt;/code&gt;の</nowiki>

<nowiki>テキスト書式を内部に含んでいます。&lt;/p&gt;</nowiki>

<nowiki>&lt;p&gt;</nowiki>

<nowiki>&lt;/p&gt;</nowiki>

<nowiki>&lt;h2&gt;&lt;span id="an_example_list"&gt;例の一覧&lt;/span&gt;&lt;/h2&gt;</nowiki>

<nowiki>&lt;ul&gt;</nowiki>

<nowiki>&lt;li&gt;&lt;strong&gt;&lt;span id="item_this_is_a_bulleted_list_2e"&gt;これは正丸リストです。&lt;/span&gt;&lt;/strong&gt;</nowiki>


<nowiki>&lt;li&gt;&lt;strong&gt;&lt;span id="item_here_27s_another_item_2e"&gt;ここに別口があります。&lt;/span&gt;&lt;/strong&gt;</nowiki>


<nowiki>&lt;/ul&gt;</nowiki>

<nowiki>[[Image:Example.png|範例|right|thumb]]</nowiki>

<nowiki>&lt;p&gt;</nowiki>

<nowiki> ここに、何らかの埋め込まれたHTMLがあります。</nowiki>

<nowiki> このブロックでは、画像を入れたり、</nowiki>

<nowiki> &lt;span style="color: green"&gt;スタイル&lt;/span&gt;を</nowiki>

<nowiki> 適用するか、HTMLで記述しています。PODパーサは</nowiki>

<nowiki> HTML出力中にそれを完全に無視することはありません。 </nowiki>

<nowiki>&lt;/p&gt;&lt;p&gt;</nowiki>

<nowiki>&lt;/p&gt;</nowiki>

<nowiki>&lt;hr /&gt;</nowiki>

<nowiki>&lt;h1&gt;&lt;span id="see_also"&gt;参照&lt;/span&gt;&lt;/h1&gt;</nowiki>

<nowiki>&lt;p&gt;&lt;em&gt;perlpod&lt;/em&gt;, &lt;em&gt;perldoc&lt;/em&gt;, &lt;a href=&quot;/Pod/Parser.html&quot;&gt;the Pod::Parser manpage&lt;/a&gt;</nowiki>

<nowiki>&lt;p&gt;</nowiki>

<nowiki>&lt;/p&gt;</nowiki>

<nowiki>&lt;hr /&gt;</nowiki>

<nowiki>&lt;h1&gt;&lt;span id="copyright"&gt;著作権&lt;/span&gt;&lt;/h1&gt;</nowiki>

<nowiki>&lt;p&gt;Copyright 2005 J. Random Hacker &lt;jrh@cpan.org&gt;.&lt;/p&gt;</nowiki>

<nowiki>&lt;p&gt;Permission is granted to copy, distribute and/or modify this </nowiki>

<nowiki>document under the terms of the GNU Free Documentation </nowiki>

<nowiki>License, Version 1.2 or any later version published by the </nowiki>

<nowiki>Free Software Foundation; with no Invariant Sections, with </nowiki>

<nowiki>no Front-Cover Texts, and with no Back-Cover Texts.&lt;/p&gt;</nowiki>

</pre>

|}



== POD における書式の詳細 ==

== POD における書式の詳細 ==

90行目: 208行目:


POD 内のコマンド(ディレクティブ)には、4段階の節、番号なしと番号つきのリスト、他の言語の節などがある。他の言語の節は、その言語を解釈する構文解析器による特殊な整形を可能にする。

POD 内のコマンド(ディレクティブ)には、4段階の節、番号なしと番号つきのリスト、他の言語の節などがある。他の言語の節は、その言語を解釈する構文解析器による特殊な整形を可能にする。


== 参考文献 ==

* Wall, Larry; Christiansen, Tom; & Orwant, Jon (2000). ''Programming Perl'' (3rd ed.). Sebastopol: O'Reilly & Associates. ISBN 0-12-345678-9.


== 脚注 ==

<references />



== 関連項目 ==

== 関連項目 ==

* [[Perl]]

* [[Perl]]

* [[ラリー・ウォール]]

* [[ラリー・ウォール]]


== 参考文献 ==

* Wall, Larry; Christiansen, Tom; & Orwant, Jon (2000). ''Programming Perl'' (3rd ed.). Sebastopol: O'Reilly & Associates. ISBN 0-12-345678-9.



== 外部リンク ==

== 外部リンク ==

* [http://homepage3.nifty.com/hippo2000/perltips/ Perlの小技]

* [http://search.cpan.org/~nwclark/perl-5.8.8/pod/perlpod.pod perlpod] POD形式の文書を書く人向けの説明

** [http://homepage3.nifty.com/hippo2000/perltips/podread.htm#2. Perlドキュメントの読み方]

* [http://search.cpan.org/~nwclark/perl-5.8.8/pod/perlpodspec.pod perlpodspec] POD形式の構文解析器を書く人向けの説明

* [http://hio.jp/ 氷魚.jp]

* Perl のマニュアルページの解釈前のPOD形式は [http://search.cpan.org/src/NWCLARK/perl-5.8.8/pod/] にある。

** [http://hio.jp/tips/perl/perldoc-5.8.0-old/pod/perlpod.html perlpod] - <small>Perlに標準インストールされているPODの書き方マニュアル(和訳)</small>

* ディレクトリ [http://search.cpan.org/src/NWCLARK/perl-5.8.7/lib/] には POD書式が埋め込まれたモジュールが多数存在する。

** [http://hio.jp/tips/perl/perldoc-5.8.0-old/pod/pod2html.html pod2html] - <small>POD→HTMLに変換するツールのマニュアル(和訳)</small>

* [http://search.cpan.org/perldoc?Getopt%3A%3AEuclid Getopt::Euclid module] は入力を POD タグに基づいて自動的に構文解析する。


** [http://hio.jp/tips/perl/perldoc-5.8.0/lib/Pod/ index of /Pod] - <small>PerlPODPod::××(Pod::)Html</small>

* [http://search.cpan.org/ The CPAN search site] - <small>Perlで一番信頼のおけるモジュール配布サイト。 (英語)</small>

** [http://search.cpan.org/~nwclark/perl-5.8.8/pod/perlpod.pod perlpod] - <small>POD形式の<u>文書</u>を書く人向けの説明。</small>

** [http://search.cpan.org/~nwclark/perl-5.8.8/pod/perlpodspec.pod perlpodspec] - <small>POD形式の<u>構文解析器</u>を書く人向けの説明。</small>

** [http://search.cpan.org/~rgarcia/perl-5.10.0/pod/pod2html.PL pod2html] - <small>POD→HTMLに変換するツールのマニュアル</small>

** [http://search.cpan.org/~dland/Pod-Html-1.09_01/Html.pm Pod::Html] - <small>POD→HTMLに変換する標準モジュールのマニュアル</small>

** [http://search.cpan.org/perldoc?Getopt%3A%3AEuclid Getopt::Euclid module] - <small>入力を POD タグに基づいて自動的に構文解析する。</small>

** [http://search.cpan.org/src/NWCLARK/perl-5.8.8/pod/ Index of /src/NWCLARK/perl-5.8.8/pod/] - <small>Perl のマニュアルページの解釈前のPOD形式を公開。</small>

** [http://search.cpan.org/src/NWCLARK/perl-5.8.7/lib/ Index of /src/NWCLARK/perl-5.8.7/lib/] - <small>ディレクトリにPOD書式が埋め込まれたモジュールが多数存在する。</small>



[[Category:Perl]]

[[Category:Perl]]


2008年5月3日 (土) 17:36時点における版


Plain Old DocumentationPODPerl 


POD 



HTML  TeX







perlpod PODPODPODPerl使 Programming Perl PerlPOD  MOD Mark Jason Dominus  Higher-Order Perl 使


POD  Perl 使Perl  Perl Perl.com  Perl  WebParrot使

PODperldoc 使UNIXHTML

 POD  .pod POD  Perl 使 .pl  .pm Perl  POD 

POD


 POD 
POD文書ソース HTML変換結果[1]
=head1 名前

podsample - POD文書のサンプル

=head1 概要

    $here->isa(Piece::Of::Code);
    print <<"END";
    このインデントされたブロックはフォーマットされた
    コードか指示のため、走査されずに、スペースは保持
    されるでしょう。
    END

=head1 記述

これは標準テキストです。これはB<ボールド>、I<イタリック>、
U<アンダーライン>、C<$リテラルコード>のテキスト書式を
内部に含んでいます。

=head2 例の一覧

=over 4

=item * これは正丸リストです。

=item * ここに別口があります。

=back

=begin html

<img src="Example.png" align="right" alt="範例" />
<p>
    ここに、何らかの埋め込まれたHTMLがあります。
    このブロックでは、画像を入れたり、
    <span style="color: green">スタイル</span>を
    適用するか、HTMLで記述しています。PODパーサは
    HTML出力中にそれを完全に無視することはありません。
</p>

=end html

=head1 参照

L<perlpod>, L<perldoc>, L<Pod::Parser>.

=head1 著作権

Copyright 2005 J. Random Hacker <jrh@cpan.org>.

Permission is granted to copy, distribute and/or modify this 
document under the terms of the GNU Free Documentation 
License, Version 1.2 or any later version published by the 
Free Software Foundation; with no Invariant Sections, with 
no Front-Cover Texts, and with no Back-Cover Texts.

=cut
  • ActivePerl 5.8.8に最初からインストールされている構文解析器のpod2htmlでは、U<アンダーライン>、C<$コード> には対応していません。
  • 変換ツールによってHTML変換の結果は変わってきます。




podsample - POD






    $here->isa(Piece::Of::Code);
    print <<"END";
    
    
    
    END
















 HTML     HTMLPOD  HTML






perlpod, perldoc, the Pod::Parser manpage.






Copyright 2005 J. Random Hacker <jrh@cpan.org>.

Permission is granted to copy, distribute and/or modify this  document under the terms of the GNU Free Documentation  License, Version 1.2 or any later version published by the  Free Software Foundation; with no Invariant Sections, with  no Front-Cover Texts, and with no Back-Cover Texts.
<h1><span id="name">名前</span></h1>
<p>podsample - POD文書のサンプル</p>
<p>
</p>
<hr />
<h1><span id="synopsis">概要</span></h1>
<pre>
    $here->isa(Piece::Of::Code);
    print <<"END";
    このインデントされたブロックはフォーマットされた
    コードか指示のため、走査されずに、スペースは保持
    されるでしょう。
    END</pre>
<p>
</p>
<hr />
<h1><span id="description">記述</span></h1>
<p>これは標準テキストです。これは<strong>ボールド</strong>、
<em>イタリック</em>、<ins>アンダーライン</ins>、<code>リテラルコード</code>の
テキスト書式を内部に含んでいます。</p>
<p>
</p>
<h2><span id="an_example_list">例の一覧</span></h2>
<ul>
<li><strong><span id="item_this_is_a_bulleted_list_2e">これは正丸リストです。</span></strong>

<li><strong><span id="item_here_27s_another_item_2e">ここに別口があります。</span></strong>

</ul>
[[Image:Example.png|範例|right|thumb]]
<p>
    ここに、何らかの埋め込まれたHTMLがあります。
    このブロックでは、画像を入れたり、
    <span style="color: green">スタイル</span>を
    適用するか、HTMLで記述しています。PODパーサは
    HTML出力中にそれを完全に無視することはありません。 
</p><p>
</p>
<hr />
<h1><span id="see_also">参照</span></h1>
<p><em>perlpod</em>, <em>perldoc</em>, <a href="/Pod/Parser.html">the Pod::Parser manpage</a>
<p>
</p>
<hr />
<h1><span id="copyright">著作権</span></h1>
<p>Copyright 2005 J. Random Hacker <jrh@cpan.org>.</p>
<p>Permission is granted to copy, distribute and/or modify this 
document under the terms of the GNU Free Documentation 
License, Version 1.2 or any later version published by the 
Free Software Foundation; with no Invariant Sections, with 
no Front-Cover Texts, and with no Back-Cover Texts.</p>

POD における書式の詳細


POD ASCII Latin-1  UnicodePOD  POD  POD POD (=)POD"=cut" PODPOD POD POD 

POD  "verbatim paragraphs" 使 "command paragraphs"  POD  "ordinary paragraphs" 

ordinary paragraphs  command paragraphs POD POD

1(<)(>)B<bolded text> 

12(<<)(>>)B<< bolded text >> 使

POD 4


Wall, Larry; Christiansen, Tom; & Orwant, Jon (2000). Programming Perl (3rd ed.). Sebastopol: O'Reilly & Associates. ISBN 0-12-345678-9.



(一)^ HTMLHTML


Perl



Perl
Perl

.jp
perlpod - PerlPOD

pod2html - PODHTML

index of /Pod - PerlPODPod::××(Pod::)Html

The CPAN search site - Perl ()
perlpod - POD

perlpodspec - POD

pod2html - PODHTML

Pod::Html - PODHTML

Getopt::Euclid module -  POD 

Index of /src/NWCLARK/perl-5.8.8/pod/ - Perl POD

Index of /src/NWCLARK/perl-5.8.7/lib/ - POD