From: Joseph S. Myers Date: Fri, 20 Sep 1996 14:08:33 +0000 (+0100) Subject: Pod typos, pod2man bugs, and miscellaneous installation comments X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1fef88e72b0b21420614d87ecab0aaedf3725271;p=p5sagit%2Fp5-mst-13.2.git Pod typos, pod2man bugs, and miscellaneous installation comments Here is a patch for various typos and other defects in the Perl 5.003_05 pods, including the pods embedded in library modules. --- diff --git a/configpm b/configpm index 37fe925..eab7f5b 100755 --- a/configpm +++ b/configpm @@ -196,7 +196,7 @@ Shell variables from the F file (written by Configure) are stored in the readonly-variable C<%Config>, indexed by their names. Values stored in config.sh as 'undef' are returned as undefined -values. The perl C function can be used to check is a +values. The perl C function can be used to check if a named variable exists. =over 4 diff --git a/ext/DynaLoader/DynaLoader.pm b/ext/DynaLoader/DynaLoader.pm index 282d364..b634aef 100644 --- a/ext/DynaLoader/DynaLoader.pm +++ b/ext/DynaLoader/DynaLoader.pm @@ -273,7 +273,7 @@ sub dl_expandspec { DynaLoader - Dynamically load C libraries into Perl code -dl_error(), dl_findfile(), dl_expandspec(), dl_load_file(), dl_find_symbol(), dl_undef_symbols(), dl_install_xsub(), boostrap() - routines used by DynaLoader modules +dl_error(), dl_findfile(), dl_expandspec(), dl_load_file(), dl_find_symbol(), dl_undef_symbols(), dl_install_xsub(), bootstrap() - routines used by DynaLoader modules =head1 SYNOPSIS @@ -523,7 +523,7 @@ the function if required by die(), caller() or the debugger. If $filename is not defined then "DynaLoader" will be used. -=item boostrap() +=item bootstrap() Syntax: diff --git a/ext/FileHandle/FileHandle.pm b/ext/FileHandle/FileHandle.pm index 1c030ec..d479dae 100644 --- a/ext/FileHandle/FileHandle.pm +++ b/ext/FileHandle/FileHandle.pm @@ -60,7 +60,7 @@ parameters, the first parameter is a filename that may include whitespace or other special characters, and the second parameter is the open mode, optionally followed by a file permission value. -If C receives a Perl mode string (">", "+<", etc.) +If C receives a Perl mode string ("E", "+E", etc.) or a POSIX fopen() mode string ("w", "r+", etc.), it uses the basic Perl C operator. @@ -122,23 +122,23 @@ Furthermore, for doing normal I/O you might need these: =over -=item $fh->print +=item $fh-Eprint See L. -=item $fh->printf +=item $fh-Eprintf See L. -=item $fh->getline +=item $fh-Egetline -This works like <$fh> described in L +This works like E$fhE described in L except that it's more readable and can be safely called in an array context but still returns just one line. -=item $fh->getlines +=item $fh-Egetlines -This works like <$fh> when called in an array context to +This works like E$fhE when called in an array context to read all the remaining lines in a file, except that it's more readable. It will also croak() if accidentally called in a scalar context. diff --git a/ext/Opcode/Safe.pm b/ext/Opcode/Safe.pm index f15dbd5..6007b97 100644 --- a/ext/Opcode/Safe.pm +++ b/ext/Opcode/Safe.pm @@ -287,8 +287,8 @@ compilation to fail with an error. The code will not be executed. The default operator mask for a newly created compartment is the ':default' optag. -It is important that you read the L module documentation -for more information. Especially for details definitions of opnames, +It is important that you read the Opcode(3) module documentation +for more information, especially for detailed definitions of opnames, optags and opsets. Since it is only at the compilation stage that the operator mask @@ -454,7 +454,7 @@ problem. Consider a function foo() in package pkg compiled outside a compartment but shared with it. Assume the compartment has a root package called -'Root'. If foo() contains an eval statement like eval '$baz = 1' then, +'Root'. If foo() contains an eval statement like eval '$foo = 1' then, normally, $pkg::foo will be set to 1. If foo() is called from the compartment (by whatever means) then instead of setting $pkg::foo, the eval will actually set $Root::pkg::foo. @@ -549,7 +549,7 @@ Originally designed and implemented by Malcolm Beattie, mbeattie@sable.ox.ac.uk. Reworked to use the Opcode module and other changes added by Tim Bunce -. +EFE. =cut diff --git a/ext/Socket/Socket.pm b/ext/Socket/Socket.pm index bae8a37..9872d03 100644 --- a/ext/Socket/Socket.pm +++ b/ext/Socket/Socket.pm @@ -115,10 +115,10 @@ Will croak if the structure does not have AF_INET in the right place. =item sockaddr_un SOCKADDR_UN In an array context, unpacks its SOCKADDR_UN argument and returns an array -consisting of (PATHNAME). In a scalar context, packs its PATHANE +consisting of (PATHNAME). In a scalar context, packs its PATHNAME arguments as a SOCKADDR_UN and returns it. If this is confusing, use pack_sockaddr_un() and unpack_sockaddr_un() explicitly. -These are only supported if your system has . +These are only supported if your system has EFE. =item pack_sockaddr_un PATH diff --git a/installman b/installman index 5e0b0cc..d57cdb1 100755 --- a/installman +++ b/installman @@ -56,37 +56,66 @@ runpod2man('pod', $man1dir, $man1ext); # Install the pods for library modules. runpod2man('lib', $man3dir, $man3ext); +# Install the pods embedded in the installed scripts +runpod2man('utils', $man1dir, $man1ext, 'c2ph'); +runpod2man('utils', $man1dir, $man1ext, 'h2ph'); +runpod2man('utils', $man1dir, $man1ext, 'h2xs'); +runpod2man('utils', $man1dir, $man1ext, 'perldoc'); +runpod2man('utils', $man1dir, $man1ext, 'pl2pm'); +runpod2man('x2p', $man1dir, $man1ext, 's2p'); +runpod2man('x2p', $man1dir, $man1ext, 'a2p.pod'); +runpod2man('pod', $man1dir, $man1ext, 'pod2man'); + +# It would probably be better to have this page linked +# to the c2ph man page. Or, this one could say ".so man1/c2ph.1", +# but then it would have to pay attention to $man1dir and $man1ext. +runpod2man('utils', $man1dir, $man1ext, 'pstruct'); + +runpod2man('lib/ExtUtils', $man1dir, $man1ext, 'xsubpp'); + sub runpod2man { - my($poddir, $mandir, $manext) = @_; + # $script is script name if we are installing a manpage embedded + # in a script, undef otherwise + my($poddir, $mandir, $manext, $script) = @_; + + my($downdir); # can't just use .. when installing xsubpp manpage + + $downdir = $poddir; + $downdir =~ s:[^/]+:..:g; my($builddir) = Cwd::getcwd(); if ($mandir eq ' ' or $mandir eq '') { - print STDERR "Skipping installation of $poddir man pages.\n"; + print STDERR "Skipping installation of ", + ($script ? "$poddir/$script man page" : "$poddir man pages"), ".\n"; return; } - chdir $poddir || die "Unable to cd to $poddir directory!\n$!\n"; print STDERR "chdir $poddir\n"; + chdir $poddir || die "Unable to cd to $poddir directory!\n$!\n"; # We insist on using the current version of pod2man in case there # are enhancements or changes from previous installed versions. # The error message doesn't include the '..' because the user # won't be aware that we've chdir to $poddir. - -r "../pod/pod2man" || die "Executable pod/pod2man not found.\n"; + -r "$downdir/pod/pod2man" || die "Executable pod/pod2man not found.\n"; # We want to be sure to use the current perl. We can't rely on # the installed perl because it might not be actually installed # yet. (The user may have set the $install* Configure variables # to point to some temporary home, from which the executable gets # installed by occult means.) - $pod2man = "../perl -I ../lib ../pod/pod2man --section=$manext --official"; + $pod2man = "$downdir/perl -I $downdir/lib $downdir/pod/pod2man --section=$manext --official"; mkpath($mandir, 1, 0777) unless $notify; # In File::Path # Make a list of all the .pm and .pod files in the directory. We will # always run pod2man from the lib directory and feed it the full pathname # of the pod. This might be useful for pod2man someday. - @modpods = (); - find(\&lsmodpods, '.'); + if ($script) { + @modpods = ($script); + } else { + @modpods = (); + find(\&lsmodpods, '.'); + } foreach $mod (@modpods) { $manpage = $mod; my $tmp; diff --git a/installperl b/installperl index 346e835..183c3ed 100755 --- a/installperl +++ b/installperl @@ -22,15 +22,11 @@ while (@ARGV) { umask 022; -@scripts = qw( utils/c2ph utils/h2ph utils/h2xs utils/pstruct - utils/perlbug utils/perldoc +@scripts = qw( utils/c2ph utils/h2ph utils/h2xs + utils/perlbug utils/perldoc utils/pl2pm x2p/s2p x2p/find2perl pod/pod2man pod/pod2html pod/pod2latex pod/pod2text); -# pod documentation now handled by separate installman script. -# These two are archaic leftovers. -@manpages = qw(x2p/a2p.man x2p/s2p.man); - @pods = (); $ver = $]; @@ -120,6 +116,11 @@ for (@scripts) { s#.*/##; &chmod(0755, "$installscript/$_"); } +# pstruct should be a link to c2ph + +&safe_unlink("$installscript/pstruct"); +&link("$installscript/c2ph","$installscript/pstruct"); + # Install pod pages. Where? I guess in $installprivlib/pod. mkpath("${installprivlib}/pod", 1, 0777); foreach $file (@pods) { @@ -127,30 +128,6 @@ foreach $file (@pods) { cp_if_diff($file, "${installprivlib}/${file}"); } -# Install old man pages. - -if ($installman1dir ne '') { - mkpath($installman1dir, 1, 0777); - - if (! &samepath($installman1dir, '.')) { - for (@manpages) { - ($new = $_) =~ s/man$/$man1ext/; - $new =~ s#.*/##; - print STDERR " Installing $installman1dir/$new\n"; - next if $nonono; - open(MI,$_) || warn "Can't open $_: $!\n"; - open(MO,">$installman1dir/$new") || - warn "Can't install $installman1dir/$new: $!\n"; - print MO ".ds RP Release $release Patchlevel $patchlevel\n"; - while () { - print MO; - } - close MI; - close MO; - } - } -} - # Install library files. $do_installarchlib = $do_installprivlib = 0; diff --git a/lib/Cwd.pm b/lib/Cwd.pm index 1512d7f..e4e94b3 100644 --- a/lib/Cwd.pm +++ b/lib/Cwd.pm @@ -39,7 +39,7 @@ the trailing line terminator). It is recommended that cwd (or another If you ask to override your chdir() built-in function, then your PWD environment variable will be kept up to date. (See L.) Note that it will only be -kept up to date it all packages which use chdir import it from Cwd. +kept up to date if all packages which use chdir import it from Cwd. =cut diff --git a/lib/Devel/SelfStubber.pm b/lib/Devel/SelfStubber.pm index fc7ee4b..7bb38f6 100644 --- a/lib/Devel/SelfStubber.pm +++ b/lib/Devel/SelfStubber.pm @@ -118,7 +118,7 @@ So, for classes and subclasses to have inheritance correctly work with autoloading, you need to ensure stubs are loaded. The SelfLoader can load stubs automatically at module initialization -with the statement 'SelfLoader->load_stubs()';, but you may wish to +with the statement 'SelfLoader-Eload_stubs()';, but you may wish to avoid having the stub loading overhead associated with your initialization (though note that the SelfLoader::load_stubs method will be called sooner or later - at latest when the first sub diff --git a/lib/Env.pm b/lib/Env.pm index 0e79075..63beb07 100644 --- a/lib/Env.pm +++ b/lib/Env.pm @@ -39,7 +39,7 @@ the environment, assign it the undefined value =head1 AUTHOR -Chip Salzenberg +Chip Salzenberg EFE =cut diff --git a/lib/Exporter.pm b/lib/Exporter.pm index e374414..fd95a7e 100644 --- a/lib/Exporter.pm +++ b/lib/Exporter.pm @@ -264,7 +264,7 @@ try to use @EXPORT_OK in preference to @EXPORT and avoid short or common symbol names to reduce the risk of name clashes. Generally anything not exported is still accessible from outside the -module using the ModuleName::item_name (or $blessed_ref->method) +module using the ModuleName::item_name (or $blessed_ref-Emethod) syntax. By convention you can use a leading underscore on names to informally indicate that they are 'internal' and not for public use. @@ -328,7 +328,7 @@ into modules. =head2 Module Version Checking The Exporter module will convert an attempt to import a number from a -module into a call to $module_name->require_version($value). This can +module into a call to $module_name-Erequire_version($value). This can be used to validate that the version of the module being used is greater than or equal to the required version. diff --git a/lib/ExtUtils/Install.pm b/lib/ExtUtils/Install.pm index 86e7787..dda1325 100644 --- a/lib/ExtUtils/Install.pm +++ b/lib/ExtUtils/Install.pm @@ -314,8 +314,8 @@ be copied preserving timestamps and permissions. There are two keys with a special meaning in the hash: "read" and "write". After the copying is done, install will write the list of -target files to the file named by $hashref->{write}. If there is -another file named by $hashref->{read}, the contents of this file will +target files to the file named by C<$hashref-E{write}>. If there is +another file named by C<$hashref-E{read}>, the contents of this file will be merged into the written file. The read and the written file may be identical, but on AFS it is quite likely, people are installing to a different directory than the one where the files later appear. diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index aba04e3..b3356d9 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -42,8 +42,8 @@ overrides by defining rather primitive operations within ExtUtils::MM_Unix. If you are going to write a platform specific MM package, please try -to limit the necessary overrides to primitiv methods, and if it is not -possible to do so, let's work it out how to achieve that gain. +to limit the necessary overrides to primitive methods, and if it is not +possible to do so, let's work out how to achieve that gain. If you are overriding any of these methods in your Makefile.PL (in the MY class), please report that to the makemaker mailing list. We are @@ -60,7 +60,7 @@ sections and complain loudly to the makemaker mailing list. Not all of the methods below are overridable in a Makefile.PL. Overridable methods are marked as (o). All methods are overridable by a platform specific MM_*.pm file (See -L) and L). +L and L). =head2 Preloaded methods @@ -1031,7 +1031,7 @@ sub extliblist { =item file_name_is_absolute -Takes as argument a path and returns true, it it is an absolute path. +Takes as argument a path and returns true, if it is an absolute path. =cut @@ -2475,7 +2475,7 @@ sub post_constants{ =item post_initialize (o) -Returns an ampty string per default. Used in Makefile.PLs to add some +Returns an empty string per default. Used in Makefile.PLs to add some chunk of text to the Makefile after the object is initialized. =cut diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index e75f28f..027c1fe 100644 --- a/lib/ExtUtils/MakeMaker.pm +++ b/lib/ExtUtils/MakeMaker.pm @@ -1140,7 +1140,7 @@ so =item CONFIGURE CODE reference. The subroutine should return a hash reference. The -hash may contain further attributes, e.g. {LIBS => ...}, that have to +hash may contain further attributes, e.g. {LIBS =E ...}, that have to be determined by some evaluation method. =item DEFINE diff --git a/lib/ExtUtils/Mksymlists.pm b/lib/ExtUtils/Mksymlists.pm index 47c37bf..0f9a132 100644 --- a/lib/ExtUtils/Mksymlists.pm +++ b/lib/ExtUtils/Mksymlists.pm @@ -153,7 +153,7 @@ ExtUtils::Mksymlists - write linker options files for dynamic extension =head1 DESCRIPTION C produces files used by the linker under some OSs -during the creation of shared libraries for synamic extensions. It is +during the creation of shared libraries for dynamic extensions. It is normally called from a MakeMaker-generated Makefile when the extension is built. The linker option file is generated by calling the function C, which is exported by default from C. diff --git a/lib/File/Copy.pm b/lib/File/Copy.pm index aedcd7f..92b9be1 100644 --- a/lib/File/Copy.pm +++ b/lib/File/Copy.pm @@ -192,8 +192,8 @@ associated with an old version of that file after C returns, not the newly created version.) The third parameter is an integer flag, which tells C -how to handle timestamps. If it is < 0, none of the input file's -timestamps are propagated to the output file. If it is > 0, then +how to handle timestamps. If it is E 0, none of the input file's +timestamps are propagated to the output file. If it is E 0, then it is interpreted as a bitmask: if bit 0 (the LSB) is set, then timestamps other than the revision date are propagated; if bit 1 is set, the revision date is propagated. If the third parameter diff --git a/lib/File/Path.pm b/lib/File/Path.pm index 97cb668..8d775d5 100644 --- a/lib/File/Path.pm +++ b/lib/File/Path.pm @@ -78,8 +78,8 @@ treated as ordinary files. =head1 AUTHORS -Tim Bunce -Charles Bailey +Tim Bunce EFE +Charles Bailey EFE =head1 REVISION diff --git a/lib/FindBin.pm b/lib/FindBin.pm index 4bfc098..242ea5f 100644 --- a/lib/FindBin.pm +++ b/lib/FindBin.pm @@ -24,7 +24,7 @@ Locates the full path to the script bin directory to allow the use of paths relative to the bin directory. This allows a user to setup a directory tree for some software with -directories /bin and /lib and then the above example will allow +directories ErootE/bin and ErootE/lib and then the above example will allow the use of modules in the lib directory without knowing where the software tree is installed. @@ -55,8 +55,8 @@ Workaround is to invoke perl as =head1 AUTHORS -Graham Barr -Nick Ing-Simmons +Graham Barr EFE +Nick Ing-Simmons EFE =head1 COPYRIGHT diff --git a/lib/Getopt/Long.pm b/lib/Getopt/Long.pm index 3fa9c8b..190b609 100644 --- a/lib/Getopt/Long.pm +++ b/lib/Getopt/Long.pm @@ -85,7 +85,7 @@ followed by an argument specifier. Values for argument specifiers are: =over 8 -=item +=item EnoneE Option does not take an argument. The option variable will be set to 1. @@ -208,7 +208,7 @@ The option name is always the true name, not an abbreviation or alias. The option name may actually be a list of option names, separated by "|"s, e.g. "foo|bar|blech=s". In this example, "foo" is the true name -op this option. If no linkage is specified, options "foo", "bar" and +of this option. If no linkage is specified, options "foo", "bar" and "blech" all will set $opt_foo. Option names may be abbreviated to uniqueness, depending on @@ -216,7 +216,7 @@ configuration variable $Getopt::Long::autoabbrev. =head2 Non-option call-back routine -A special option specifier, <>, can be used to designate a subroutine +A special option specifier, EE, can be used to designate a subroutine to handle non-option arguments. GetOptions will immediately call this subroutine for every non-option it encounters in the options list. This subroutine gets the name of the non-option passed. @@ -285,18 +285,18 @@ In GNU or POSIX format, option names and values can be combined: --bar= -> $opt_bar = '' --bar=-- -> $opt_bar = '--' -Example of using variabel references: +Example of using variable references: $ret = &GetOptions ('foo=s', \$foo, 'bar=i', 'ar=s', \@ar); With command line options "-foo blech -bar 24 -ar xx -ar yy" this will result in: - $bar = 'blech' + $foo = 'blech' $opt_bar = 24 @ar = ('xx','yy') -Example of using the <> option specifier: +Example of using the EE option specifier: @ARGV = qw(-foo 1 bar -foo 2 blech); &GetOptions("foo=i", \$myfoo, "<>", \&mysub); diff --git a/lib/IPC/Open2.pm b/lib/IPC/Open2.pm index 62ec69b..35bb0d1 100644 --- a/lib/IPC/Open2.pm +++ b/lib/IPC/Open2.pm @@ -20,7 +20,7 @@ The open2() function spawns the given $cmd and connects $rdr for reading and $wtr for writing. It's what you think should work when you try - open(HANDLE, "|cmd args"); + open(HANDLE, "|cmd args|"); open2() returns the process ID of the child process. It doesn't return on failure: it just raises an exception matching C. diff --git a/lib/IPC/Open3.pm b/lib/IPC/Open3.pm index fc93ab5..d416ae7 100644 --- a/lib/IPC/Open3.pm +++ b/lib/IPC/Open3.pm @@ -19,9 +19,9 @@ connects RDRFH for reading, WTRFH for writing, and ERRFH for errors. If ERRFH is '', or the same as RDRFH, then STDOUT and STDERR of the child are on the same file handle. -If WTRFH begins with "<&", then WTRFH will be closed in the parent, and +If WTRFH begins with "E&", then WTRFH will be closed in the parent, and the child will read from it directly. If RDRFH or ERRFH begins with -">&", then the child will send output directly to that file handle. In both +"E&", then the child will send output directly to that file handle. In both cases, there will be a dup(2) instead of a pipe(2) made. If you try to read from the child's stdout writer and their stderr diff --git a/lib/Pod/Text.pm b/lib/Pod/Text.pm index 1411587..4faed49 100644 --- a/lib/Pod/Text.pm +++ b/lib/Pod/Text.pm @@ -28,13 +28,13 @@ A separate F program is included that is primarily a wrapper for Pod::Text. The single function C can take one or two arguments. The first -should be the name of a file to read the pod from, or "<&STDIN" to read from +should be the name of a file to read the pod from, or "E&STDIN" to read from STDIN. A second argument, if provided, should be a filehandle glob where output should be sent. =head1 AUTHOR -Tom Christiansen Etchrist@mox.perl.comE +Tom Christiansen EFE =head1 TODO diff --git a/lib/SelfLoader.pm b/lib/SelfLoader.pm index 136d42b..11dc6a2 100644 --- a/lib/SelfLoader.pm +++ b/lib/SelfLoader.pm @@ -230,7 +230,7 @@ that filehandle (and ONLY if you want to), you should either the C<__DATA__> token and put your own data after those declarations, using the C<__END__> token to mark the end of subroutine declarations. You must also ensure that the B -reads first by calling 'SelfLoader->load_stubs();', or by using a +reads first by calling 'SelfLoader-Eload_stubs();', or by using a function which is selfloaded; or @@ -258,7 +258,7 @@ need for stubs as far as autoloading is concerned. For modules which ARE classes, and need to handle inherited methods, stubs are needed to ensure that the method inheritance mechanism works properly. You can load the stubs into the module at 'require' time, by -adding the statement 'SelfLoader->load_stubs();' to the module to do +adding the statement 'SelfLoader-Eload_stubs();' to the module to do this. The alternative is to put the stubs in before the C<__DATA__> token BEFORE diff --git a/lib/Sys/Hostname.pm b/lib/Sys/Hostname.pm index d527e45..ec04efc 100644 --- a/lib/Sys/Hostname.pm +++ b/lib/Sys/Hostname.pm @@ -25,7 +25,7 @@ All nulls, returns, and newlines are removed from the result. =head1 AUTHOR -David Sundstrom +David Sundstrom EFE Texas Instruments diff --git a/lib/Term/Complete.pm b/lib/Term/Complete.pm index 6faef22..884f83f 100644 --- a/lib/Term/Complete.pm +++ b/lib/Term/Complete.pm @@ -28,7 +28,7 @@ The following command characters are defined: =over 4 -=item +=item EtabE Attempts word completion. Cannot be changed. @@ -42,7 +42,7 @@ Defined by I<$Term::Complete::complete>. Erases the current input. Defined by I<$Term::Complete::kill>. -=item , +=item EdelE, EbsE Erases one character. Defined by I<$Term::Complete::erase1> and I<$Term::Complete::erase2>. @@ -55,7 +55,7 @@ Bell sounds when word completion fails. =head1 BUGS -The completion charater cannot be changed. +The completion charater EtabE cannot be changed. =head1 AUTHOR diff --git a/lib/Term/ReadLine.pm b/lib/Term/ReadLine.pm index 2ce7423..88fc638 100644 --- a/lib/Term/ReadLine.pm +++ b/lib/Term/ReadLine.pm @@ -33,7 +33,7 @@ or as $term->addhistory('row'); -where $term is a return value of Term::ReadLine->Init. +where $term is a return value of Term::ReadLine-EInit. =over 12 @@ -74,7 +74,7 @@ history. Returns the old value. =item C returns an array with two strings that give most appropriate names for -files for input and output using conventions C<"<$in">, C<"Eout">. +files for input and output using conventions C<"E$in">, C<"Eout">. =item C diff --git a/lib/Text/Tabs.pm b/lib/Text/Tabs.pm index 8cc0d92..4024d7b 100644 --- a/lib/Text/Tabs.pm +++ b/lib/Text/Tabs.pm @@ -69,15 +69,15 @@ __END__ =head1 NAME -Text::Tabs -- expand and unexpand tabs per the unix expand(1) and unexpand(1) +Text::Tabs - expand and unexpand tabs per the unix expand(1) and unexpand(1) =head1 SYNOPSIS -use Text::Tabs; + use Text::Tabs; -$tabstop = 4; -@lines_without_tabs = expand(@lines_with_tabs); -@lines_with_tabs = unexpand(@lines_without_tabs); + $tabstop = 4; + @lines_without_tabs = expand(@lines_with_tabs); + @lines_with_tabs = unexpand(@lines_without_tabs); =head1 DESCRIPTION @@ -94,4 +94,4 @@ entire document in one string. Instead feed it an array of lines. =head1 AUTHOR -David Muir Sharnoff +David Muir Sharnoff EFE diff --git a/lib/Text/Wrap.pm b/lib/Text/Wrap.pm index 03bae1b..2ffc69e 100644 --- a/lib/Text/Wrap.pm +++ b/lib/Text/Wrap.pm @@ -95,6 +95,6 @@ should be set to the full width of your output device. =head1 AUTHOR -David Muir Sharnoff +David Muir Sharnoff EFE =cut diff --git a/lib/Time/Local.pm b/lib/Time/Local.pm index 40e8da7..1fab298 100644 --- a/lib/Time/Local.pm +++ b/lib/Time/Local.pm @@ -8,7 +8,7 @@ use Carp; =head1 NAME -Time::Local - efficiently compute tome from local and GMT time +Time::Local - efficiently compute time from local and GMT time =head1 SYNOPSIS diff --git a/lib/diagnostics.pm b/lib/diagnostics.pm index f20b956..a8af08f 100755 --- a/lib/diagnostics.pm +++ b/lib/diagnostics.pm @@ -41,9 +41,9 @@ Aa a program: =head2 The C Pragma This module extends the terse diagnostics normally emitted by both the -perl compiler and the perl interpeter, augmenting them wtih the more +perl compiler and the perl interpeter, augmenting them with the more explicative and endearing descriptions found in L. Like the -other pragmata, it affects to compilation phase of your program rather +other pragmata, it affects the compilation phase of your program rather than merely the execution phase. To use in your program as a pragma, merely invoke @@ -62,8 +62,8 @@ However, you may control there behaviour at runtime using the disable() and enable() methods to turn them off and on respectively. The B<-verbose> flag first prints out the L introduction before -any other diagnostics. The $diagnostics::PRETTY can generate nicer escape -sequences for pgers. +any other diagnostics. The $diagnostics::PRETTY variable can generate nicer +escape sequences for pagers. =head2 The I Program @@ -98,7 +98,7 @@ afterwards, do this: ./splain < test.out Note that this is not in general possible in shells of more dubious heritage, -as the theorectical +as the theoretical (perl -w test.pl >/dev/tty) >& test.out ./splain < test.out @@ -143,7 +143,7 @@ runtime. Otherwise, they may be embedded in the file itself when the splain package is built. See the F for details. If an extant $SIG{__WARN__} handler is discovered, it will continue -to be honored, but only after the diagnostic::splainthis() function +to be honored, but only after the diagnostics::splainthis() function (the module's $SIG{__WARN__} interceptor) has had its way with your warnings. diff --git a/lib/overload.pm b/lib/overload.pm index 28e7d0b..20411ea 100644 --- a/lib/overload.pm +++ b/lib/overload.pm @@ -203,7 +203,7 @@ postfix form. "atan2", "cos", "sin", "exp", "abs", "log", "sqrt", If C is unavailable, it can be autogenerated using methods -for "<" or "<=>" combined with either unary minus or subtraction. +for "E" or "E=E" combined with either unary minus or subtraction. =item * I @@ -376,7 +376,7 @@ can be expressed in terms of string conversion. can be expressed in terms of its "spaceship" counterpart: either C=E> or C: - + <, >, <=, >=, ==, != in terms of <=> lt, gt, le, ge, eq, ne in terms of cmp @@ -476,7 +476,7 @@ to be changed are constant (but this is not enforced). =head1 AUTHOR -Ilya Zakharevich >. +Ilya Zakharevich EFE. =head1 DIAGNOSTICS diff --git a/lib/splain b/lib/splain index f20b956..a8af08f 100755 --- a/lib/splain +++ b/lib/splain @@ -41,9 +41,9 @@ Aa a program: =head2 The C Pragma This module extends the terse diagnostics normally emitted by both the -perl compiler and the perl interpeter, augmenting them wtih the more +perl compiler and the perl interpeter, augmenting them with the more explicative and endearing descriptions found in L. Like the -other pragmata, it affects to compilation phase of your program rather +other pragmata, it affects the compilation phase of your program rather than merely the execution phase. To use in your program as a pragma, merely invoke @@ -62,8 +62,8 @@ However, you may control there behaviour at runtime using the disable() and enable() methods to turn them off and on respectively. The B<-verbose> flag first prints out the L introduction before -any other diagnostics. The $diagnostics::PRETTY can generate nicer escape -sequences for pgers. +any other diagnostics. The $diagnostics::PRETTY variable can generate nicer +escape sequences for pagers. =head2 The I Program @@ -98,7 +98,7 @@ afterwards, do this: ./splain < test.out Note that this is not in general possible in shells of more dubious heritage, -as the theorectical +as the theoretical (perl -w test.pl >/dev/tty) >& test.out ./splain < test.out @@ -143,7 +143,7 @@ runtime. Otherwise, they may be embedded in the file itself when the splain package is built. See the F for details. If an extant $SIG{__WARN__} handler is discovered, it will continue -to be honored, but only after the diagnostic::splainthis() function +to be honored, but only after the diagnostics::splainthis() function (the module's $SIG{__WARN__} interceptor) has had its way with your warnings. diff --git a/lib/strict.pm b/lib/strict.pm index a1c5153..4aa55eb 100644 --- a/lib/strict.pm +++ b/lib/strict.pm @@ -56,7 +56,7 @@ name without fully qualifying it. This disables the poetry optimization, generating a compile-time error if you try to use a bareword identifier that's not a subroutine, unless it -appears in curly braces or on the left hand side of the "=>" symbol. +appears in curly braces or on the left hand side of the "=E" symbol. use strict 'subs'; diff --git a/pod/buildtoc b/pod/buildtoc index 9ca5e92..8a9b7ff 100644 --- a/pod/buildtoc +++ b/pod/buildtoc @@ -2,11 +2,13 @@ use File::Find; use Cwd; @pods = qw{ - perl perldata perlsyn perlop perlre perlrun perlfunc perlvar - perlsub perlmod perlref perldsc perllol perlobj perltie - perlbot perldebug perldiag perlform perlipc perlsec perltrap - perlstyle perlxs perlxstut perlguts perlcall perlembed perlpod - perlbook + perl + perldata perlsyn perlop perlre perlrun perlfunc perlvar + perlsub perlmod perlform + perlref perldsc perllol perlobj perltie perlbot perlipc + perldebug perldiag perlsec perltrap perlstyle + perlpod perlbook + perlembed perlapio perlxs perlxstut perlguts perlcall }; for (@pods) { s/$/.pod/ } @@ -100,7 +102,7 @@ podset( @modules[ sort { $modname[$a] cmp $modname[$b] } 0 .. $#modules ] ); =head1 AUXILIARY DOCUMENTATION - Here should be listed all the extra program's docs, but they + Here should be listed all the extra programs' docs, but they don't all have man pages yet: =item a2p diff --git a/pod/perldsc.pod b/pod/perldsc.pod index 6d31976..6991e7a 100644 --- a/pod/perldsc.pod +++ b/pod/perldsc.pod @@ -509,7 +509,7 @@ types of data structures. # calling a function that returns a key,value list, like # "lead","fred","daughter","pebbles" - while ( %fields = getnextpairset() ) + while ( %fields = getnextpairset() ) { push @LoH, { %fields }; } @@ -601,12 +601,6 @@ types of data structures. } } - # calling a function that returns a key,value list, like - # "lead","fred","daughter","pebbles" - while ( %fields = getnextpairset() ) - push @a, { %fields }; - } - # calling a function that returns a key,value hash for $group ( "simpsons", "jetsons", "flintstones" ) { $HoH{$group} = { get_family($group) }; @@ -638,7 +632,7 @@ types of data structures. # print the whole thing foreach $family ( keys %HoH ) { - print "$family: "; + print "$family: { "; for $role ( keys %{ $HoH{$family} } ) { print "$role=$HoH{$family}{$role} "; } @@ -647,7 +641,7 @@ types of data structures. # print the whole thing somewhat sorted foreach $family ( sort keys %HoH ) { - print "$family: "; + print "$family: { "; for $role ( sort keys %{ $HoH{$family} } ) { print "$role=$HoH{$family}{$role} "; } @@ -657,7 +651,7 @@ types of data structures. # print the whole thing sorted by number of members foreach $family ( sort { keys %{$HoH{$b}} <=> keys %{$HoH{$b}} } keys %HoH ) { - print "$family: "; + print "$family: { "; for $role ( sort keys %{ $HoH{$family} } ) { print "$role=$HoH{$family}{$role} "; } @@ -670,9 +664,9 @@ types of data structures. # now print the whole thing sorted by number of members foreach $family ( sort { keys %{$HoH{$b}} <=> keys %{$HoH{$b}} } keys %HoH ) { - print "$family: "; + print "$family: { "; # and print these according to rank order - for $role ( sort { $rank{$a} <=> $rank{$b} keys %{ $HoH{$family} } ) { + for $role ( sort { $rank{$a} <=> $rank{$b} keys %{ $HoH{$family} } } ) { print "$role=$HoH{$family}{$role} "; } print "}\n"; @@ -762,7 +756,7 @@ many different sorts: @members = (); # assume this file in field=value syntax - while () { + while (<>) { %fields = split /[\s=]+/; push @members, { %fields }; } @@ -829,7 +823,7 @@ source code to MLDBM. =head1 SEE ALSO -L, L, L, L +perlref(1), perllol(1), perldata(1), perlobj(1) =head1 AUTHOR diff --git a/pod/perlform.pod b/pod/perlform.pod index 8c840d4..a9ce4a7 100644 --- a/pod/perlform.pod +++ b/pod/perlform.pod @@ -54,7 +54,7 @@ with either "@" (at) or "^" (caret). These lines do not undergo any kind of variable interpolation. The at field (not to be confused with the array marker @) is the normal kind of field; the other kind, caret fields, are used to do rudimentary multi-line text block filling. The length of the field -is supplied by padding out the field with multiple "<", ">", or "|" +is supplied by padding out the field with multiple "E", "E", or "|" characters to specify, respectively, left justification, right justification, or centering. If the variable would exceed the width specified, it is truncated. @@ -147,18 +147,18 @@ Examples: . It is possible to intermix print()s with write()s on the same output -channel, but you'll have to handle $- ($FORMAT_LINES_LEFT) +channel, but you'll have to handle C<$-> (C<$FORMAT_LINES_LEFT>) yourself. =head2 Format Variables -The current format name is stored in the variable C<$~> ($FORMAT_NAME), -and the current top of form format name is in C<$^> ($FORMAT_TOP_NAME). -The current output page number is stored in C<$%> ($FORMAT_PAGE_NUMBER), -and the number of lines on the page is in C<$=> ($FORMAT_LINES_PER_PAGE). +The current format name is stored in the variable C<$~> (C<$FORMAT_NAME>), +and the current top of form format name is in C<$^> (C<$FORMAT_TOP_NAME>). +The current output page number is stored in C<$%> (C<$FORMAT_PAGE_NUMBER>), +and the number of lines on the page is in C<$=> (C<$FORMAT_LINES_PER_PAGE>). Whether to autoflush output on this handle is stored in C<$|> -($OUTPUT_AUTOFLUSH). The string output before each top of page (except -the first) is stored in C<$^L> ($FORMAT_FORMFEED). These variables are +(C<$OUTPUT_AUTOFLUSH>). The string output before each top of page (except +the first) is stored in C<$^L> (C<$FORMAT_FORMFEED>). These variables are set on a per-filehandle basis, so you'll need to select() into a different one to affect them: diff --git a/pod/perllol.pod b/pod/perllol.pod index a1e8a2d..c97aac9 100644 --- a/pod/perllol.pod +++ b/pod/perllol.pod @@ -12,7 +12,7 @@ that applies here will also be applicable later on with the fancier data structures. A list of lists, or an array of an array if you would, is just a regular -old array @LoL that you can get at with two subscripts, like $LoL[3][2]. Here's +old array @LoL that you can get at with two subscripts, like C<$LoL[3][2]>. Here's a declaration of the array: # assign to our array a list of list references @@ -42,7 +42,7 @@ but rather just a reference to it, you could do something more like this: Notice that the outer bracket type has changed, and so our access syntax has also changed. That's because unlike C, in perl you can't freely interchange arrays and references thereto. $ref_to_LoL is a reference to an -array, whereas @LoL is an array proper. Likewise, $LoL[2] is not an +array, whereas @LoL is an array proper. Likewise, C<$LoL[2]> is not an array, but an array ref. So how come you can write these: $LoL[2][2] @@ -54,7 +54,7 @@ instead of having to write these: $ref_to_LoL->[2]->[2] Well, that's because the rule is that on adjacent brackets only (whether -square or curly), you are free to omit the pointer dereferencing array. +square or curly), you are free to omit the pointer dereferencing arrow. But you cannot do so for the very first one if it's a scalar containing a reference, which means that $ref_to_LoL always needs it. @@ -116,7 +116,7 @@ You also don't have to use push(). You could just make a direct assignment if you knew where you wanted to put it: my (@LoL, $i, $line); - for $i ( 0 .. 10 ) + for $i ( 0 .. 10 ) { $line = <>; $LoL[$i] = [ split ' ', $line ]; } @@ -124,7 +124,7 @@ if you knew where you wanted to put it: or even just my (@LoL, $i); - for $i ( 0 .. 10 ) + for $i ( 0 .. 10 ) { $LoL[$i] = [ split ' ', <> ]; } @@ -133,7 +133,7 @@ in a scalar context without explicitly stating such. This would be clearer to the casual reader: my (@LoL, $i); - for $i ( 0 .. 10 ) + for $i ( 0 .. 10 ) { $LoL[$i] = [ split ' ', scalar(<>) ]; } @@ -308,6 +308,6 @@ perldata(1), perlref(1), perldsc(1) =head1 AUTHOR -Tom Christiansen +Tom Christiansen EFE Last udpate: Sat Oct 7 19:35:26 MDT 1995 diff --git a/pod/perlobj.pod b/pod/perlobj.pod index acbd531..54e052f 100644 --- a/pod/perlobj.pod +++ b/pod/perlobj.pod @@ -64,8 +64,9 @@ that wish to call methods in the class as part of the construction: return $self; } -If you care about inheritance (and you should; see L), then you want to use the two-arg form of bless +If you care about inheritance (and you should; see +L), +then you want to use the two-arg form of bless so that your constructors may be inherited: sub new { diff --git a/pod/perlrun.pod b/pod/perlrun.pod index 3761398..5042d67 100644 --- a/pod/perlrun.pod +++ b/pod/perlrun.pod @@ -238,7 +238,7 @@ example in L). =item B<-I>I Directories specified by B<-I> are prepended to the search path for -modules (@INC), and also tells the C preprocessor where to search for +modules (C<@INC>), and also tells the C preprocessor where to search for include files. The C preprocessor is invoked with B<-P>; by default it searches /usr/include and /usr/lib/perl. @@ -259,7 +259,7 @@ separator if the B<-l> switch is followed by a B<-0> switch: gnufind / -print0 | perl -ln0e 'print "found $_" if -p' -This sets $\ to newline and then sets $/ to the null character. +This sets C<$\> to newline and then sets C<$/> to the null character. =item B<-m>[B<->]I diff --git a/pod/perlsec.pod b/pod/perlsec.pod index 13c0987..facdded 100644 --- a/pod/perlsec.pod +++ b/pod/perlsec.pod @@ -134,7 +134,7 @@ a child of lesser privilege. =head2 Cleaning Up Your Path -For "Insecure $ENV{PATH}" messages, you need to set C<$ENV{'PATH'}> to a +For "Insecure C<$ENV{PATH}>" messages, you need to set C<$ENV{'PATH'}> to a known value, and each directory in the path must be non-writable by others than its owner and group. You may be surprised to get this message even if the pathname to your executable is fully qualified. This is I diff --git a/pod/perlsub.pod b/pod/perlsub.pod index 4d186d2..870b2b5 100644 --- a/pod/perlsub.pod +++ b/pod/perlsub.pod @@ -58,7 +58,7 @@ indistinguishable list. Perl does not have named formal parameters, but in practice all you do is assign to a my() list of these. Any variables you use in the function that aren't declared private are global variables. For the gory details -on creating private variables, see the sections below on +on creating private variables, see L<"Private Variables via my()"> and L<"Temporary Values via local()">. To create protected environments for a set of functions in a separate package (and probably a separate file), see L. @@ -106,7 +106,7 @@ Use array assignment to a local list to name your formal arguments: This also has the effect of turning call-by-reference into call-by-value, since the assignment copies the values. Otherwise a function is free to -do in-place modifications of @_ and change its callers values. +do in-place modifications of @_ and change its caller's values. upcase_in($v1, $v2); # this changes $v1 and $v2 sub upcase_in { @@ -362,7 +362,7 @@ Synopsis: local *merlyn = \$randal; # just alias $merlyn, not @merlyn etc A local() modifies its listed variables to be local to the enclosing -block, (or subroutine, C or C) and I or C) and I. A local() just gives temporary values to global (meaning package) variables. This is known as dynamic scoping. Lexical scoping is done with "my", which works more like C's auto declarations. @@ -392,7 +392,7 @@ subroutine. Examples: } # old %digits restored here -Because local() is a run-time command, and so gets executed every time +Because local() is a run-time command, it gets executed every time through a loop. In releases of Perl previous to 5.0, this used more stack storage each time until the loop was exited. Perl now reclaims the space each time through, but it's still more efficient to declare your variables @@ -442,7 +442,7 @@ whatever "*" value was assigned to it. Example: Note that scalars are already passed by reference, so you can modify scalar arguments without using this mechanism by referring explicitly -to $_[0] etc. You can modify all the elements of an array by passing +to C<$_[0]> etc. You can modify all the elements of an array by passing all the elements as scalars, but you have to use the * mechanism (or the equivalent reference mechanism) to push, pop or change the size of an array. It will certainly be faster to pass the typeglob (or reference). diff --git a/utils/c2ph.PL b/utils/c2ph.PL index 219af02..97d17af 100644 --- a/utils/c2ph.PL +++ b/utils/c2ph.PL @@ -46,7 +46,7 @@ print OUT <<'!NO!SUBS!'; =head1 NAME -c2ph,pstruct - Dump C structures as generated from 'cc -g -S' stabs +c2ph, pstruct - Dump C structures as generated from C stabs =head1 SYNOPSIS @@ -95,44 +95,44 @@ Pstruct takes any .c or .h files, or preferably .s ones, since that's the format it is going to massage them into anyway, and spits out listings like this: -struct tty { - int tty.t_locker 000 4 - int tty.t_mutex_index 004 4 - struct tty * tty.t_tp_virt 008 4 - struct clist tty.t_rawq 00c 20 - int tty.t_rawq.c_cc 00c 4 - int tty.t_rawq.c_cmax 010 4 - int tty.t_rawq.c_cfx 014 4 - int tty.t_rawq.c_clx 018 4 - struct tty * tty.t_rawq.c_tp_cpu 01c 4 - struct tty * tty.t_rawq.c_tp_iop 020 4 - unsigned char * tty.t_rawq.c_buf_cpu 024 4 - unsigned char * tty.t_rawq.c_buf_iop 028 4 - struct clist tty.t_canq 02c 20 - int tty.t_canq.c_cc 02c 4 - int tty.t_canq.c_cmax 030 4 - int tty.t_canq.c_cfx 034 4 - int tty.t_canq.c_clx 038 4 - struct tty * tty.t_canq.c_tp_cpu 03c 4 - struct tty * tty.t_canq.c_tp_iop 040 4 - unsigned char * tty.t_canq.c_buf_cpu 044 4 - unsigned char * tty.t_canq.c_buf_iop 048 4 - struct clist tty.t_outq 04c 20 - int tty.t_outq.c_cc 04c 4 - int tty.t_outq.c_cmax 050 4 - int tty.t_outq.c_cfx 054 4 - int tty.t_outq.c_clx 058 4 - struct tty * tty.t_outq.c_tp_cpu 05c 4 - struct tty * tty.t_outq.c_tp_iop 060 4 - unsigned char * tty.t_outq.c_buf_cpu 064 4 - unsigned char * tty.t_outq.c_buf_iop 068 4 - (*int)() tty.t_oproc_cpu 06c 4 - (*int)() tty.t_oproc_iop 070 4 - (*int)() tty.t_stopproc_cpu 074 4 - (*int)() tty.t_stopproc_iop 078 4 - struct thread * tty.t_rsel 07c 4 - - etc. + struct tty { + int tty.t_locker 000 4 + int tty.t_mutex_index 004 4 + struct tty * tty.t_tp_virt 008 4 + struct clist tty.t_rawq 00c 20 + int tty.t_rawq.c_cc 00c 4 + int tty.t_rawq.c_cmax 010 4 + int tty.t_rawq.c_cfx 014 4 + int tty.t_rawq.c_clx 018 4 + struct tty * tty.t_rawq.c_tp_cpu 01c 4 + struct tty * tty.t_rawq.c_tp_iop 020 4 + unsigned char * tty.t_rawq.c_buf_cpu 024 4 + unsigned char * tty.t_rawq.c_buf_iop 028 4 + struct clist tty.t_canq 02c 20 + int tty.t_canq.c_cc 02c 4 + int tty.t_canq.c_cmax 030 4 + int tty.t_canq.c_cfx 034 4 + int tty.t_canq.c_clx 038 4 + struct tty * tty.t_canq.c_tp_cpu 03c 4 + struct tty * tty.t_canq.c_tp_iop 040 4 + unsigned char * tty.t_canq.c_buf_cpu 044 4 + unsigned char * tty.t_canq.c_buf_iop 048 4 + struct clist tty.t_outq 04c 20 + int tty.t_outq.c_cc 04c 4 + int tty.t_outq.c_cmax 050 4 + int tty.t_outq.c_cfx 054 4 + int tty.t_outq.c_clx 058 4 + struct tty * tty.t_outq.c_tp_cpu 05c 4 + struct tty * tty.t_outq.c_tp_iop 060 4 + unsigned char * tty.t_outq.c_buf_cpu 064 4 + unsigned char * tty.t_outq.c_buf_iop 068 4 + (*int)() tty.t_oproc_cpu 06c 4 + (*int)() tty.t_oproc_iop 070 4 + (*int)() tty.t_stopproc_cpu 074 4 + (*int)() tty.t_stopproc_iop 078 4 + struct thread * tty.t_rsel 07c 4 + +etc. Actually, this was generated by a particular set of options. You can control @@ -140,10 +140,10 @@ the formatting of each column, whether you prefer wide or fat, hex or decimal, leading zeroes or whatever. All you need to be able to use this is a C compiler than generates -BSD/GCC-style stabs. The -g option on native BSD compilers and GCC +BSD/GCC-style stabs. The B<-g> option on native BSD compilers and GCC should get this for you. -To learn more, just type a bogus option, like -\?, and a long usage message +To learn more, just type a bogus option, like B<-\?>, and a long usage message will be provided. There are a fair number of possibilities. If you're only a C programmer, than this is the end of the message for you. @@ -193,7 +193,7 @@ them in terms of packages and functions. Consider the following program: As you see, the name of the package is the name of the structure. Regular -fields are just their own names. Plus the follwoing accessor functions are +fields are just their own names. Plus the following accessor functions are provided for your convenience: struct This takes no arguments, and is merely the number of first-level @@ -251,7 +251,7 @@ compiler and gcc. Anyway, here it is. Should run on perl v4 or greater. Maybe less. ---tom + --tom =cut diff --git a/utils/h2ph.PL b/utils/h2ph.PL index 4743dac..22161b9 100644 --- a/utils/h2ph.PL +++ b/utils/h2ph.PL @@ -30,10 +30,6 @@ $Config{'startperl'} eval 'exec perl -S \$0 "\$@"' if 0; -'di '; -'ds 00 \"'; -'ig 00 '; - !GROK!THIS! # In the following, perl variables are not expanded during extraction. @@ -253,56 +249,63 @@ sub expr { } } ############################################################################## +__END__ + +=head1 NAME + +h2ph - convert .h C header files to .ph Perl header files + +=head1 SYNOPSIS + +B + +=head1 DESCRIPTION - # These next few lines are legal in both Perl and nroff. - -.00 ; # finish .ig - -'di \" finish diversion--previous line must be blank -.nr nl 0-1 \" fake up transition to first page again -.nr % 0 \" start at page 1 -'; __END__ ############# From here on it's a standard manual page ############ -.TH H2PH 1 "August 8, 1990" -.AT 3 -.SH NAME -h2ph \- convert .h C header files to .ph Perl header files -.SH SYNOPSIS -.B h2ph [headerfiles] -.SH DESCRIPTION -.I h2ph +I converts any C header files specified to the corresponding Perl header file format. It is most easily run while in /usr/include: -.nf cd /usr/include; h2ph * sys/* -.fi If run with no arguments, filters standard input to standard output. -.SH ENVIRONMENT + +=head1 ENVIRONMENT + No environment variables are used. -.SH FILES -/usr/include/*.h -.br -/usr/include/sys/*.h -.br + +=head1 FILES + + /usr/include/*.h + /usr/include/sys/*.h + etc. -.SH AUTHOR + +=head1 AUTHOR + Larry Wall -.SH "SEE ALSO" + +=head1 SEE ALSO + perl(1) -.SH DIAGNOSTICS + +=head1 DIAGNOSTICS + The usual warnings if it can't read or write the files involved. -.SH BUGS + +=head1 BUGS + Doesn't construct the %sizeof array for you. -.PP + It doesn't handle all C constructs, but it does attempt to isolate definitions inside evals so that you can get at the definitions that it can translate. -.PP + It's only intended as a rough tool. You may need to dicker with the files produced. -.ex + +=cut + !NO!SUBS! close OUT or die "Can't close $file: $!";