summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobi Oetiker <tobi@oetiker.ch>2005-02-11 22:00:15 +0100
committerTobi Oetiker <tobi@oetiker.ch>2005-02-11 22:00:15 +0100
commitf0b5385c63bd886c2bb58f0922cce564504ec12f (patch)
treee94701ec52843d8a211ffd636bd530f462fd715a
parentb9ddd9310ea896a5e644f784013a386d9e7212a9 (diff)
downloadsmokeping-f0b5385c63bd886c2bb58f0922cce564504ec12f.tar.gz
smokeping-f0b5385c63bd886c2bb58f0922cce564504ec12f.tar.xz
handle incomplete documentation propperly by entering notes about the missing bits into the generated documentation.
-rw-r--r--lib/Smokeping/Examples.pm12
1 files 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;