PERL   34

test pl

Guest on 13th August 2022 08:06:20 AM

  1. # Copyright . Parallels IP Holdings GmbH. All Rights Reserved.
  2. use ExtUtils::Installed;
  3. my ($inst) = ExtUtils::Installed->new();
  4. my (@modules) = $inst->modules();
  5.  
  6. print <<HTML;
  7. Content-type: text/html
  8.  
  9. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  10. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  11. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  12. <head>
  13. <title></title>
  14. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  15. <link rel="stylesheet" type="text/css" href="../../css/style.css" />
  16. </head>
  17. <body class="test-data">
  18. <table cellspacing="0" cellpadding="0" border="0">
  19. <tr class="subhead" align="Left"><th>Name</th><th>Value</th></tr>
  20. HTML
  21.  
  22. for my $i ($[ .. $#modules) {
  23.    my $version = $inst->version($modules[$i]) || "???";
  24.    my $class = ($i % 2) ? "alt" : "normal";
  25.    print <<HTML;
  26. <tr class="$class"><td valign="top">$modules[$i]</td><td>$version</td></tr>
  27. HTML
  28. }
  29.  
  30. print <<HTML;
  31. </table>
  32. </body>
  33. </html>
  34. HTML

Raw Paste


Login or Register to edit or fork this paste. It's free.