… | |
… | |
313 | |
313 | |
314 | =head3 OPTION PROCESSING |
314 | =head3 OPTION PROCESSING |
315 | |
315 | |
316 | All options can be given as arguments on the command line (typically |
316 | All options can be given as arguments on the command line (typically |
317 | using long (e.g. C<--verbose>) or short option (e.g. C<-v>) style). Since |
317 | using long (e.g. C<--verbose>) or short option (e.g. C<-v>) style). Since |
318 | specifying a lot of modules can make the command line very cumbersome, you |
318 | specifying a lot of options can make the command line very long and |
319 | can put all long options into a "bundle specification file" (one option |
319 | unwieldy, you can put all long options into a "bundle specification file" |
320 | per line, with or without C<--> prefix) and specify this bundle file |
320 | (one option per line, with or without C<--> prefix) and specify this |
321 | instead. |
321 | bundle file instead. |
322 | |
322 | |
323 | For example, the command given earlier could also look like this: |
323 | For example, the command given earlier to link a new F<perl> could also |
|
|
324 | look like this: |
324 | |
325 | |
325 | staticperl mkperl httpd.bundle |
326 | staticperl mkperl httpd.bundle |
326 | |
327 | |
327 | And all options could be in F<httpd.bundle>: |
328 | With all options stored in the F<httpd.bundle> file (one option per line, |
328 | |
329 | everything after the option is an argument): |
|
|
330 | |
329 | use "Config_heavy.pl" |
331 | use "Config_heavy.pl" |
330 | use AnyEvent::Impl::Perl |
332 | use AnyEvent::Impl::Perl |
331 | use AnyEvent::HTTPD |
333 | use AnyEvent::HTTPD |
332 | use URI::http |
334 | use URI::http |
333 | add eg/httpd httpd.pm |
335 | add eg/httpd httpd.pm |
334 | |
336 | |
335 | All options that specify modules or files to be added are processed in the |
337 | All options that specify modules or files to be added are processed in the |
336 | order given on the command line. |
338 | order given on the command line. |
337 | |
339 | |
338 | =head3 BUNDLE CREATION WORKFLOW |
340 | =head3 BUNDLE CREATION WORKFLOW / STATICPELR MKBUNDLE OPTIONS |
339 | |
341 | |
340 | F<staticperl mkbundle> works by first assembling a list of candidate |
342 | F<staticperl mkbundle> works by first assembling a list of candidate |
341 | files and modules to include, then filtering them by include/exclude |
343 | files and modules to include, then filtering them by include/exclude |
342 | patterns. The remaining modules (together with their direct depdendencies, |
344 | patterns. The remaining modules (together with their direct dependencies, |
343 | such as link libraries and AutoLoader files) are then converted into |
345 | such as link libraries and L<AutoLoader> files) are then converted into |
344 | bundle files suitable for embedding. Afterwards, F<staticperl mkbundle> |
346 | bundle files suitable for embedding. F<staticperl mkbundle> can then |
345 | can optionally build a new perl interpreter or a standalone application. |
347 | optionally build a new perl interpreter or a standalone application. |
346 | |
348 | |
347 | =over 4 |
349 | =over 4 |
348 | |
350 | |
349 | =item Step 0: Generic argument processing. |
351 | =item Step 0: Generic argument processing. |
350 | |
352 | |
351 | The following options influence F<staticperl mkbundle> itself. |
353 | The following options influence F<staticperl mkbundle> itself. |
352 | |
354 | |
353 | =over 4 |
355 | =over 4 |
354 | |
356 | |
355 | =item --verbose | -v |
357 | =item C<--verbose> | C<-v> |
356 | |
358 | |
357 | Increases the verbosity level by one (the default is C<1>). |
359 | Increases the verbosity level by one (the default is C<1>). |
358 | |
360 | |
359 | =item --quiet | -q |
361 | =item C<--quiet> | C<-q> |
360 | |
362 | |
361 | Decreases the verbosity level by one. |
363 | Decreases the verbosity level by one. |
362 | |
364 | |
363 | =item any other argument |
365 | =item any other argument |
364 | |
366 | |
365 | Any other argument is interpreted as a bundle specification file, which |
367 | Any other argument is interpreted as a bundle specification file, which |
366 | supports most long options (without extra quoting), one option per line. |
368 | supports all options (without extra quoting), one option per line, in the |
|
|
369 | format C<option> or C<option argument>. They will effectively be expanded |
|
|
370 | and processed as if they were directly written on the command line, in |
|
|
371 | place of the file name. |
367 | |
372 | |
368 | =back |
373 | =back |
369 | |
374 | |
370 | =item Step 1: gather candidate files and modules |
375 | =item Step 1: gather candidate files and modules |
371 | |
376 | |