|
Apache/2.2.15 (CentOS) Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64 uid=48(apache) gid=48(apache) groups=48(apache) server ip : 172.67.192.52 | your ip : 10.244.126.0 safemode OFF > / usr / share / perl5 / Pod / |
| Filename | /usr/share/perl5/Pod/Plainer.pm |
| Size | 1.25 kb |
| Permission | rw-r--r-- |
| Owner | apache |
| Create time | 23-Dec-2025 17:41 |
| Last modified | 22-Mar-2017 16:32 |
| Last accessed | 22-Apr-2026 00:49 |
| Actions | edit | rename | delete | download (gzip) |
| View | text | code | image |
package Pod::Plainer;
use strict;
use Pod::Parser;
our @ISA = qw(Pod::Parser);
our $VERSION = '0.01';
our %E = qw( < lt > gt );
sub escape_ltgt {
(undef, my $text) = @_;
$text =~ s/([<>])/E<$E{$1}>/g;
$text
}
sub simple_delimiters {
(undef, my $seq) = @_;
$seq -> left_delimiter( '<' );
$seq -> right_delimiter( '>' );
$seq;
}
sub textblock {
my($parser,$text,$line) = @_;
print {$parser->output_handle()}
$parser->parse_text(
{ -expand_text => q(escape_ltgt),
-expand_seq => q(simple_delimiters) },
$text, $line ) -> 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 -> new ();
$parser -> parse_from_filehandle(\*STDIN);
=head1 DESCRIPTION
Pod::Plainer uses Pod::Parser which takes Pod with the (new)
'CE<lt>E<lt> .. E<gt>E<gt>' constructs
and returns the old(er) style with just 'CE<lt>E<gt>';
'<' and '>' are replaced by 'EE<lt>ltE<gt>' and 'EE<lt>gtE<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, [email protected]
=head1 SEE ALSO
See L<Pod::Parser>.
=cut
use strict;
use Pod::Parser;
our @ISA = qw(Pod::Parser);
our $VERSION = '0.01';
our %E = qw( < lt > gt );
sub escape_ltgt {
(undef, my $text) = @_;
$text =~ s/([<>])/E<$E{$1}>/g;
$text
}
sub simple_delimiters {
(undef, my $seq) = @_;
$seq -> left_delimiter( '<' );
$seq -> right_delimiter( '>' );
$seq;
}
sub textblock {
my($parser,$text,$line) = @_;
print {$parser->output_handle()}
$parser->parse_text(
{ -expand_text => q(escape_ltgt),
-expand_seq => q(simple_delimiters) },
$text, $line ) -> 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 -> new ();
$parser -> parse_from_filehandle(\*STDIN);
=head1 DESCRIPTION
Pod::Plainer uses Pod::Parser which takes Pod with the (new)
'CE<lt>E<lt> .. E<gt>E<gt>' constructs
and returns the old(er) style with just 'CE<lt>E<gt>';
'<' and '>' are replaced by 'EE<lt>ltE<gt>' and 'EE<lt>gtE<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, [email protected]
=head1 SEE ALSO
See L<Pod::Parser>.
=cut