po4av0.70

Locale::Po4a::Pod

Section: Инструменты Po4a (3pm)
Updated: 2024-01-29
Index Return to Main Contents
 

НАЗВАНИЕ

Locale::Po4a::Pod: преобразование POD-данных из/в PO-файлы  

КРАТКОЕ СОДЕРЖАНИЕ

    use Locale::Po4a::Pod;
    my $parser = Locale::Po4a::Pod->new (sentence => 0, width => 78);

    # Прочитать POD из STDIN и записать в STDOUT.
    $parser->parse_from_filehandle;

    # Прочитать POD из file.pod и записать в file.txt.
    $parser->parse_from_file ('file.pod', 'file.txt');

 

ОПИСАНИЕ

Locale::Po4a::Pod — это модуль, предназначенным для помощи в переводе документации в формате POD (предпочтительный язык разметки документации Perl) на другие [человеческие] языки.  

СОСТОЯНИЕ ЭТОГО МОДУЛЯ

Я думаю, что этот модуль стабилен, как скала, и есть только одна известная ошибка в /usr/lib/perl5/Tk/MainWindow.pod (и в некоторых других страницах, см. ниже), которые содержат:

  C<" #n">

Из-за неудачного стечение обстоятельств, в версии po4a часть этой строки было перенесена на следующую на пробеле. В результате в исходной версии man-страница содержит:

 " #n"

а моя содержит:

 "" #n""

что логично, т.к. C<foobar> преобразуется в ``foobar''.

Полный список страниц, на которых возникала подобная проблема на моей машине (из 564 страниц; также заметьте, что это зависит от количества знаков после которого осуществляется перенос): /usr/lib/perl5/Tk/MainWindow.pod /usr/share/perl/5.8.0/overload.pod /usr/share/perl/5.8.0/pod/perlapi.pod /usr/share/perl/5.8.0/pod/perldelta.pod /usr/share/perl/5.8.0/pod/perlfaq5.pod /usr/share/perl/5.8.0/pod/perlpod.pod /usr/share/perl/5.8.0/pod/perlre.pod /usr/share/perl/5.8.0/pod/perlretut.pod  

ВНУТРЕННОСТИ

Являясь производным классом Pod::Parser, Locale::Po4a::Pod поддерживает те же методы и интерфейсы. См. подробности в Pod::Parser; если вкратце, то надо создать новый парсер с помощью "Locale::Po4a::Pod->new()", а затем вызывать либо parse_from_filehandle(), либо parse_from_file().

new() принимает параметры в виде пар ключ/значение, которые управляют поведением парсера. Поддерживаемые параметры, общие для всех наследников Pod::Parser:

alt
If set to a true value, selects an alternate output format that, among other things, uses a different heading style and marks =item entries with a colon in the left margin. Defaults to false.
code
If set to a true value, the non-POD parts of the input file will be included in the output. Useful for viewing code documented with POD blocks with the POD rendered and the code left intact.
indent
The number of spaces to indent regular text, and the default indentation for =over blocks. Defaults to 4.
loose
If set to a true value, a blank line is printed after a =head1 heading. If set to false (the default), no blank line is printed after =head1, although one is still printed after =head2. This is the default because it's the expected formatting for manual pages; if you're formatting arbitrary text documents, setting this to true may result in more pleasing output.
quotes
Sets the quote marks used to surround C<> text. If the value is a single character, it is used as both the left and right quote; if it is two characters, the first character is used as the left quote and the second as the right quote; and if it is four characters, the first two are used as the left quote and the second two as the right quote.

This may also be set to the special value none, in which case no quote marks are added around C<> text.

sentence
If set to a true value, Locale::Po4a::Pod will assume that each sentence ends in two spaces, and will try to preserve that spacing. If set to false, all consecutive whitespace in non-verbatim paragraphs is compressed into a single space. Defaults to true.
width
Количество символов в строке, после которых должен выполняться автоматический перенос текста. По умолчанию: 76.
 

СМОТРИТЕ ТАКЖЕ

Pod::Parser, Locale::Po4a::Man(3pm), Locale::Po4a::TransTractor(3pm), po4a(7)  

АВТОРЫ

 Денис Барбье (Denis Barbier) <barbier@linuxfr.org>
 Мартин Кенсон (Martin Quinson) (mquinson#debian.org)

 

АВТОРСКИЕ ПРАВА И ЛИЦЕНЗИИ

Copyright © 2002 SPI, Inc.

Данная программа является свободным программным обеспечением; вы можете распространять и/или изменять её на условиях Универсальной общественной лицензии (GPL) GNU v2.0 или новее (см. файл COPYING).


 

Index

НАЗВАНИЕ
КРАТКОЕ СОДЕРЖАНИЕ
ОПИСАНИЕ
СОСТОЯНИЕ ЭТОГО МОДУЛЯ
ВНУТРЕННОСТИ
СМОТРИТЕ ТАКЖЕ
АВТОРЫ
АВТОРСКИЕ ПРАВА И ЛИЦЕНЗИИ

This document was created by using the manual pages.
Time: 00:28:47 GMT, January 29, 2024
català Deutsch English Esperanto español français hrvatski Magyar Italiano 日本語 Bokmål Nederlands polski Português Português (Brasil) Русский српски језик український 简体中文 简体中文 (how to set the default document language)