| Perl6-Pod documentation | Contained in the Perl6-Pod distribution. |
Perl6::Pod::FormattingCode::T - Terminal output
=para
Got C<uname> output : T<FreeBSD>
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.
T<FreeBSD>
Render xhtml:
<samp>test</samp>
T<FreeBSD>
Render to
<computeroutput>FreeBSD</computeroutput>
http://zag.ru/perl6-pod/S26.html, Perldoc Pod to HTML converter: http://zag.ru/perl6-pod/, Perl6::Pod::Lib
Zahatski Aliaksandr, <zag@cpan.org>
Copyright (C) 2009-2011 by Zahatski Aliaksandr
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
| 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__