Skip to content

Latest commit

 

History

History
1545 lines (1011 loc) · 40.8 KB

perlpod.pod

File metadata and controls

1545 lines (1011 loc) · 40.8 KB

NAME

perlpod - Plain Old Documentation �����í�若��������

DESCRIPTION

Pod ��壔�� Perl��� Perl �����㏍�違�í�����Perl ��≪�吾�ャ�若�˨�勉������� �����㏍�ャ�<�潟�������吾����������勛亜�����˩戎�����������若�壔�≪�����荐�茯���с�����

Pod �����������㋘�若�潟����㏍�鴻�����HTML���man �����若�吾�ŝ�í�勉����障����障�ŝ����í�若���������� 紊������������������勉����í�潟�鴻�㋘�若�帥����������障�����

Pod �����若�壔�≪�������� 3 腮勰����勖侊��純�����罕������������障��: ordinary, verbatim, command ��с�����

Ordinary Paragraph

(��勰����勖侊���)

�����ŝ����勉����㏍�ャ�<�潟����勖侊��純�勉�祉�������í��(������������������������) ��勰����勉����㏍�鴻����勉����㏍����壔�с����� �����˩����勉����若�壔�≪��������篏帥�������˨����㏍�鴻�������吾��������緇���̥Ã茵����臀勉����障��; �����í�若����������c�潟�違��������������������絨������勉����í�若����������c�潟�違��茵���������障����� �����í�������潟�違����������㏍����若�激�с����˨����í�潟����с�勤;腓冴����� ���膈���蚊��篁������������c����������с�����

��勰����勖侊��純�� 綣決Ě ��ゃ�帥�ŝ����� ��潟�若����鴻�帥�ゃ�� �����ゃ����若�ŝ�潟�� ��ŝ�í�勉����í�若����������c�潟�違�潟�若�����篏帥�������������堺�ャ�障����� �����������勉�潟�若����壚札筝���� "Formatting Codes" �� �����勉�цą��������障�����

Verbatim Paragraph

(�����勉�障�障�勖侊���)

�����勉�障�障�勖侊��純�壔����潟�若�������㏍����壔�������劫�ャ�ŝ����若�鴻�������í�若����������c�潟�違�� 筝�荀���с����í�������潟�違�������鴻����с�壔�ŝ�������㏍�鴻�����茵◐憗�������������̥�������������障�����

�����勉�障�障�勖侊��純�夌Ã��純����帥����у����障�c�⓾����������������������˨����c�☀��茘���������障����� (膂≦����̬����������������勐����⓾�勤����夌Ã��純����帥����у����障�c�⓾����障�����) ��帥�����8��˨�í�����������篁勐����������⓾����勉�障�上�阪����������障����� ��号����ŝ����í�若����������潟�若���� ��������障����������������ゃ�帥�ŝ����壔�˨�������������c����������壔�с����障��������\���\��с�� �����勌����勖����潟�壔�������障��������

Command Paragraph

(��潟����潟��罧笈��)

��潟����潟��罧笈�純�壔����㏍�鴻����勐�����篏������劫�ャ�ʋ�宴�������������������̥�������������障��; ��勰����虁����冴�������ŝ�鴻����������☎�������������障�����

�����鴻�⓾�勉�潟����潟��罧笈��(��後�������˨�壚��茵���������������ŝ����障��)��壎��=�����у����障�c� �����勐����̬����ュ�����膓������� ��������˨�潟����潟��������綽�荀���������������㏍�鴻�����膓������障����� �憜��篏帥�������潟����潟����壚札筝���勰�������с�����

=pod
=head1 Heading Text
=head2 Heading Text
=head3 Heading Text
=head4 Heading Text
=over indentlevel
=item stuff
=back
=begin format
=end format
=for format text...
=encoding type
=cut

篁ヤ����̬¼膣違��茯㋛�������障��:

=head1 Heading Text
=head2 Heading Text
=head3 Heading Text
=head4 Heading Text

head1 ������ head4 ��虁����冴����������������障��; head1 ������筝�篏���с����� �����勖侊��純�勖�������勉����㏍�鴻����虁����冴����勐��絎鴻�с����� 箴�:

