summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorStanley Hopcroft <stanleyhopcroft@users.sourceforge.net>2004-11-23 00:06:49 (GMT)
committerStanley Hopcroft <stanleyhopcroft@users.sourceforge.net>2004-11-23 00:06:49 (GMT)
commitcaf9ce72ff6e708dadd85ee1677439f41694f287 (patch)
treea552cca8d12bd4eff50f2a687f8b244d45654223 /doc
parentcbb59fb602afa12799da41dd94bc5f4cbdc7ed34 (diff)
downloadmonitoring-plugins-caf9ce72ff6e708dadd85ee1677439f41694f287.tar.gz
trivial changes to Perl plugin section.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@924 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'doc')
-rw-r--r--doc/developer-guidelines.sgml19
1 files changed, 12 insertions, 7 deletions
diff --git a/doc/developer-guidelines.sgml b/doc/developer-guidelines.sgml
index 064bd92..9ec3f94 100644
--- a/doc/developer-guidelines.sgml
+++ b/doc/developer-guidelines.sgml
@@ -407,12 +407,12 @@
407 <orderedlist> 407 <orderedlist>
408 408
409 <listitem><para> Do not use BEGIN and END blocks since they will be called 409 <listitem><para> Do not use BEGIN and END blocks since they will be called
410 the first time and when Nagios shuts down with Embedded Perl (ePN). In 410 only once (when Nagios starts and shuts down) with Embedded Perl (ePN). In
411 particular, do not use BEGIN blocks to initialize variables.</para> 411 particular, do not use BEGIN blocks to initialize variables.</para>
412 </listitem> 412 </listitem>
413 413
414 <listitem><para>To use utils.pm, you need to provide a full path to the 414 <listitem><para>To use utils.pm, you need to provide a full path to the
415 module in order for it to work with ePN.</para> 415 module in order for it to work.</para>
416 416
417 <literallayout> 417 <literallayout>
418 e.g. 418 e.g.
@@ -429,16 +429,18 @@
429 variable. </para> 429 variable. </para>
430 430
431 431
432 <para>Explicitly initialize each varialable in use. Otherwise with 432 <para>Explicitly initialize each variable in use. Otherwise with
433 caching enabled, the plugin will not be recompilied each time, and 433 caching enabled, the plugin will not be recompiled each time, and
434 therefore Perl will not reinitialize all the variables. All old 434 therefore Perl will not reinitialize all the variables. All old
435 variable values will still be in effect.</para> 435 variable values will still be in effect.</para>
436 </listitem> 436 </listitem>
437 437
438 <listitem><para>Do not use &gt; DATA &lt; (these simply do not compile under ePN).</para> 438 <listitem><para>Do not use &gt;DATA&lt; handles (these simply do not compile under ePN).</para>
439 </listitem> 439 </listitem>
440 440
441 <listitem><para>Do not use named subroutines</para> 441 <listitem><para>Do not use global variables in named subroutines. This is bad practise anyway, but with ePN the
442 compiler will report an error "&lt;global_var&gt; will not stay shared ..". Values used by
443 subroutines should be passed in the argument list.</para>
442 </listitem> 444 </listitem>
443 445
444 <listitem><para>If writing to a file (perhaps recording 446 <listitem><para>If writing to a file (perhaps recording
@@ -449,7 +451,10 @@
449 451
450 <listitem><para>As in <xref linkend="runtime"> all plugins need 452 <listitem><para>As in <xref linkend="runtime"> all plugins need
451 to monitor their runtime, specially if they are using network 453 to monitor their runtime, specially if they are using network
452 resources. Use of the <emphasis>alarm</emphasis> is recommended. 454 resources. Use of the <emphasis>alarm</emphasis> is recommended
455 noting that some Perl modules (eg LWP) manage timers, so that an alarm
456 set by a plugin using such a module is overwritten by the module.
457 (workarounds are cunning (TM) or using the module timer)
453 Plugins may import a default time out ($TIMEOUT) from utils.pm. 458 Plugins may import a default time out ($TIMEOUT) from utils.pm.
454 </para> 459 </para>
455 </listitem> 460 </listitem>