[Nagiosplug-devel] Last call for Perl-plugin-objects

Stanley Hopcroft Stanley.Hopcroft at IPAustralia.Gov.AU
Tue May 25 02:30:03 CEST 2004

Dear Ladies and Gentlemen,

(To the tune of 'One Bourbon, One Scotch, One Beer'

One perfdata, one XMLoutput, and one checker 
One perfdata, one XMLoutput, and one checker 
Hey mister plugin tender come here 
I want a Perl object and I want it now

Some time ago now, Mr Howard Wilkerson, proposed an object basis for the
Perl plugins and then performed a heculanean task in modifying many if
not all of the standard and contrib plugins to use his Classes.

FWIW, I am now almost convinced of the usefulness of this approach 
because it allows maintainers to add useful functions^H^H^H^H methods to   
the base class to equip the plugin with
. instrumentation - perf data capture perhaps
. standard debugging ??
. output options - yes XML output, or more likely Locale/Nat Language   

. unified test support (a common test harness for all plugins).
without cost (or much) to the plugin author and allowing the maintainers
to deal with what amounts to a more useful implementation of
utils.pm, _instead_ of modifying each and every plugin
(perl -i.bak -pe 's/foo/bar' only takes one so far) to support these

As the various advocates of this approach say, it makes life easier for
authors by requiring them to only 

. write a function that checks the service

. set various attributes corresponding to mandatory and not-required
options with their edit checks (personally I can live without edit
checks), help and so on.

without having to do option processing and the rest of a plugin program.

If this is a bad idea, please let me know why.

Yours sincerely.

Stanley Hopcroft

'...No man is an island, entire of itself; every man is a piece of the
continent, a part of the main. If a clod be washed away by the sea,
Europe is the less, as well as if a promontory were, as well as if a
manor of thy friend's or of thine own were. Any man's death diminishes
me, because I am involved in mankind; and therefore never send to know
for whom the bell tolls; it tolls for thee...'

from Meditation 17, J Donne.

More information about the Devel mailing list