=head2 Object Attributes

"Object Attributes"��������������㏍�鴻�������������с�勤����冴�������ŝ����障����� �����������勤����冴����潟����潟����勉����㏍�鴻����с�壚札筝���勉�������˨����í�若����������c�潟� ��潟�若�����篏帥����障��:

=head2 Possible Values for C<$/>

�����������勉�潟����潟����壚札筝���� "Formatting Codes" �� 茯㋛����������⓾����障�����

=over indentlevel
=item stuff...
=back

item, over, back ��壔�����絨����茯㋛�����綽�荀���с��: "=over" ��� "=item" ���篏帥�c����ŝ�鴻����������������勰����勖侊���(��勛��)��� ��ゃ�潟����潟����������������勉�ŝ�若�吾�с�潟�����紮������障����� ��ŝ�鴻����勖��緇���с�壔�����������腓冴����������� "=back" ���篏帥����障����� "=over" ��� indentlevel ��ŝ����激�с�潟�壔�í�������������ゃ�潟����潟�������������� 腓冴�����筝���㋜����˨�壠��篏���� ems (1 em ��壔����㏍�ャ�<�潟����勉����若�鴻����í�潟����с��"M"�� 綛���с��) �����������������������������������勐��篏���с��; indentlevel ��ŝ����激�с�潟�� ��ŝ����翫�������������í�˨����� 4 ��с����� (篏���� indentlevel ������絎������⓾����∴�������������í�若�������帥����������障�����) =item stuff... ��� stuff ��勌賢��с�壔�� 篁ヤ����勉�������˨����í�若����������c�潟�違�潟�若�����篏帥�������������с����障��:

=item Using C<$|> to Control Buffering

�����������勉�潟����潟����壚札筝���� "Formatting Codes" �� 茯㋛����������⓾����障�����

"=over" ... "=back" ��ŝ�若�吾�с�潟��篏帥����������勉�������ゃ���� ��堺�㋜����ŝ�˨�若�˨�����������������羈���������☖�����������

  • "=over" ... "=back" ��ŝ�若�吾�с�潟�勐����с�� "=item" ��壚戎�����障��������

  • "=over" ... "=back" ��ŝ�若�吾�с�喝����� "=item" ����������憗����ŝ����勉�с�ŝ����������� "=over" ��潟����潟����勐����������������吾����������勉�� "=item" ��с�������鴻����с�����

  • "=over" ... "=back" ��ŝ�若�吾�с�潟�勌賢��� "=headn" ��壚戎�����障��������

  • ��������⓾����������������c��������荀���ŝ�������������⓾��item ��勌��莢���с��膓㊥�������⓾�����������: ��鴻����阪����������������˨�壠����⓾�� item ��� "=item *" ���篏帥�c�⓾�����������; ��ɱ垬�������ŝ�鴻�������阪����������������˨�� "=item 1.", "=item 2." ��ŝ�í��篏帥�c�⓾�����������; ��鴻����ɱ垩��篁������ŝ����翫����� "=item foo", "=item bar" ��ŝ�í��篏帥�c�⓾��������������

    ��鴻����ɱ垩�у����������ŝ����������c�����������篏帥�c�⓾�����������; �����í�若�������帥�壩������� "=item" ��勉�帥�ゃ�����荀���⓾�ŝ�鴻����勉����í�若����������号�����羆阪�������障�����

=cut

Pod �����㏍����壔��腟�篋���������������˨�壔��腥肴�����"=cut"��у����障��茵����腥肴�������吾����障����� ��������˨����� Perl (��� Pod �����í�若��������) ��壔����������� Perl ��潟�若����� ��������������������������������障����� ("=cut" ��勐����勛Ã茵���壩��茵������˨�壚��荀���с��������紊������勐𡉴�� Pod �����㏍�祉����泣�壔��������綽�荀���с�����)

=pod

"=pod" ��潟����潟����壔�������ʃ昆��с�壔�祉�������î����������障����������� Perl (��� Pod �����í�若��������)��� Pod �����㏍����壔��������������紮���障�����������腓冴����障����� Pod �����㏍����壔�� ��������������� ��潟����潟��罧笈�純�ч��紮���������勉�с�� "=pod" ��潟����潟����壩�勰�� Pod �����㏍����壔����勰����勖侊��純�������勉�障�障�勖侊��純����� 紮������������������˩戎�����障�����箴�:

