Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / Pod / Simple / TextContent.pm
CommitLineData
3fea05b9 1
2
3require 5;
4package Pod::Simple::TextContent;
5use strict;
6use Carp ();
7use Pod::Simple ();
8use vars qw( @ISA $VERSION );
9$VERSION = '2.02';
10@ISA = ('Pod::Simple');
11
12sub new {
13 my $self = shift;
14 my $new = $self->SUPER::new(@_);
15 $new->{'output_fh'} ||= *STDOUT{IO};
16 $new->nix_X_codes(1);
17 return $new;
18}
19
20#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21
22sub _handle_element_start {
23 print {$_[0]{'output_fh'}} "\n" unless $_[1] =~ m/^[A-Z]$/s;
24 return;
25}
26
27sub _handle_text {
28 if( chr(65) eq 'A' ) { # in ASCIIworld
29 $_[1] =~ tr/\xAD//d;
30 $_[1] =~ tr/\xA0/ /;
31 }
32 print {$_[0]{'output_fh'}} $_[1];
33 return;
34}
35
36sub _handle_element_end {
37 print {$_[0]{'output_fh'}} "\n" unless $_[1] =~ m/^[A-Z]$/s;
38 return;
39}
40
41#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
421;
43
44
45__END__
46
47=head1 NAME
48
49Pod::Simple::TextContent -- get the text content of Pod
50
51=head1 SYNOPSIS
52
53 TODO
54
55 perl -MPod::Simple::TextContent -e \
56 "exit Pod::Simple::TextContent->filter(shift)->any_errata_seen" \
57 thingy.pod
58
59=head1 DESCRIPTION
60
61This class is that parses Pod and dumps just the text content. It is
62mainly meant for use by the Pod::Simple test suite, but you may find
63some other use for it.
64
65This is a subclass of L<Pod::Simple> and inherits all its methods.
66
67=head1 SEE ALSO
68
69L<Pod::Simple>, L<Pod::Simple::Text>, L<Pod::Spell>
70
71=head1 COPYRIGHT AND DISCLAIMERS
72
73Copyright (c) 2002 Sean M. Burke. All rights reserved.
74
75This library is free software; you can redistribute it and/or modify it
76under the same terms as Perl itself.
77
78This program is distributed in the hope that it will be useful, but
79without any warranty; without even the implied warranty of
80merchantability or fitness for a particular purpose.
81
82=head1 AUTHOR
83
84Sean M. Burke C<sburke@cpan.org>
85
86=cut
87