[Nagiosplug-devel] N::P not exporting max_state?
Gavin Carr
gavin at openfusion.com.au
Sun Sep 23 13:20:02 CEST 2007
On Sun, Sep 23, 2007 at 02:02:59AM -0400, Thomas Guyot-Sionnest wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 22/09/07 11:15 PM, Gavin Carr wrote:
> > On Sat, Sep 22, 2007 at 09:01:08PM -0400, Thomas Guyot-Sionnest wrote:
> >>
> >> I think N::P should export max_state, which would avoid having to load
> >> N::P::Functions to use that function. Any objections I commit the
> >> following patch? (Please review as I have very little knowledge of Perl
> >> module programming).
> >
> > No, it shouldn't. N::P is an OO-interface. You should use N::P::Functions
> > directly if you want to get it imported, and doing so is fine.
> >
> > The docs should probably be more explicit about that.
>
> Then what about a warper function only, so we could do $np->max_state?
>
> Most of the functions needed for any type of plugins are provided trough
> N::P already... Correct me if I'm wrong, but I think it would be sense
> to make all of them available trough it...
I'm fine with a wrapper function there.
Cheers,
Gavin
More information about the Devel
mailing list