=item stuff()

This function does stuff.

=cut

sub stuff {
  ...
}

=pod

Remember to check its return value, as in:

  stuff() || die "Couldn't do stuff!";

=cut
=begin formatname
=end formatname
=for formatname text...

for, begin, end ��壔�����絽吾�� Pod �����㏍�鴻����������☀В��������������勉�с�壔�ŝ����� ��贋・��劫����勉����í�若�������帥��羝<����������鴻�������㏍�鴻��/��潟�若��/�����若�帥�� �����������壔����勌����勛�劫�ャ�ŝ����勉�勰��������絎�臂í�с����障����� �����勉����í�若�����������篏帥�������í�若����������壔����勰��������篏帥����� ��������ŝ�������医�������̥�∴�������障�����

"=begin formatname" ��潟����潟��, ��������ゃ����勖侊���, "=end formatname" ��潟����潟����壔����壔����障����������㏍�鴻��/�����若�帥�� formatname �����若�違�������劫�ャ�ŝ����í�若��������������茹c����������í�若�������睡���� ��������������������潟����障�����箴�:

=begin html

<hr> <img src="thang.png">
<p> This is a raw HTML paragraph </p>

=end html

"=for formatname text..." ��潟����潟����壔�� �����勖侊��純�勖�����(formatname ��勛�翫��������)�����劫�ャ�ŝ����í�若����������с�������������� ���絎������障�����

=for html <hr> <img src="thang.png">
<p> This is a raw HTML paragraph </p>

��������壚��荐���� "=begin html" ... "=end html" ��ŝ�若�吾�с�潟�������������潟�с�����

��������壔��"=for" ��с�� 1 罧笈�純�勉����㏍�鴻����勉�帥�����絎���с����障�� (��ゃ�障�� "=foo targetname text...")������ "=begin targetname" ... "=end targetname" ��с�壔����勰�����絅純����ʒ����勉����㏍�鴻����� ���絎���с����障����� ("=begin" ��潟����潟����勛�翫����� "=end" ��潟����潟����勛�翫����̥Ã茵����綽�荀���с������������� 羈���������⓾��������������)

���������篏帥�c��箴����綛障�ゃ����������障�����������

=begin html

<br>Figure 1.<br><IMG SRC="figure1.png"><br>

=end html

=begin text

  ---------------
  |  foo        |
  |        bar  |
  ---------------

^^^^ Figure 1. ^^^^

=end text

�憜��篏帥����������勉�с����������í�若��������������"roff", "man", "latex", "tex", "text", "html"��с����� (筝������勉����í�若�������帥�壚����勉����勉�勐�ュ����������〠�宴�������障�����)

�����í�若�����������"comment" ���(��������������壔����ŝ����ʃ昆��勉��������)�����ŝ����<�≪�с�� �����í�若����������c�潟�違����� Pod �����㏍�ャ�<�潟����˨�夌憗�������鴻����с�ŝ����翫���� ���������������筝���㋜����ɱ��腱違�с�����

=for comment
Make sure that all the available options are documented!

�����í�若�������帥�勌賢��˨�壔�� �����㏍�鴻����������勉����若�帥�с�ŝ����������í�����Pod �����㏍�鴻����с�壔����� (��ゃ�障�������í�若����������c�潟�違�潟�若�������˨�����������������)�����������ャ���������������� "=for :formatname" ��� "=begin :formatname" ... "=end :formatname") �� ��������� formatnames ��勐����㏍�˨�潟�㏍�潟��綽�荀���ɱ�翫�������������障�� (���絽吾�勖侊��純�с�壔�ŝ��������羈���������⓾����í�若�������������������勉�ŝ�í�с��)���

=encoding encodingname

