Plain Old Documentation

Plain Old Documentation

Plain Old Documentation (POD) ist eine vereinfachte Auszeichnungssprache, die 1994 von Larry Wall mit Perl 5 eingeführt wurde, um Dokumentation in den Quelltext von Perl-Programmen einzufügen.

Inhaltsverzeichnis

Eigenschaften von POD

POD ist eine einfache Sprache in mehrerer Hinsicht:

  • einfach zu schreiben (für den Autor)
  • leicht lesbarer Quellcode
  • leicht zu parsen
  • leicht in andere Sprachen und Formate umzuwandeln – etwa in UNIX-Manpages, LaTeX, troff oder HTML
  • einfach, Quellcode darin unterzubringen

Verbreitung

POD ist die meistbenutzte Sprache, um Perlprogramme und -module zu dokumentieren, Perl selbst eingeschlossen, und ist auch Standard für die Dokumentation der Module im CPAN.

Beispiel-Dokument

Der folgende Schnipsel enthält einige typische POD-Sprachelemente.

=pod

=head1 TITEL

podsample - A sample POD document

=head1 ZUSAMMENFASSUNG

    $here->isa(Piece::Of::Code);
    print <<"END";
    Dieser eingezogene Block wird nicht nach Formatierungsanweisungen
    durchsucht und Leerzeichen bleiben erhalten.
    END

=head1 BESCHREIBUNG

Hier steht normaler Text, Es folgen
B<fett>, I<kursiv>,
S<langer Text ohne Zeilenumbruch>,
C<$code> (formatierter Quellcode),
E<Sonderzeichenname>, F<Dateiname>,
L<Labeltext|Linkadresse>, X<Indexeintrag>.
Z<Zeichen ohne Breite>

=head2 Eine Liste

=over 4

=item * mit Blickfangpunkten.

=item * noch ein Punkt.

=back

=begin html

<img src="fig1.png" align="right" alt="Figure 1." />
<p>
    Hier ist etwas eingefüger HTML-Kode. Dieser Block kann
    Bilder beinhalten, und alles was du sonst noch so mit
    HTML tun kannst. POD parser die kein HTML ausgeben werden
    dies vollständig ignorieren.
</p>

=end html

=head1 SIEHE AUCH

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

=head1 COPYRIGHT

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

Werkzeuge

Die folgenden Werkzeuge verarbeiten POD:

pod2html
erzeugt html aus POD
pod2latex
generiert LaTeX aus POD
pod2man
macht Manpages aus POD
pod2text
einfacher Text aus POD
pod2usage
druckt usage:-Zeile aus eingebettetem POD
podchecker
Syntaxchecker für POD
podselect
druckt ausgewählte Abschnitte aus POD auf stdout
Weitere Werkzeuge wie Pod
:ProjectDocs können die Dokumentation ganzer Projekte automatisiert beispielsweise nach HTML wandeln

Literatur

  • Wall, Larry; Christiansen, Tom; Orwant, Jon (2000). Programming Perl (3rd ed.). Sebastopol: O'Reilly & Associates. ISBN 978-0-596-00027-1.

Weblinks


Wikimedia Foundation.

Игры ⚽ Нужно решить контрольную?

Schlagen Sie auch in anderen Wörterbüchern nach:

  • Plain Old Documentation — Plain Old Documentation, abbreviated pod, is a simple markup language used to document the Perl programming language.Designpod is designed to be a simple, clean language with just enough syntax to be useful. It purposefully does not include… …   Wikipedia

  • Plain Old Documentation — est un format de documentation, c est le langage de balisage léger utilisé par le langage de programmation Perl. Une version améliorée a été conçue pour Perl 6. POD désigne la version du langage de ce langage de documentation associée à Perl 5… …   Wikipédia en Français

  • Comparison of documentation generators — The following tables compare general and technical information for a number of documentation generators. Please see the individual products articles for further information. This article is not all inclusive or necessarily up to date. Unless… …   Wikipedia

  • Comment (computer programming) — For comments in Wikipedia markup, see Help:Wiki markup#Character formatting and WP:COMMENT. An illustration of Java source code with prologue comments indicated in red and inline comments in green. Program code is in blue …   Wikipedia

  • Pod — Das englische Wort Pod steht für Halter bzw. Sockel. Siehe Gondel. Die Abkürzung POD hat die folgenden Bedeutungen: Peroxidase, ein Enzym, das Oxidationen mit Hilfe von Peroxiden katalysiert; Pick of Destiny, den englischen Originaltitel des… …   Deutsch Wikipedia

  • Literate programming — is a philosophy of computer programming based on the premise that a computer program should be written similar to literature, with human readability as a primary goal. According to this philosophy, programmers should aim for a ldquo;literate… …   Wikipedia

  • POD — abbr. Plain Old Document (format) abbr. Print / Publishing On Demand Syn: PoD comp. abbr. Piece Of Data comp. abbr. Plain Old Documentation (Perl) comp. abbr. Plain Old Dos comp. abbr. Publishing On Demand acronym Pay On Delivery …   United dictionary of abbreviations and acronyms

  • POD — may refer to: Business * Payable on Death, term used on certain bank accounts or Totten trusts, where payment will be made to a specified person upon the death of the account holder * Proof of delivery, an international commerce term for a signed …   Wikipedia

  • PERL — Paradigmen: prozedural, modular, teilweise objektorientiert Erscheinungsjahr: 1987 Entwickler: Larry Wall, Perl Porter Aktuelle  …   Deutsch Wikipedia

  • Programmiersprache Perl — Perl Paradigmen: prozedural, modular, teilweise objektorientiert Erscheinungsjahr: 1987 Entwickler: Larry Wall, Perl Porter Aktuelle  …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”