The following patch should fix this problem. I tried to eliminate inconsitencies and tested the given examples. It should now match the principles of manpages and perldocs.
Best Regards,
Gregor Schmidt
diff -uNr perl-5.8.6_orig/utils/perlcc.PL perl-5.8.6/utils/perlcc.PL
--- perl-5.8.6_orig/utils/perlcc.PL 2003-09-04 19:12:18.000000000 +0200
+++ perl-5.8.6/utils/perlcc.PL 2005-01-23 18:16:13.826014256 +0100
@@ -529,7 +529,7 @@
sub _usage_and_die {
_die(<<EOU);
$0: Usage:
-$0 [-o executable] [-r] [-O|-B|-c|-S] [-I /foo] [-L /foo] [-log log]
[source[.pl] | -e oneliner]
+$0 [-o outfile] [-r] [-O|-B|-c|-S] [-I /includedir] [-L /libdir] [-log
logfile] [-v [1-4]] source | -e oneliner
EOU
}
@@ -590,29 +590,9 @@
=head1 SYNOPSIS
- $ perlcc hello # Compiles into executable 'a.out'
- $ perlcc -o hello hello.pl # Compiles into executable 'hello'
-
- $ perlcc -O file # Compiles using the optimised C backend
- $ perlcc -B file # Compiles using the bytecode backend
-
- $ perlcc -c file # Creates a C file, 'file.c'
- $ perlcc -S -o hello file # Creates a C file, 'file.c',
- # then compiles it to executable 'hello'
- $ perlcc -c out.c file # Creates a C file, 'out.c' from 'file'
-
- $ perlcc -e 'print q//' # Compiles a one-liner into 'a.out'
- $ perlcc -c -e 'print q//' # Creates a C file 'a.out.c'
-
- $ perlcc -I /foo hello # extra headers (notice the space after -I)
- $ perlcc -L /foo hello # extra libraries (notice the space after -L)
-
- $ perlcc -r hello # compiles 'hello' into 'a.out', runs 'a.out'.
- $ perlcc -r hello a b c # compiles 'hello' into 'a.out', runs 'a.out'.
- # with arguments 'a b c'
-
- $ perlcc hello -log c # compiles 'hello' into 'a.out' logs compile
- # log into 'c'.
+B<perlcc> [B<-o> F<outfile>] [B<-r>] [B<-O>|B<-B>|B<-c>|B<-S>] [B<-v> I<[1-4]>]
+ [B<-I> F<includedirs>] [B<-L> F<libdirs>] [B<-log> F<logfile>]
+ F<source> | B<-e> I<oneliner>
=head1 DESCRIPTION
@@ -630,57 +610,119 @@
=over 4
-=item -LI<library directories>
+=item B<-L> F<libdirs>
Adds the given directories to the library search path when C code is
passed to your C compiler.
-=item -II<include directories>
+=item B<-I> F<includedirs>
Adds the given directories to the include file search path when C code is
passed to your C compiler; when using the Perl bytecode option, adds the
given directories to Perl's include path.
-=item -o I<output file name>
+=item B<-o> F<outfile>
Specifies the file name for the final compiled executable.
-=item -c I<C file name>
+=item B<-c>
Create C code only; do not compile to a standalone binary.
-=item -e I<perl code>
+=item B<-e> I<oneliner>
Compile a one-liner, much the same as C<perl -e '...'>
-=item -S
+=item B<-S>
Do not delete generated C code after compilation.
-=item -B
+=item B<-B>
Use the Perl bytecode code generator.
-=item -O
+=item B<-O>
Use the 'optimised' C code generator. This is more experimental than
everything else put together, and the code created is not guaranteed to
compile in finite time and memory, or indeed, at all.
-=item -v
+=item B<-v> I<[1-4]>
-Increase verbosity of output; can be repeated for more verbose output.
+Increase verbosity of output; Higher number means more verbose output.
-=item -r
+=item B<-r>
Run the resulting compiled script after compiling it.
-=item -log
+=item B<-log> I<logfile>
Log the output of compiling to a file rather than to stdout.
=back
+=head1 EXAMPLES
+
+=over 4
+
+=item B<perlcc> F<hello.pl>
+
+Compiles I<hello.pl> into executable 'a.out'
+
+=item B<perlcc -o> F<hello> F<hello.pl>
+
+Compiles F<hello.pl> into executable F<hello>
+
+=item B<perlcc -O> F<hello.pl>
+
+Compiles F<hello.pl> using the optimised C backend
+
+=item B<perlcc -B> F<hello.pl>
+
+Compiles F<hello.pl> using the bytecode backend
+
+=item B<perlcc -S -o> F<hello> F<hello.pl>
+
+Creates a C file, 'F<hello>.c', then compiles it to executable F<hello>
+
+=item B<perlcc -c> F<hello.pl>
+
+Creates a C file, 'F<hello.c>'
+
+=item B<perlcc -o> F<out.c> B<-c> F<hello.pl>
+
+Creates a C file F<out.c> from F<hello.pl>
+
+=item B<perlcc -e> I<'print q//'>
+
+Compiles a one-liner into 'a.out'
+
+=item B<perlcc -c -e> I<'print q//'>
+
+Creates a C file 'a.out.c'
+
+=item B<perlcc -I> F</foo> F<hello.pl>
+
+extra headers (notice the space after B<-I>)
+
+=item B<perlcc -L> F</foo> F<hello.pl>
+
+extra libraries (notice the space after B<-L>)
+
+=item B<perlcc -r> F<hello.pl>
+
+compiles F<hello.pl> into 'a.out', runs 'a.out'.
+
+=item B<perlcc -r> F<hello.pl> I<a b c>
+
+compiles F<hello.pl> into 'a.out', runs 'a.out' with arguments I<a b c>
+
+=item B<perlcc> B<-v> I<2> F<hello.pl> B<-log> F<c>
+
+compiles F<hello> at a verbosity level of I<2> to 'a.out' and writes log
messages to F<c>.
+
+=back
+
=cut
!NO!SUBS!

