Penguin
Annotated edit history of perlcc(1) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 PERLCC
2 !!!PERLCC
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 OPTIONS
7 ----
8 !!NAME
9
10
11 perlcc - generate executables from Perl programs
12 !!SYNOPSIS
13
14
15 $ perlcc hello # Compiles into executable 'a.out'
16 $ perlcc -o hello hello.pl # Compiles into executable 'hello'
17 $ perlcc -O file # Compiles using the optimised C backend
18 $ perlcc -B file # Compiles using the bytecode backend
19 $ perlcc -c file # Creates a C file, 'file.c'
20 $ perlcc -S -o hello file # Creates a C file, 'file.c',
21 # then compiles it to executable 'hello'
22 $ perlcc -c out.c file # Creates a C file, 'out.c' from 'file'
23 $ perlcc -e 'print q//' # Compiles a one-liner into 'a.out'
24 $ perlcc -c -e 'print q//' # Creates a C file 'a.out.c'
25 $ perlcc -r hello # compiles 'hello' into 'a.out', runs 'a.out'.
26 $ perlcc -r hello a b c # compiles 'hello' into 'a.out', runs 'a.out'.
27 # with arguments 'a b c'
28 $ perlcc hello -log c # compiles 'hello' into 'a.out' logs compile
29 # log into 'c'.
30 !!DESCRIPTION
31
32
33 ''perlcc'' creates standalone executables from Perl
34 programs, using the code generators provided by the B
35 module. At present, you may either create executable Perl
36 bytecode, using the -B option, or generate and
37 compile C files using the standard and 'optimised' C
38 backends.
39
40
41 The code generated in this way is not guaranteed to work.
42 The whole codegen suite (perlcc included) should be
43 considered __very__ experimental. Use for production
44 purposes is strongly discouraged.
45 !!OPTIONS
46
47
48 -L''library directories''
49
50
51 Adds the given directories to the library search path when C
52 code is passed to your C compiler.
53
54
55 -I''include directories''
56
57
58 Adds the given directories to the include file search path
59 when C code is passed to your C compiler; when using the
60 Perl bytecode option, adds the given directories to Perl's
61 include path.
62
63
64 -o ''output file name''
65
66
67 Specifies the file name for the final compiled
68 executable.
69
70
71 -c ''C file name''
72
73
74 Create C code only; do not compile to a standalone
75 binary.
76
77
78 -e ''perl code''
79
80
81 Compile a one-liner, much the same as perl -e
82 '...'
83
84
85 -S
86
87
88 Do not delete generated C code after
89 compilation.
90
91
92 -B
93
94
95 Use the Perl bytecode code generator.
96
97
98 -O
99
100
101 Use the 'optimised' C code generator. This is more
102 experimental than everything else put together, and the code
103 created is not guaranteed to compile in finite time and
104 memory, or indeed, at all.
105
106
107 -v
108
109
110 Increase verbosity of output; can be repeated for more
111 verbose output.
112
113
114 -r
115
116
117 Run the resulting compiled script after compiling
118 it.
119
120
121 -log
122
123
124 Log the output of compiling to a file rather than to
125 stdout.
126 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.