File Coverage

blib/lib/OpenServices/SNMP.pm
Criterion Covered Total %
statement 12 15 80.0
branch n/a
condition n/a
subroutine 4 5 80.0
pod 1 1 100.0
total 17 21 80.9


line stmt bran cond sub pod time code
1             package OpenServices::SNMP;
2              
3 1     1   18300 use 5.006;
  1         3  
  1         42  
4 1     1   4 use strict;
  1         1  
  1         42  
5 1     1   5 use warnings FATAL => 'all';
  1         5  
  1         47  
6              
7 1     1   728 use Module::Pluggable require => 1;
  1         8906  
  1         5  
8              
9             =head1 NAME
10              
11             OpenServices::SNMP - Loader for OpenServices SNMP agent extensions
12              
13             =head1 VERSION
14              
15             Version 0.01
16              
17             =cut
18              
19             our $VERSION = '0.01';
20              
21              
22             =head1 SYNOPSIS
23              
24             This module uses Module::Pluggable to load all installed modules from the OpenServices::SNMP::Plugin namespace. It
25             can then be used to initialize them with the current snmpd agent.
26              
27             To have all OpenServices SNMP Extensions loaded add the follwoing line to your snmpd.conf file.
28              
29             perl require OpenServices::SNMP; OpenServices::SNMP->init($agent);
30              
31             =head1 SUBROUTINES/METHODS
32              
33             =head2 init
34              
35             =cut
36              
37             sub init {
38 0     0 1   my ($self, $agent) = @_;
39 0           foreach my $plugin ($self->plugins) {
40 0           $plugin->init($agent);
41             }
42             }
43              
44             =head1 AUTHOR
45              
46             Michael Fladischer, C<< >>
47              
48             =head1 BUGS
49              
50             Please report any bugs or feature requests to C, or through
51             the web interface at L. I will be notified, and then you'll
52             automatically be notified of progress on your bug as I make changes.
53              
54             =head1 SUPPORT
55              
56             You can find documentation for this module with the perldoc command.
57              
58             perldoc OpenServices::SNMP
59              
60              
61             You can also look for information at:
62              
63             =over 4
64              
65             =item * RT: CPAN's request tracker (report bugs here)
66              
67             L
68              
69             =item * AnnoCPAN: Annotated CPAN documentation
70              
71             L
72              
73             =item * CPAN Ratings
74              
75             L
76              
77             =item * Search CPAN
78              
79             L
80              
81             =back
82              
83              
84             =head1 ACKNOWLEDGEMENTS
85              
86              
87             =head1 LICENSE AND COPYRIGHT
88              
89             Copyright 2014 Michael Fladischer.
90              
91             This program is free software; you can redistribute it and/or modify it
92             under the terms of the the Artistic License (2.0). You may obtain a
93             copy of the full license at:
94              
95             L
96              
97             Any use, modification, and distribution of the Standard or Modified
98             Versions is governed by this Artistic License. By using, modifying or
99             distributing the Package, you accept this license. Do not use, modify,
100             or distribute the Package, if you do not accept this license.
101              
102             If your Modified Version has been derived from a Modified Version made
103             by someone other than you, you are nevertheless required to ensure that
104             your Modified Version complies with the requirements of this license.
105              
106             This license does not grant you the right to use any trademark, service
107             mark, tradename, or logo of the Copyright Holder.
108              
109             This license includes the non-exclusive, worldwide, free-of-charge
110             patent license to make, have made, use, offer to sell, sell, import and
111             otherwise transfer the Package with respect to any patent claims
112             licensable by the Copyright Holder that are necessarily infringed by the
113             Package. If you institute patent litigation (including a cross-claim or
114             counterclaim) against any party alleging that the Package constitutes
115             direct or contributory patent infringement, then this Artistic License
116             to you shall terminate on the date that such litigation is filed.
117              
118             Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER
119             AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
120             THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
121             PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY
122             YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR
123             CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR
124             CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE,
125             EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
126              
127              
128             =cut
129              
130             1; # End of OpenServices::SNMP