| 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 |
|
|---|
| 10 | require 5;
|
|---|
| 11 | package Pod::Perldoc::ToPod;
|
|---|
| 12 | use strict;
|
|---|
| 13 | use warnings;
|
|---|
| 14 |
|
|---|
| 15 | use base qw(Pod::Perldoc::BaseTo);
|
|---|
| 16 | sub is_pageable { 1 }
|
|---|
| 17 | sub write_with_binmode { 0 }
|
|---|
| 18 | sub output_extension { 'pod' }
|
|---|
| 19 |
|
|---|
| 20 | sub new { return bless {}, ref($_[0]) || $_[0] }
|
|---|
| 21 |
|
|---|
| 22 | sub 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>) {
|
|---|
|
|---|