diff options
author | Joseph S. Myers <jsm28@hermes.cam.ac.uk> | 1996-09-20 15:08:33 +0100 |
---|---|---|
committer | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1996-09-20 15:08:33 +0100 |
commit | d83e3bda142ab17f4cd2633e1fb9f48644dabcbf (patch) | |
tree | f090617cc5c52d66f3463f436f398ddb0ed7978e /x2p/s2p.PL | |
parent | 53282e287735a6e6bbd7d90f4eb790c61d232d6e (diff) | |
download | perl-d83e3bda142ab17f4cd2633e1fb9f48644dabcbf.tar.gz |
Pod typos, pod2man bugs, and miscellaneous installation comments
This patch just changed the old s2p.man page into a pod page.
I then embedded the pod into the s2p script.
Diffstat (limited to 'x2p/s2p.PL')
-rw-r--r-- | x2p/s2p.PL | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/x2p/s2p.PL b/x2p/s2p.PL index 29864b418a..6664dcd616 100644 --- a/x2p/s2p.PL +++ b/x2p/s2p.PL @@ -39,6 +39,78 @@ print OUT <<'!NO!SUBS!'; # # $Log: s2p.SH,v $ +=head1 NAME + +s2p - Sed to Perl translator + +=head1 SYNOPSIS + +B<s2p [options] filename> + +=head1 DESCRIPTION + +I<S2p> takes a sed script specified on the command line (or from +standard input) and produces a comparable I<perl> script on the +standard output. + +=head2 Options + +Options include: + +=over 5 + +=item B<-DE<lt>numberE<gt>> + +sets debugging flags. + +=item B<-n> + +specifies that this sed script was always invoked with a B<sed -n>. +Otherwise a switch parser is prepended to the front of the script. + +=item B<-p> + +specifies that this sed script was never invoked with a B<sed -n>. +Otherwise a switch parser is prepended to the front of the script. + +=back + +=head2 Considerations + +The perl script produced looks very sed-ish, and there may very well +be better ways to express what you want to do in perl. For instance, +s2p does not make any use of the split operator, but you might want +to. + +The perl script you end up with may be either faster or slower than +the original sed script. If you're only interested in speed you'll +just have to try it both ways. Of course, if you want to do something +sed doesn't do, you have no choice. It's often possible to speed up +the perl script by various methods, such as deleting all references to +$\ and chop. + +=head1 ENVIRONMENT + +S2p uses no environment variables. + +=head1 AUTHOR + +Larry Wall E<lt>F<lwall@jpl-devvax.Jpl.Nasa.Gov>E<gt> + +=head1 FILES + +=head1 SEE ALSO + + perl The perl compiler/interpreter + + a2p awk to perl translator + +=head1 DIAGNOSTICS + +=head1 BUGS + +=cut + $indent = 4; $shiftwidth = 4; $l = '{'; $r = '}'; |