<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">package Pod::Plainer;
use strict;
use Pod::Parser;
our @ISA = qw(Pod::Parser);
our $VERSION = '0.01';

our %E = qw( &lt; lt &gt; gt );
 
sub escape_ltgt {
    (undef, my $text) = @_;
    $text =~ s/([&lt;&gt;])/E&lt;$E{$1}&gt;/g;
    $text 
} 

sub simple_delimiters {
    (undef, my $seq) = @_;
    $seq -&gt; left_delimiter( '&lt;' ); 
    $seq -&gt; right_delimiter( '&gt;' );  
    $seq;
}

sub textblock {
    my($parser,$text,$line) = @_;
    print {$parser-&gt;output_handle()}
	$parser-&gt;parse_text(
	    { -expand_text =&gt; q(escape_ltgt),
	      -expand_seq =&gt; q(simple_delimiters) },
	    $text, $line ) -&gt; raw_text(); 
}

1;

__END__

=head1 NAME

Pod::Plainer - Perl extension for converting Pod to old style Pod.

=head1 SYNOPSIS

  use Pod::Plainer;

  my $parser = Pod::Plainer -&gt; new ();
  $parser -&gt; parse_from_filehandle(\*STDIN);

=head1 DESCRIPTION

Pod::Plainer uses Pod::Parser which takes Pod with the (new)
'CE&lt;lt&gt;E&lt;lt&gt; .. E&lt;gt&gt;E&lt;gt&gt;' constructs
and returns the old(er) style with just 'CE&lt;lt&gt;E&lt;gt&gt;';
'&lt;' and '&gt;' are replaced by 'EE&lt;lt&gt;ltE&lt;gt&gt;' and 'EE&lt;lt&gt;gtE&lt;gt&gt;'.

This can be used to pre-process Pod before using tools which do not
recognise the new style Pods.

=head2 EXPORT

None by default.

=head1 AUTHOR

Robin Barker, rmb1@cise.npl.co.uk

=head1 SEE ALSO

See L&lt;Pod::Parser&gt;.

=cut

</pre></body></html>