]> matita.cs.unibo.it Git - helm.git/blob - helm/hxsp/splitted/2.start.p.pl
ocaml 3.09 transition
[helm.git] / helm / hxsp / splitted / 2.start.p.pl
1 #################################################################################################
2 #################################################################################################
3 #################################################################################################
4 # Starting Operations
5 #################################################################################################
6 #################################################################################################
7 #################################################################################################
8
9 # chdir to the directory of this perl script
10 chdir $FindBin::Bin;
11
12 # load CONFIG
13 load_conf();
14
15 # initialize the objects to use LibXML and LibXSLT
16 my $parser = XML::LibXML->new();
17 my $xslt = XML::LibXSLT->new();
18
19 # initialize the LibXML callbacks to load uri's
20 XML::LibXML->callbacks(\&match_uri,\&open_uri,\&read_uri,\&close_uri);
21
22 # include XIncludes on the fly if required
23 if ($expand_xinc eq "ON") { $parser->expand_xinclude( 1 ); }
24
25 # initialize the hxsp as HTTP::Daemon
26 my $d = new HTTP::Daemon LocalPort => $port;
27
28 # get the complete working url of hxsp
29 my $puwobo_url = $d->url().$working_path;
30
31 # set the working path to be comparable with url->path
32 $working_path = "/". $working_path;
33
34 # load messages
35 load_messages();
36
37 # load error
38 load_err();
39
40 # load templates
41 load_templates();
42
43 # print starting information on console
44 print qq{
45 hxsp v$ver active at: <URL:$puwobo_url>
46    Language is $language
47    On syntax error usage of every command is $all_usage_synerr
48    Include XIncludes on the fly is $expand_xinc;
49 };