source: trunk/essentials/dev-lang/perl/lib/Pod/Perldoc/ToPod.pm

Last change on this file was 3181, checked in by bird, 19 years ago

perl 5.8.8

File size: 2.0 KB
Line 
1
2# This class is just a hack to act as a "formatter" for
3# actually unformatted Pod.
4#
5# Note that this isn't the same as just passing thru whatever
6# we're given -- we pass thru only the pod source, and suppress
7# the Perl code (or whatever non-pod stuff is in the source file).
8
9
10require 5;
11package Pod::Perldoc::ToPod;
12use strict;
13use warnings;
14
15use base qw(Pod::Perldoc::BaseTo);
16sub is_pageable { 1 }
17sub write_with_binmode { 0 }
18sub output_extension { 'pod' }
19
20sub new { return bless {}, ref($_[0]) || $_[0] }
21
22sub parse_from_file {
23 my( $self, $in, $outfh ) = @_;
24
25 open(IN, "<", $in) or die "Can't read-open $in: $!\nAborting";
26
27 my $cut_mode = 1;
28
29 # A hack for finding things between =foo and =cut, inclusive
30 local $_;
31 while (<IN>) {