�����勉�潟����潟����壔����㏍�ャ�<�潟����勉����潟�潟�若����c�潟�違��羆阪����������勉�˩戎��������障����� ��祉�������í�勉�⓾�若�吟�若�˨�壚��荀���ŝ����勉�с��; ��������������������潟�潟�若����c�潟�違�� US-ASCII ��с�ŝ����翫����� =encoding encodingname ��潟����潟����������㏍�ャ�<�潟����勉����ŝ��紮������勖�鴻� 臀勉����⓾�������������с��pod �����í�若�������帥�������㏍�ャ�<�潟�������í�勉������� �����潟�若����������違�������������ャ�������������с����障����� encodingname ��̹�≪����⓾�壔��Encode::Supported ��ц��茘���������� ���������篏帥�c�⓾�������������� pod �����í�若�������帥�˨����c�⓾�� Latin-1 ��� CP-1252 ��� UTF-8 �����潟�潟�若����c�潟�違�� �ィ羝㋘�������������������������������障������������ィ羝㋘�奝����������������������障�������� �ウ絲���� ASCII 篁ュ����勉����勉��篏帥����翫����壔�����腓冴�������勉�������壔�с����� 箴�:

=encoding utf8

=encoding koi8-r

=encoding ShiftJIS

=encoding big5

=encoding ��壩����後��篏����綵演�帥��筝�������筝�綺⓾�����������篏帥����障��������

��������☗�������ŝ����ф⓲��������������壔��=encoding 篁ュ����勐����⓾�勉�潟����潟����壔������� ��潟����潟�����臀勉��������茵���с�壔�ŝ�������潟����潟����������� 罧笈�� ��勛��腴壔�障�с�潟����潟����� 綵演�帥����������������������с����� ��с�������������勌����˨�壔�� �����潟����潟����勐��������罧笈�純��腟�篋������������������̥Ã茵������������勉�с����� (��������☖�������勐𡉴�� Pod �����í�潟�鴻�㋘�若�帥�壔�������ャ����⓾��罩e����с����� =encoding 茵��� 綣����膓���霣肴�����綽�荀���������������障��������)

綛障�ゃ��箴������������障��������:

=over

=item *

First item

=item *

Second item

=back

=over

=item Foo()

Description of Foo function

=item Bar()

Description of Bar function

=back

Formatting Codes

(�����í�若����������c�潟�違�潟�若��)

��勰����勖侊��純�������������ゃ����勉�潟����潟��罧笈�純�с�壔�������障����障� �����í�若����������c�潟�違�潟�若��(��障����勐�����"��������激�若�宴�潟��")���篏帥�������������с����障��:

I<text> -- italic text

綣決Ě ("be I<careful!>") ��������í�<�若� ("redo I<LABEL>") ��勉�������˩戎�����障�����

B<text> -- bold text

��鴻�ゃ�����("perl's B<-n> switch")��� �����㏍�違�í��("some systems provide a B<chfn> for that")��� 綣決Ě ("be B<careful!>")��������勌�� ("and that feature is known as B<autovivification>")�� ��������˩戎�����障�����

C<code> -- code text

��潟�若�������帥�ゃ����í�ゃ�帥����í�潟�������� �����������壔����㏍�違�í�������㏍�鴻��("C<gmtime($^T)>")��� �����勌����勉�潟�潟����ャ�若�睡�◑��("C<drwxr-xr-x>") ��� 茵◐憗����⓾��������������腓冴�������勌����勐就��с�㋘�潟����ŝ�潟�違�������障�����

篁ヤ����勉�������˨����障����障�ʋ��羈������������障����� ���羈���勌賢��с��text, name, section ��� '/' ��� '|' �����˨����������壔�с����障�����; ��障�����'<' ��� '>' ��壠嚳綽������ŝ�������違�ŝ����障��������

  • L<name>

    Perl ��������ャ�≪�˨����若�吾�吾�勉�ŝ�潟�壔��荐㊤�������障��(箴������� L<Net::Ping>)��� name ��̥Ã��純����˨�������������с����ŝ�����������羈���������⓾�������������� �����勖��羈���� L<crontab(5)> ��勐就��� Unix man �����若�吾�吾� ��ŝ����<�㋘�潟�鴻�勉�������˩戎��������������������������障�����

  • L<name/"sec"> ��障����� L<name/sec>

    篁���勉�������ャ�≪�˨����若�吾�吾�勉����������勉�吾�勉�ŝ�潟�壔��荐㊤�������障����� 箴�: L<perlsyn/"For Loops">

  • L</"sec"> ��障����� L</sec>

    �����勉�������ャ�≪�˨����若�吾�吾�勉����������勉�吾�勉�ŝ�潟�壔��荐㊤�������障����� 箴�: L</"Object Methods">

