1 2 3require 5; 4package Pod::Simple::TextContent; 5use strict; 6use Carp (); 7use Pod::Simple (); 8use vars qw( @ISA $VERSION ); 9$VERSION = '3.43'; 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 $_[1] =~ s/$Pod::Simple::shy//g; 29 $_[1] =~ s/$Pod::Simple::nbsp/ /g; 30 print {$_[0]{'output_fh'}} $_[1]; 31 return; 32} 33 34sub _handle_element_end { 35 print {$_[0]{'output_fh'}} "\n" unless $_[1] =~ m/^[A-Z]$/s; 36 return; 37} 38 39#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 401; 41 42 43__END__ 44 45=head1 NAME 46 47Pod::Simple::TextContent -- get the text content of Pod 48 49=head1 SYNOPSIS 50 51 TODO 52 53 perl -MPod::Simple::TextContent -e \ 54 "exit Pod::Simple::TextContent->filter(shift)->any_errata_seen" \ 55 thingy.pod 56 57=head1 DESCRIPTION 58 59This class is that parses Pod and dumps just the text content. It is 60mainly meant for use by the Pod::Simple test suite, but you may find 61some other use for it. 62 63This is a subclass of L<Pod::Simple> and inherits all its methods. 64 65=head1 SEE ALSO 66 67L<Pod::Simple>, L<Pod::Simple::Text>, L<Pod::Spell> 68 69=head1 SUPPORT 70 71Questions or discussion about POD and Pod::Simple should be sent to the 72pod-people@perl.org mail list. Send an empty email to 73pod-people-subscribe@perl.org to subscribe. 74 75This module is managed in an open GitHub repository, 76L<https://github.com/perl-pod/pod-simple/>. Feel free to fork and contribute, or 77to clone L<git://github.com/perl-pod/pod-simple.git> and send patches! 78 79Patches against Pod::Simple are welcome. Please send bug reports to 80<bug-pod-simple@rt.cpan.org>. 81 82=head1 COPYRIGHT AND DISCLAIMERS 83 84Copyright (c) 2002 Sean M. Burke. 85 86This library is free software; you can redistribute it and/or modify it 87under the same terms as Perl itself. 88 89This program is distributed in the hope that it will be useful, but 90without any warranty; without even the implied warranty of 91merchantability or fitness for a particular purpose. 92 93=head1 AUTHOR 94 95Pod::Simple was created by Sean M. Burke <sburke@cpan.org>. 96But don't bother him, he's retired. 97 98Pod::Simple is maintained by: 99 100=over 101 102=item * Allison Randal C<allison@perl.org> 103 104=item * Hans Dieter Pearcey C<hdp@cpan.org> 105 106=item * David E. Wheeler C<dwheeler@cpan.org> 107 108=back 109 110=cut 111