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