��祉�壔�激�с�潟�壠�����篁������勤����冴����� item ��у����障����障����� �����������違��L<perlvar/$.> ��� L<perlvar/"$."> �� 筝≧�鴻����� perlvar ��� "=item $." ��у����障����祉�壔�激�с�潟�吾�ŝ�潟�壔����障����� L<perlsyn/For Loops> ��� L<perlsyn/"For Loops"> �� 筝≧�鴻����� perlsyn ��� "=head2 For Loops" ��у����障����祉�壔�激�с�潟�˨�ŝ�潟�壔����障�����

��í����ŝ����㏍�鴻�����茵◐ず��̥����������������������九勝��������������˨�壔�� "L<text|...>" ���篏帥�c�⓾�����������; ��ゃ�障��:

  • L<text|name>

    �����勉����㏍�鴻��������絎���������������ャ�≪�˨����若�吾�吾�勉�ŝ�潟�壔��荐㊤�������障����� 箴�: L<Perl Error Messages|perldiag>

  • L<text|name/"sec"> ��障����� L<text|name/sec>

    �����勉����㏍�鴻��������絎���������������ャ�≪�˨����若�吾�勉����������勉�吾�勉�ŝ�潟�壔��荐㊤�������障����� 箴�: L<postfix "if"|perlsyn/"Statement Modifiers">

  • L<text|/"sec"> ��障����� L<text|/sec> ��障����� L<text|"sec">

    �����勉����㏍�鴻����˨����勉�������ャ�≪�˨����若�吾�勉����������勉�吾�勉�ŝ�潟�壔��荐㊤�������障����� 箴�: L<the various attributes|/"Member Data">

web �����若�吾�˨�ŝ�潟�壔��荐㊤�������������������с����障�����

  • L<scheme:...>

    L<text|scheme:...>

    腟九嚳 URL ��吾�勉�ŝ�潟�壔�с����� 箴������違��L<http://www.perl.org/> ��� L<The Perl Home Page|http://www.perl.org/>���

E<escape> -- a character escape

HTML/XML &foo; "絎�篏�������"��������⓾��篌若�⓾����障�����

  • E<lt> -- ��ŝ����í�˨�� < (less than)

  • E<gt> -- ��ŝ����í�˨�� > (greater than)

  • E<verbar> -- ��ŝ����í�˨�� | (vertical bar)

  • E<sol> -- ��ŝ����í�˨�� / (solidus)

    筝�荐���� 4 ��ゃ�壚����勉����í�若����������c�潟�違�潟�若����勌賢 (��鴻�� L<...>)������紊ф��絖���������˨�ゃ�������������翫�������ゃ���� ��ŝ����激�с�潟�с�����

  • E<htmlname>

    ��������ゃ����勖�医�ゃ�с�ŝ�� HTML �����潟����c����e��(E<eacute> ��勉�������ŝ�����)�� HTML ��с�� &eacute; ��������������潟�с�� -- ��ゃ�障����� acute (/-��勐就���) ��≪�壔�泣�割�������勐�����絖���� e ��с�����

  • E<number>

    �����勛�ɱ垩�� ASCII/Latin-1/Unicode ���絖���с����� E<0x201E> ��勉�������������㏍�� "0x" ������������ number ��� 16 ��我�違�с����� E<075> ��勉�������������㏍�� "0" ������������ number ��� 8 ��我�違�с����� E<181> ��勉�������˨�����篁ュ����с�� number ��� 10 ��我�違�◑В�����������障�����

    �𡉴�� Pod �����í�若�������帥�� 8 ��我�違�� 16 ��我�違�勉����鴻�宴�若�����茯�茘������ŝ�� �櫝�醇�с�������������障��紊������勉����í�若�������帥�� 255 篁ヤ����勖��絖���� 罩c�������㋘�潟����ŝ�潟�違�с�������������������ŝ�����������羈���������⓾�������������� (Latin-1/CP-1252 ���絖���с�����罩c�������㋘�潟����ŝ�潟�違�с����ŝ�������í�若�������帥����������障��; 箴������� E<eacute> �����勰����� "e" ��˨�㋘�潟����ŝ�潟�違����障�����)

