summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;