Remove Class::ISA use from autouse tests
[p5sagit/p5-mst-13.2.git] / ext / Pod-Plainer / Plainer.pm
CommitLineData
d23ed1f2 1package Pod::Plainer;
2use strict;
6fcc101e 3use if $] >= 5.011, 'deprecate';
d23ed1f2 4use Pod::Parser;
5our @ISA = qw(Pod::Parser);
1f766de9 6our $VERSION = '1.00';
d23ed1f2 7
8our %E = qw( < lt > gt );
9
10sub escape_ltgt {
11 (undef, my $text) = @_;
12 $text =~ s/([<>])/E<$E{$1}>/g;
13 $text
14}
15
16sub simple_delimiters {
17 (undef, my $seq) = @_;
18 $seq -> left_delimiter( '<' );
19 $seq -> right_delimiter( '>' );
20 $seq;
21}
22
23sub textblock {
24 my($parser,$text,$line) = @_;
25 print {$parser->output_handle()}
26 $parser->parse_text(
27 { -expand_text => q(escape_ltgt),
28 -expand_seq => q(simple_delimiters) },
29 $text, $line ) -> raw_text();
30}
31
321;
33
34__END__
35
36=head1 NAME
37
1f766de9 38Pod::Plainer - Perl extension for converting Pod to old-style Pod.
d23ed1f2 39
40=head1 SYNOPSIS
41
42 use Pod::Plainer;
43
44 my $parser = Pod::Plainer -> new ();
45 $parser -> parse_from_filehandle(\*STDIN);
46
47=head1 DESCRIPTION
48
49Pod::Plainer uses Pod::Parser which takes Pod with the (new)
50'CE<lt>E<lt> .. E<gt>E<gt>' constructs
51and returns the old(er) style with just 'CE<lt>E<gt>';
52'<' and '>' are replaced by 'EE<lt>ltE<gt>' and 'EE<lt>gtE<gt>'.
53
54This can be used to pre-process Pod before using tools which do not
55recognise the new style Pods.
56
57=head2 EXPORT
58
59None by default.
60
61=head1 AUTHOR
62
1f766de9 63Robin Barker, rmb1@npl.co.uk
d23ed1f2 64
65=head1 SEE ALSO
66
67See L<Pod::Parser>.
68
69=cut
70