| Perl6-Pod documentation | Contained in the Perl6-Pod distribution. |
Perl6::Pod::Block::input - handle =input block
=begin output
Name: Baracus, B.A.
Rank: Sgt
Serial: 1PTDF007
Do you want additional personnel details? K<y>
Height: 180cm/5'11"
Weight: 104kg/230lb
Age: 49
Print? K<n>
=end output
The =input block is used to specify pre-formatted keyboard input, which should be rendered without rejustification or squeezing of whitespace.
Export:
* to docbook as userinput element (http://www.docbook.org/tdg/en/html/userinput.html) * to html (http://www.w3.org/TR/html401/struct/text.html#edef-KBD): <pre><kbd> </kbd></pre>
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-2010 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: =input block # # AUTHOR: Aliaksandr P. Zahatski, <zahatski@gmail.com> #=============================================================================== package Perl6::Pod::Block::input; #$Id$
use warnings; use strict; use Perl6::Pod::Block; use base 'Perl6::Pod::Block'; sub to_xhtml { my $self = shift; my $parser = shift; my $el = $parser->mk_element('kbd')->add_content( $parser->_make_elements(@_) ) ->insert_to( $parser->mk_element('pre') ); return $el; } sub to_docbook { my $self = shift; my $parser = shift; my $el = $parser->mk_element('userinput')->add_content( $parser->_make_elements(@_) ); return $el; } 1; __END__