Apache2::WebStart - Apache handler for PAR::WebStart
In httpd.conf,
PerlModule Apache2::WebStart <Location /webstart> SetHandler perl-script PerlResponseHandler Apache2::WebStart PerlSetVar WS_codebase "lib/apps" PerlSetVar WS_title "My App" PerlSetVar WS_vendor "me.com" PerlSetVar WS_homepage "docs/hello.html" PerlSetVar WS_description "A Perl WebStart Application" PerlSetVar WS_os "MSWin32" PerlSetVar WS_no_sign 1 PerlSetVar WS_par "A.par" PerlAddVar WS_par "C.par" PerlSetVar WS_main "A" PerlSetVar WS_arg "verbose" PerlAddVar WS_arg "--debug" PerlSetVar WS_long_opts 1 PerlSetVar WS_module "Tk" PerlAddVar WS_module "LWP" </Location>
This module is an Apache (version 2) handler for dynamically generating PNLP files for PAR::WebStart. See PAR::WebStart::PNLP for details of the content of a PNLP files.
PNLP
PAR::WebStart
The following PerlSetVar directives are used to control the content of the PNLP file; of these, only at least one WS_par must be specified.
PerlSetVar
WS_par
PerlSetVar WS_codebase "lib/apps"
This specifies the base by which all relative URLs specified in the PNLP file will be resolved against. If this is not specified, the default root document directory will be assumed.
PerlSetVar WS_title "My App"
This specifies the title of the application.
PerlSetVar WS_vendor "me.com"
This specifies the vendor of the application.
PerlSetVar WS_homepage "docs/hello.html"
This specifies a link describing further details of the application; if it does not begin with http://, it will be assumed to use WS_codebase as the base.
http://
WS_codebase
PerlSetVar WS_description "A Perl WebStart Application"
This specifies a description of the application.
PerlSetVar WS_os "MSWin32"
This specifies that the application will only run on machines matching $Config{osname}.
$Config{osname}
PerlSetVar WS_arch "MSWin32-x86-multi-thread"
This specifies that the application will only run on machines matching $Config{archname}.
$Config{archname}
PerlSetVar WS_version "5.008006"
This specifies that the minimal perl version required (as given by $]) to run the application, and must be given in the form, for example, 5.008006 for perl-5.8.6.
$]
5.008006
PerlSetVar WS_perl_version "8"
This specifies that the application will only run on machines matching $Config{PERL_VERSION}.
$Config{PERL_VERSION}
PerlSetVar WS_no_sign 1
If set to a true value, this specifies that the par files will not be expected to be signed by Module::Signature (the default value is false, meaning par files are expected to be signed).
Module::Signature
PerlSetVar WS_par "A.par"
This specifies a par file used within the application; additional files may be specified by multiple directives such as PerlAddVar WS_par "C.par".
par
PerlAddVar WS_par "C.par"
PerlSetVar WS_main "A"
This specifies the name of the par file (without the .par extension) that contains the main script to be run. This directive is not needed if only one par file is specified. If this directive is not specified in the case of multiple par files, it will be assumed that the first par file specified by PerlSetVar WS_par contains the main script.
.par
PerlSetVar WS_par
PerlSetVar WS_arg "--verbose"
This specifies an argument to be passed to the main script. Additional arguments may be added through a directive like PerlAddVar WS_arg "--debug". In addition, if the URL associated with the handler contains a query string, those arguments (split on the ; or & character) will be added to the arguments passed to the main script. For example, a query string of arg1=arg;arg2=3 will include the arguments (in order) arg1=arg and arg2=3 passed to the main script. Query string arguments are added to the argument list after any specified by PerlSetVar WS_arg.
PerlAddVar WS_arg "--debug"
;
&
arg1=arg;arg2=3
arg1=arg
arg2=3
PerlSetVar WS_arg
PerlSetVar WS_long_opts 1
If this option is set to a true value, all arguments passed via either PerlSetVar/PerlAddVar WS_arg directives or by a query string will have two dashes (--) prepended to them when passed to the main script (for example, a query string of arg=4 will be passed to the main script as --arg=4. This may be useful if the main script uses Getopt::Long to process command-line options.
PerlSetVar/PerlAddVar WS_arg
--
arg=4
--arg=4
Getopt::Long
PerlSetVar WS_short_opts 1
If this option is set to a true value, all argumets passed via either PerlSetVar/PerlAddVar WS_arg directives or by a query string will have one dash (-) prepended to them when passed to the main script (for example, a query string of a=4 will be passed to the main script as -a=4. This may be useful if the main script uses Getopt::Std to process command-line options.
-
a=4
-a=4
Getopt::Std
PerlSetVar WS_module "Tk"
This specifies additional modules, outside of the basic perl core, that the application needs; additional modules may be specified by multiple directives such as PerlAddVar WS_module "LWP".
PerlAddVar WS_module "LWP"
Copyright, 2005, by Randy Kobes <r.kobes@uwinnipeg.ca>. This software is distributed under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html.
PAR::WebStart for an overview, and PAR::WebStart::PNLP for details of the PNLP file.
To install PAR::WebStart, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PAR::WebStart
CPAN shell
perl -MCPAN -e shell install PAR::WebStart
For more information on module installation, please visit the detailed CPAN module installation guide.