W3C home > Mailing lists > Public > www-validator-cvs@w3.org > November 2004

perl/modules/W3C/LogValidator/lib/W3C LogValidator.pm,1.13,1.14

From: Olivier Thereaux <ot@dev.w3.org>
Date: Wed, 10 Nov 2004 00:16:49 +0000
To: www-validator-cvs@w3.org
Message-ID: <E1CRgAL-0006a8-6M@lionel-hutz.w3.org>

Update of /sources/public/perl/modules/W3C/LogValidator/lib/W3C
In directory hutz:/tmp/cvs-serv25240/lib/W3C

Modified Files:
	LogValidator.pm 
Log Message:
adding QuietIfNoReport option - preparing for 0.5

Index: LogValidator.pm
===================================================================
RCS file: /sources/public/perl/modules/W3C/LogValidator/lib/W3C/LogValidator.pm,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- LogValidator.pm	29 Sep 2004 03:39:34 -0000	1.13
+++ LogValidator.pm	10 Nov 2004 00:16:47 -0000	1.14
@@ -317,18 +317,28 @@
 		push @modules, $config{LogProcessor}{UseValidationModule};
 	}
 	foreach my $module_to_use (@modules)
-	{
+	{	
+		my $output_tmp = "";
 		eval "use $module_to_use";
 		my $process_module;
 		my %mod_config=$self->config_module($module_to_use);
 		$process_module = $module_to_use->new(\%mod_config);
 	#	$process_module->uris($self->sorted_uris); # not used anymore
 		my %results = $process_module->process_list;
-		
-
+		my $shut_up = 0;
+		if ( exists $config{LogProcessor}{QuietIfNoReport} )
+		{
+			$shut_up = $config{LogProcessor}{QuietIfNoReport};
+		}
 		# We're applying the output module and getting its (potential) output 
-		my $output_tmp = $output_proc->output(\%results);
-		$output = $output.$output_tmp;
+		if ($shut_up and int(@{$results{"trows"}}) == 0)
+		{
+			print "nothing interesting to report - skipping\n" if ($verbose >1)
+		}
+		else {
+			$output_tmp = $output_proc->output(\%results);
+			$output = $output.$output_tmp;
+		}
 		# TODO maybe make this a hash, one output string per output module used
 		# that would allow us to have several output modules at the time... 
 		# is this very useful?
Received on Wednesday, 10 November 2004 00:16:49 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:02:08 UTC