validator/httpd/cgi-bin check,1.494,1.495

Update of /sources/public/validator/httpd/cgi-bin
In directory hutz:/tmp/cvs-serv25042/httpd/cgi-bin

Modified Files:
	check 
Log Message:
Load HTTP::Negotiate and XML::LibXML only when needed.

Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.494
retrieving revision 1.495
diff -u -d -r1.494 -r1.495
--- check	4 Apr 2007 04:04:36 -0000	1.494
+++ check	4 Apr 2007 09:35:56 -0000	1.495
@@ -286,11 +286,11 @@
 
 if (($lang eq '') or (!$lang_ok)) { # use HTTP-based negotiation
     $lang = '';
-    use HTTP::Negotiate qw(choose);
     foreach my $lang_available ( split(" ", $CFG->{Languages}) ) {
             push @localizations, [$lang_available, 1.000, 'text/html',   undef,   'utf-8',  $lang_available , undef]
     }   
-    $lang  = choose(\@localizations);
+    require HTTP::Negotiate;
+    $lang = HTTP::Negotiate::choose(\@localizations);
 }
 
 
@@ -617,7 +617,7 @@
 # but it's badly linked to opensp at the moment
 if (&is_xml($File)) {
   
-       use XML::LibXML;
+       require XML::LibXML;
        my $xmlparser = XML::LibXML->new();
        $xmlparser->line_numbers(1);
        eval {

Received on Wednesday, 4 April 2007 09:36:13 UTC