F<filename> -- used for filenames

��後�������˨�壔�ゃ�帥�ŝ����壔�ц;腓冴�������障�����箴�: "F<.cshrc>"

S<text> -- text contains non-breaking spaces

��������� text ��勐��絎鴻��茵������障�������ŝ����������������潟����障����� 箴�: <S<$x ? $y : $z>>

X<topic name> -- an index entry

��������壠�������勉����í�若�������帥�с�夌�∴����������障�������� ��ゃ�潟�������壔�鴻��篏������������勉�˩戎��������������������������障����� 絽吾�̥Ã���絖������������⓾�㋘�潟����ŝ�潟�違�������障����� 箴�: X<absolutizing relative URLs>

Z<> -- a null (zero-effect) formatting code

��������壔�障����̥�������������障����� ��������í�� E<...> ��潟�若�����篏帥����号����勌����ゃ�с����� 箴������違��("N<3" ��勉��������) "NE<lt>3" ��勌撮�������� "NZ<><3" �����吾����障�� ("Z<>" ��� "N" ��� "<" ������茹c�������勉� "N<...>" ��勌��������(��������c��)茹i�������������������壔�������障�����)���

��������⓾����勐�翫�������潟�若�������í�若����������c�潟�違�勖�����������緇���勉����ŝ����帥������� 1 腟���勐臼��㋚磁��勉�帥��綽�荀���с����� �����������������������í�若����������c�潟�違�潟�若����勌賢����勀臼��㋚磁(��障����壠ぇ��ŝ��荐����'>')��� ��ャ����������翫�������������障�������������壔�潟�若����勖�㊦����勌賢��ч����������í�潟����帥�ゃ����� 篏帥����������������˨�������������障����� Perl ��̹�≪�����篁���勉�����������罕���˨����������������壔�蚊����ゃ�с�壔�������障�������� ��蚊����ゃ�勖�号����壠��膣���̹�������㋚磁��� E ��潟�若�����篏帥�c� �����鴻�宴�若����������号����с��:

C<$a E<lt>=E<gt> $b>

��������� "$a <=> $b" �����ŝ����障�����

������茯㏍�帥�������������������⓾�����������������"�����純��"��号����壔����ャ�勉����ŝ����帥�� 篏帥�c�⓾�������㋘��">"��������鴻�宴�若�������ŝ����⓾����������������˨�������号����с����� 2 �����勐臼��㋚磁 ("<<" and ">>")���篏帥����障��; 篏����������紮������ŝ����帥�勛�翫����◐��篋������ŝ����帥�勛�翫����̥Ã��純����������������������с��! 箴������違��篁ヤ����壔����勉����ŝ����壔��篏帥�c�⓾����障��:

C<< $a <=> $b >>

絎������勉��������������紮������ŝ����帥�◐��篋������ŝ����帥�勖�違����������c�⓾�������� ���紮������ŝ����帥�勖��緇���� '<' ��勛�翫����� 腟�篋������ŝ����帥�勖�������� '>' �� ��翫����̥Ã��純����ャ�c�⓾�������違�� 絮掩�㋚磁��勖�違�壔�������ゃ�с�������障����障�������� (腥榊�純�夌�∴����������障�����) 緇���c�⓾��篁ヤ����勉����勉��罩c��������篏������障��:

C<<< $a <=> $b >>>
C<<<<  $a <=> $b     >>>>

��������⓾����������壠����☖札筝���������������������潟�с��:

C<$a E<lt>=E<gt> $b>

茲���医臼�����c��綵√����壔����í�若����������c�潟�違�潟�若����勌賢荳˨�勤В�����˨�壠襲��帥�������� ��í�勉�������̥����������ŝ�������違�ŝ����ŝ�������˨�勉�水襲��帥��筝������障����� ��������壔��筝�菴違�勌����壚札筝����罩g∈��������������������������с��:

