Perl6::Pod::FormattingCode::T - Terminal output


Perl6-Pod documentation Contained in the Perl6-Pod distribution.

Index


Code Index:

NAME

Top

Perl6::Pod::FormattingCode::T - Terminal output

SYNOPSIS

Top

        =para
        Got C<uname> output : T<FreeBSD>

DESCRIPTION

Top

The T<> formatting code specifies that the contained text is terminal output; that is: something that a program might print out. Such content would typically be rendered in a fixed-width font or with <samp>...</samp> tags. The contents of a T<> code are always space-preserved (as if they had an implicit S<...> around them). The T<> code is the inline equivalent of the =output block.

to_xhtml

    T<FreeBSD>

Render xhtml:

    <samp>test</samp>

to_docbook

    T<FreeBSD>

Render to

   <computeroutput>FreeBSD</computeroutput> 

http://www.docbook.org/tdg/en/html/computeroutput.html =cut

SEE ALSO

Top

http://zag.ru/perl6-pod/S26.html, Perldoc Pod to HTML converter: http://zag.ru/perl6-pod/, Perl6::Pod::Lib

AUTHOR

Top

Zahatski Aliaksandr, <zag@cpan.org>

COPYRIGHT AND LICENSE

Top


Perl6-Pod documentation Contained in the Perl6-Pod distribution.
#===============================================================================
#
#  DESCRIPTION:  terminal output
#
#       AUTHOR:  Aliaksandr P. Zahatski, <zahatski@gmail.com>
#===============================================================================
package Perl6::Pod::FormattingCode::T;

use warnings;
use strict;
use Data::Dumper;
use Perl6::Pod::FormattingCode;
use base 'Perl6::Pod::FormattingCode';

sub to_xhtml {
 my ( $self, $parser, @in ) = @_;
 my @content = $parser->_make_events(@in);
 $parser->mk_element('samp')->add_content(@content);
}

sub to_docbook {
 my ( $self, $parser, @in ) = @_;
 my @content = $parser->_make_events(@in);
 $parser->mk_element('computeroutput')->add_content(@content);
}


1;
__END__