| 1 | package Pod::Plainer; | ||
| 2 | 2 | ▶ | use 5.006; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 2 | ▶ | use Pod::Parser; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 2 | our @ISA = qw(Pod::Parser); | |
| 7 | 2 | our $VERSION = '1.04'; | |
| 8 | |||
| 9 | 2 | our %E = qw( < lt > gt ); | |
| 10 | |||
| 11 | 30 | ▶ | sub escape_ltgt { |
|
Subroutine
escape_ltgt: called CC=1 SCAR=0.0
Pod
documented
| |||
| 12 | 30 | (undef, my $text) = @_; | |
| 13 | 30 | $text =~ s/([<>])/E<$E{$1}>/g; | |
| 14 | 30 | $text | |
| 15 | } | ||
| 16 | |||
| 17 | 9 | ▶ | sub simple_delimiters { |
|
Subroutine
simple_delimiters: called CC=1 SCAR=0.0
Pod
documented
| |||
| 18 | 9 | (undef, my $seq) = @_; | |
| 19 | 9 | $seq -> left_delimiter( '<' ); | |
| 20 | 9 | $seq -> right_delimiter( '>' ); | |
| 21 | 9 | $seq; | |
| 22 | } | ||
| 23 | |||
| 24 | 14 | ▶ | sub textblock { |
|
Subroutine
textblock: called CC=1 SCAR=0.0
Pod
documented
| |||
| 25 | 14 | my($parser,$text,$line) = @_; | |
| 26 | 14 | print {$parser->output_handle()} | |
| 27 | $parser->parse_text( | ||
| 28 | { -expand_text => q(escape_ltgt), | ||
| 29 | -expand_seq => q(simple_delimiters) }, | ||
| 30 | $text, $line ) -> raw_text(); | ||
| 31 | } | ||
| 32 | |||
| 33 | 2 | 1; | |
| 34 | |||
| 35 | __END__ | ||