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