1PARL(1) User Contributed Perl Documentation PARL(1)
2
3
4
6 parl - Binary PAR Loader
7
9 (Please see pp for convenient ways to make self-contained executables,
10 scripts or PAR archives from perl programs.)
11
12 To make a PAR distribution from a CPAN module distribution:
13
14 % parl -p # make a PAR dist under the current path
15 % parl -p Foo-0.01 # assume unpacked CPAN dist in Foo-0.01/
16
17 To manipulate a PAR distribution:
18
19 % parl -i Foo-0.01-i386-freebsd-5.8.0.par # install
20 % parl -i http://foo.com/Foo-0.01 # auto-appends archname + perlver
21 % parl -i cpan://AUTRIJUS/PAR-0.74 # uses CPAN author directory
22 % parl -u Foo-0.01-i386-freebsd-5.8.0.par # uninstall
23 % parl -s Foo-0.01-i386-freebsd-5.8.0.par # sign
24 % parl -v Foo-0.01-i386-freebsd-5.8.0.par # verify
25
26 To use Hello.pm from ./foo.par:
27
28 % parl -A./foo.par -MHello
29 % parl -A./foo -MHello # the .par part is optional
30
31 Same thing, but search foo.par in the @INC;
32
33 % parl -Ifoo.par -MHello
34 % parl -Ifoo -MHello # ditto
35
36 Run test.pl or script/test.pl from foo.par:
37
38 % parl foo.par test.pl # looks for 'main.pl' by default,
39 # otherwise run 'test.pl'
40
41 To make a self-containing executable containing a PAR file :
42
43 % parl -O./foo foo.par
44 % ./foo test.pl # same as above
45
46 To embed the necessary non-core modules and shared objects for PAR's
47 execution (like "Zlib", "IO", "Cwd", etc), use the -b flag:
48
49 % parl -b -O./foo foo.par
50 % ./foo test.pl # runs anywhere with core modules installed
51
52 If you also wish to embed core modules along, use the -B flag instead:
53
54 % parl -B -O./foo foo.par
55 % ./foo test.pl # runs anywhere with the perl interpreter
56
57 This is particularly useful when making stand-alone binary executables;
58 see pp for details.
59
61 This stand-alone command offers roughly the same feature as "perl
62 -MPAR", except that it takes the pre-loaded .par files via "-Afoo.par"
63 instead of "-MPAR=foo.par".
64
65 Additionally, it lets you convert a CPAN distribution to a PAR
66 distribution, as well as manipulate such distributions. For more
67 information about PAR distributions, see PAR::Dist.
68
69 You can use it to run .par files:
70
71 # runs script/run.pl in archive, uses its lib/* as libraries
72 % parl myapp.par run.pl # runs run.pl or script/run.pl in myapp.par
73 % parl otherapp.pl # also runs normal perl scripts
74
75 However, if the .par archive contains either main.pl or script/main.pl,
76 it is used instead:
77
78 % parl myapp.par run.pl # runs main.pl, with 'run.pl' as @ARGV
79
80 Finally, the "-O" option makes a stand-alone binary executable from a
81 PAR file:
82
83 % parl -B -Omyapp myapp.par
84 % ./myapp # run it anywhere without perl binaries
85
86 With the "--par-options" flag, generated binaries can act as "parl" to
87 pack new binaries:
88
89 % ./myapp --par-options -Omyap2 myapp.par # identical to ./myapp
90 % ./myapp --par-options -Omyap3 myap3.par # now with different PAR
91
92 For an explanation of stand-alone executable format, please see par.pl.
93
95 PAR, PAR::Dist, par.pl, pp
96
98 Audrey Tang <cpan@audreyt.org>
99
100 You can write to the mailing list at <par@perl.org>, or send an empty
101 mail to <par-subscribe@perl.org> to participate in the discussion.
102
103 Please submit bug reports to <bug-par-packer@rt.cpan.org>.
104
106 Copyright 2002-2009 by Audrey Tang <cpan@audreyt.org>.
107
108 Neither this program nor the associated pp program impose any licensing
109 restrictions on files generated by their execution, in accordance with
110 the 8th article of the Artistic License:
111
112 "Aggregation of this Package with a commercial distribution is
113 always permitted provided that the use of this Package is embedded;
114 that is, when no overt attempt is made to make this Package's
115 interfaces visible to the end user of the commercial distribution.
116 Such use shall not be construed as a distribution of this Package."
117
118 Therefore, you are absolutely free to place any license on the
119 resulting executable, as long as the packed 3rd-party libraries are
120 also available under the Artistic License.
121
122 This program is free software; you can redistribute it and/or modify it
123 under the same terms as Perl itself.
124
125 See LICENSE.
126
127
128
129perl v5.36.0 2022-12-02 PARL(1)