diff options
author | Andy Dougherty <doughera.lafayette.edu> | 1995-12-21 00:01:16 +0000 |
---|---|---|
committer | Andy Dougherty <doughera.lafayette.edu> | 1995-12-21 00:01:16 +0000 |
commit | cb1a09d0194fed9b905df7b04a4bc031d354609d (patch) | |
tree | f0c890a5a8f5274873421ac573dfc719188e5eec /pod/splitpod | |
parent | 3712091946b37b5feabcc1f630b32639406ad717 (diff) | |
download | perl-cb1a09d0194fed9b905df7b04a4bc031d354609d.tar.gz |
This is patch.2b1g to perl5.002beta1.
cd to your perl source directory, and type
patch -p1 -N < patch.2b1g
This patch is just my packaging of Tom's documentation patches
he released as patch.2b1g.
Patch and enjoy,
Andy Dougherty doughera@lafcol.lafayette.edu
Dept. of Physics
Lafayette College, Easton PA 18042
Diffstat (limited to 'pod/splitpod')
-rw-r--r-- | pod/splitpod | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/pod/splitpod b/pod/splitpod new file mode 100644 index 0000000000..fd327d80da --- /dev/null +++ b/pod/splitpod @@ -0,0 +1,47 @@ +#!/usr/bin/perl + +use PerlDoc::Functions; + +local $/ = ''; + +$cur = ''; +while (<>) { + + next unless /^=(?!cut)/ .. /^=cut/; + + if (s/=item (\S+)/$1/) { + #$cur = "POSIX::" . $1; + $cur = $1; + $syn{$cur} .= $_; + next; + } else { + #s,L</,L<POSIX/,g; + s,L</,L<perlfunc/,g; + $pod{$cur} .= $_ if $cur; + } +} + +for $f ( keys %syn ) { + $type = $Type{$f} || next; + $flavor = $Flavor{$f}; + $orig = $f; + ($name = $f) =~ s/\W//g; + open (POD, "> $name.pod") || die "can't open $name.pod: $!"; + print POD <<EOF; +=head1 NAME + +$orig - $flavor + +=head1 SYNOPSIS + +$syn{$orig} + +=head1 DESCRIPTION + +$pod{$orig} + +EOF + + close POD; + +} |