validator/httpd/cgi-bin check,1.729,1.730

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

Modified Files:
	check 
Log Message:
Fix perlcritic "Nested named subroutine" errors.

Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.729
retrieving revision 1.730
diff -u -d -r1.729 -r1.730
--- check	24 Nov 2009 19:03:12 -0000	1.729
+++ check	24 Nov 2009 19:07:44 -0000	1.730
@@ -141,30 +141,19 @@
     }
 
     #
-    # Check a filesystem path for existance and "readability".
-    sub pathcheck (@)
+    # Check paths in config
+    # @@FIXME: This does not do a very good job error-message-wise if
+    # a path is missing...
     {
-        my %paths = map  { $_ => [-d $_, -r _] } @_;
-        my @_d    = grep { not $paths{$_}->[0] } keys %paths;
-        my @_r    = grep { not $paths{$_}->[1] } keys %paths;
-        return TRUE if (scalar(@_d) + scalar(@_r) == 0);
+        my %paths = map { $_ => [-d $_, -r _] } $CFG->{Paths}->{Base},
+            $CFG->{Paths}->{Templates}, $CFG->{Paths}->{SGML}->{Library};
+        my @_d = grep { not $paths{$_}->[0] } keys %paths;
+        my @_r = grep { not $paths{$_}->[1] } keys %paths;
         die "Does not exist or is not a directory: @_d\n"       if scalar(@_d);
         die "Directory not readable (permission denied): @_r\n" if scalar(@_r);
     }
 
     #
-    # Check paths in config...
-    # @@FIXME: This does not do a very good job error-message-wise if a path is
-    # @@FIXME: missing...;
-    {
-        my @dirs = ();
-        push @dirs, $CFG->{Paths}->{Base};
-        push @dirs, $CFG->{Paths}->{Templates};
-        push @dirs, $CFG->{Paths}->{SGML}->{Library};
-        &pathcheck(@dirs);
-    }
-
-    #
     # Split allowed protocols into a list.
     if (my $allowed = delete($CFG->{Protocols}->{Allow})) {
         $CFG->{Protocols}->{Allow} = [split(/\s*,\s*/, $allowed)];

Received on Tuesday, 24 November 2009 19:07:55 UTC