Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0DE0F110A8 for ; Mon, 15 Sep 2014 15:33:50 +0000 (UTC) Received: (qmail 84597 invoked by uid 500); 15 Sep 2014 15:33:49 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 84524 invoked by uid 500); 15 Sep 2014 15:33:49 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 84515 invoked by uid 99); 15 Sep 2014 15:33:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Sep 2014 15:33:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Sep 2014 15:33:21 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 60F1D2388A02; Mon, 15 Sep 2014 15:33:20 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1625072 - /httpd/docs-build/trunk/irc_factoids.pl Date: Mon, 15 Sep 2014 15:33:20 -0000 To: cvs@httpd.apache.org From: rbowen@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140915153320.60F1D2388A02@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rbowen Date: Mon Sep 15 15:33:19 2014 New Revision: 1625072 URL: http://svn.apache.org/r1625072 Log: Handle it correctly when a module has only one directive. Modified: httpd/docs-build/trunk/irc_factoids.pl Modified: httpd/docs-build/trunk/irc_factoids.pl URL: http://svn.apache.org/viewvc/httpd/docs-build/trunk/irc_factoids.pl?rev=1625072&r1=1625071&r2=1625072&view=diff ============================================================================== --- httpd/docs-build/trunk/irc_factoids.pl (original) +++ httpd/docs-build/trunk/irc_factoids.pl Mon Sep 15 15:33:19 2014 @@ -21,12 +21,22 @@ my $xml = $xs->XMLin( $file ); print "forget $opt_m\n" if $opt_f; print "$opt_m is " . 'http://httpd.apache.org/docs/' . ( $opt_v ? $opt_v : 'current' ) . '/mod/' . $opt_m . '.html' . "\n\n"; -my @directives; -foreach my $directive ( sort( keys %{ $xml->{directivesynopsis} } ) ) { +my $directives = $xml->{directivesynopsis}; - my $d = $xml->{directivesynopsis}->{$directive}; +my %directives; +# Was there more than one? +if ( $directives->{name} ) { # There was only one + %directives = ( $directives->{name} => $directives ); +} else { # More than one + %directives = %{ $xml->{directivesynopsis} }; +} + +foreach my $directive ( sort( keys %directives ) ) { + + my $d = $directives{$directive}; - my $desc = $d->{description}; $desc =~ s/[\r\n]/ /gs; + my $desc = $d->{description}; + $desc =~ s/[\r\n]/ /gs; my $name = $directive . ( $opt_v ? " $opt_v" : '' ); print "forget $name\n" if $opt_f;