C<< $a E<lt>=E<gt> $b >>

��������ŝ��箴���������⓾��C (��潟�若��) ��鴻�帥�ゃ�˨�勉�潟�若����勖�㊦�������吾��������������������:

open(X, ">>thing.dat") || die $!
$foo->bar();

篁ヤ����勉����������吾�������������с����障��:

C<<< open(X, ">>thing.dat") || die $! >>>
C<< $foo->bar(); >>

��������壔����������鋌ヤ����勉�������ɱ𡉴����吾����鴻�����茯㏍�帥����������с��:

C<open(X, "E<gt>E<gt>thing.dat") || die $!>
C<$foo-E<gt>bar();>

��������夌憜����勉�������� pod2text (Pod::Text), pod2man (Pod::Man), Pod::Parser 1.093 篁ラ�����Pod::Tree 1.02 篁ラ�����篏睡�������⓾����������勌���� pod2xxx ��� Pod::Xxxx ���絲上�������⓾����障�����

The Intent

(��勛��)

茵◐憜����с�壔�ŝ�靎≦����˩戎�����������勉����勖�������⓾����障����� 罧笈�純�壩侊��純��������(��ï就���)荀������〠⓲��������勉�с��荀������勉�̥�勛����<�� fmt ��х亜�����������翫就��с�������������˨�ŝ�c�⓾����障�� (腱���� vi ��с� F7 ��˨��emacs ��с�� Esc Q ��˨�ŝ�c�⓾����障��)��� 腱����羆������⓾�������勉�壔��verbatim ��≪�若����с�� ' ��� ` ��� " ��勉�壔�í�若����� �����勉�障�障�˨����⓾�������〠⓲��������c����勉�с��; ��������������違��篏������������勉����㏍�違�í����� ��障��莨若����с��4 ��˨�í�������������⓾����������������勉�障�上�医�激�������違�������勉�с����� �����吟�������阪��綛���勉����í�潟����с��

Pod �����í�若����������壩�㋘��篏������勉����������с�����綽�荀���壔�������障�������� Pod ��壔����������ŝ�潟�í�ゃ�潟����㏍�ャ�<�潟����˩戎���nroff ���TeX��������c�������若�壔�≪�����荐�茯��� ��������勉��茯違�˨�с��篏帥�������演����勉�純�若�鴻�����箴������⓾����障����� �憜�������������í�潟�鴻�㋘�若�帥�˨�� pod2text, pod2html, pod2man (nroff(1) ��� troff(1)���), pod2latex, pod2fm �����������障����� 篁���˨�������障����障�ŝ����勉�� CPAN ��˨�������障�����

Embedding Pods in Perl Modules

(Perl ��≪�吾�ャ�若�˨�吾�� pod ��勐�����莨若��)

Perl ��≪�吾�ャ�若�˨����鴻�壔�ŝ�������� Pod �����㏍�ャ�<�潟�����������莨若�������������с����障����� �����㏍�ャ�<�潟�����腥肴����������鰍��=head1�����潟����潟����у�����������=cut�����◐Ã茵���х�������障����� perl �����㏍�違�í����壔����勉�������� Pod �����㏍�鴻�������∴�������障����� Pod �����壔��perl ��������勰��紮������喝�������⓾�������贋����˨�夌舟�����障�������������勰��筝㏍�˨� 臀勉����障�����; �����勐�翫����壔����í�若�˨�ŝ����障����� 絎�箴���壔����ŝ����勌戎��c�⓾�������í�ゃ����í�ŝ�≪�吾�ャ�若�˨�˨�������障�����

������ Pod �����㏍�鴻����������<�ゃ�˨�勖��絨障�̥舟��������������������勉�с�������違�� __END__ ��� __DATA__ �����������˨����������若�壔��臀勉����� �����������������̥憗����� Pod ��潟����潟����勐����̥Ã茵����臀勉����������ц����������������с����障�����

__END__

=head1 NAME

Time::Local - efficiently compute time from local and GMT time

