1 use SL::InstallationCheck;
 
   3 sub verify_installation {
 
   7   return unless ($form{"action"} && ($script eq "login.pl"));
 
   9   SL::InstallationCheck::check_for_conditional_dependencies();
 
  11   my @missing_modules = SL::InstallationCheck::test_all_modules();
 
  12   return if (scalar(@missing_modules) == 0);
 
  15   my $locale = new Locale($language, "installationcheck");
 
  17   print(qq|content-type: text/html
 
  21   <link rel="stylesheet" href="css/lx-office-erp.css" type="text/css"
 
  22         title="Lx-Office stylesheet">
 
  23   <title>| . $locale->text("One or more Perl modules missing") . qq|</title>
 
  27   <h1>| . $locale->text("One or more Perl modules missing") . qq|</h1>
 
  29   <p>| . $locale->text("At least one Perl module that Lx-Office ERP " .
 
  30                        "requires for running is not installed on your " .
 
  33         $locale->text("Please install the below listed modules or ask your " .
 
  34                       "system administrator to.") .
 
  36         $locale->text("You cannot continue before all required modules are " .
 
  37                       "installed.") . qq|</p>
 
  42      <th class="listheading">| . $locale->text("Module name") . qq|</th>
 
  43      <th class="listheading">| . $locale->text("Module home page") . qq|</th>
 
  49   foreach my $module (@missing_modules) {
 
  51      <tr class="listrow${odd}">
 
  52       <td><code>$module->{name}</code></td>
 
  53       <td><a href="$module->{url}">$module->{url}</a></td>
 
  62   <p>| . $locale->text("There are usually three ways to install " .
 
  65         $locale->text("The preferred one is to install packages provided by " .
 
  66                       "your operating system distribution (e.g. Debian or " .
 
  67                       "RPM packages).") . qq|</p>
 
  69   <p>| . $locale->text("The second way is to use Perl's CPAN module and let " .
 
  70                        "it download and install the module for you.") .
 
  72         $locale->text("Here's an example command line:") . qq|</p>
 
  74   <p><code>perl -MCPAN -e "install CGI::Ajax"</code></p>
 
  76   <p>| . $locale->text("The third way is to download the module from the " .
 
  77                        "above mentioned URL and to install the module " .
 
  78                        "manually following the installations instructions " .
 
  79                        "contained in the source archive.") . qq|</p>