From f0b5385c63bd886c2bb58f0922cce564504ec12f Mon Sep 17 00:00:00 2001 From: Tobi Oetiker Date: Fri, 11 Feb 2005 21:00:15 +0000 Subject: handle incomplete documentation propperly by entering notes about the missing bits into the generated documentation. --- lib/Smokeping/Examples.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Smokeping/Examples.pm b/lib/Smokeping/Examples.pm index 5adbfff..623c632 100644 --- a/lib/Smokeping/Examples.pm +++ b/lib/Smokeping/Examples.pm @@ -190,15 +190,15 @@ sub genpod { my $text = ""; $text .= "=over\n\n"; $text .= "=item Probe configuration\n\n"; - $text .= " *** Probes ***\n"; + $text .= "*** Probes ***\n"; $text .= join("\n", map { " $_" } split(/\n/, $h->{probes})); $text .= "\n\n=item Probe explanation\n\n"; - $text .= $h->{probedoc}; + $text .= $h->{probedoc} || "No probedoc found !"; $text .= "\n\n=item Target configuration\n\n"; - $text .= " *** Targets ***\n"; + $text .= "*** Targets ***\n"; $text .= join("\n", map { " $_" } split(/\n/, $h->{targets})); $text .= "\n\n=item Target explanation\n\n"; - $text .= $h->{targetdoc}; + $text .= $h->{targetdoc} || "No targetdoc found !"; $text .= "\n\n=back\n\n"; return $text; } @@ -220,11 +220,11 @@ DOC print F $template->{common}; print F "# (The actual example starts here.)\n"; print F "\n *** Probes ***\n\n"; - print F join("\n", map { "# $_" } split(/\n/, $h->{probedoc})); + print F join("\n", map { "# $_" } split(/\n/, $h->{probedoc} || 'No probedoc found!')); print F "\n\n"; print F $h->{probes}; print F "\n *** Targets ***\n\n"; - print F join("\n", map { "# $_" } split(/\n/, $h->{targetdoc})); + print F join("\n", map { "# $_" } split(/\n/, $h->{targetdoc} || 'No targetdoc found')); print F "\n\n"; print F $h->{targets}; close F; -- cgit v1.2.3-24-g4f1b