"=head1" ��勐����̥Ã茵������ŝ����翫�����紊������勉����í�潟�鴻�㋘�若�帥��"=head1"��� Pod �����㏍����壔�勰��紮���◑��茘������障��������

Hints for Writing Pod

(Pod �����吾����������勉����潟��)

  • podchecker ��潟����潟����� Pod ��勖��羈���̹�≪����������í�若�◑⑥������ �����с����壔�����������������箴���������⓾����障����� 箴������違��Pod ��勐����蚊��絎������ɾÃ茵����篏帥�������⓾�������������� 筝������ŝ�潟����潟����������í�若����������潟�若����ŝ�í�������с����壔����障����� ��������с��筝���ゃ�障����虁����違�勉����í�潟�鴻�㋘�若�帥�̹�������☎�������������с����壔����������� 腟���������医�激����⓾�������������с����壔�������������������с�������障����� ��肴����������馹���勌賢��˨�壔�������帥����������������c�������������ŝ����c������������������� �����í�潟�鴻�㋘�若�帥�勉����違����������с�����������

  • �����������ŝ����� Pod �����吾�������������� HTML �����吾�������������c����⓾�������ŝ����� ���膣���� HTML ��с����㏍�ャ�<�潟�������吾�����絎�薑������� Pod::HTML2Pod ��≪�吾�ャ�若�� (CPAN ��˨�������障��)���篏帥�c�� Pod ���紊�������������������荅⓾�������������с����障����� CPAN ��˨����� 絎�薑������� Pod::PXML �����������с�����

  • 紊������勐𡉴�� Pod �����í�潟�鴻�㋘�若�帥�壠����⓾�� Pod ��潟����潟��("=cut" �����˨�帥�障��!)�� ���緇���̥Ã茵����綽�荀���с�����篁ヤ����勉����������吾�����:

    # - - - - - - - - - - - -
    =item $firecracker->boom()
    
    This noisily detonates the firecracker object.
    =cut
    sub boom {
    ...

    �����勉�������� Pod �����í�潟�鴻�㋘�若�帥�� Pod �����㏍����壔�勛�肴�����絎������ 紊掩����������с�����������

    篁c�������˨��篁ヤ����勉����������吾����⓾�����������:

    # - - - - - - - - - - - -
    
    =item $firecracker->boom()
    
    This noisily detonates the firecracker object.
    
    =cut
    
    sub boom {
    ...
  • �𡉴�� Pod �����í�潟�鴻�㋘�若�帥�˨�壔��罧笈��("=head2 Functions" ��勉������� ��潟����潟��罧笈�純����˨�帥�障��)��勐����蚊��絎�������腥肴�����綽�荀���������������勉����������障����� 腥榊�純�勐�ャ�c��荀������勛Ã茵���勉�������ŝ����勉����ャ����������� ��祉����㋘�若�帥�������〠�宴�������������阪�������������������ŝ����������������障��������

  • �𡉴�������í�潟�鴻�㋘�若�帥�� L<> ��ŝ�潟�壔�̬����勤申������茵������翫�������������障��; �����勉�������������������� L<Foo::Bar> ��壎��the Foo::Bar manpage����� ��ŝ����障��(荅潟�������� pod2man ���������)��� �����������c�⓾�������ŝ����壠�������������������㏍�ャ�<�潟�����茯㏍�帥�������������勉�˨�������������˨�� the L<foo> documentation �����������吾����鴻�壔����鴻����с�壔�������障�������� 篁c�������� the L<Foo::Bar|Foo::Bar> documentation �� ��吾����������í�勉�������˨�ŝ�潟�壔����堺�ャ����������九勝��������������� L<the Foo::Bar documentation|Foo::Bar> ��������⓾��������������

  • �����勉�障�障�勉����㏍����壔�� 70 ���絖����莇������������������í�若�������帥�˨����c�⓾� 荀���⓾�������í�������潟�違��茵������������������������障��������

SEE ALSO

perlpodspec, "PODs: Embedded Documentation" in perlsyn, perlnewmod, perldoc, pod2html, pod2man, podchecker.

AUTHOR

Larry Wall, Sean M. Burke