1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 22:25:23 +00:00

Use eval around hard-to-find perl modules

This commit is contained in:
Stig Sandbeck Mathisen 2014-10-05 01:28:29 +02:00
parent a9d8c62541
commit 67470547f0
4 changed files with 14 additions and 6 deletions

View file

@ -71,7 +71,8 @@
#%# family=auto #%# family=auto
#%# capabilities=autoconf #%# capabilities=autoconf
use DBI; use DBI;
use MythTV; eval 'use MythTV; 1;'
or die 'Please install MythTV';
use strict; use strict;
use warnings; use warnings;
use Munin::Plugin; use Munin::Plugin;

View file

@ -73,7 +73,8 @@ else
sub value # get value for variables sub value # get value for variables
{ {
my %h_ramvalues; my %h_ramvalues;
use Sun::Solaris::Kstat; eval 'use Sun::Solaris::Kstat; 1;'
or die 'Please install Sun::Solaros::Kstat';
my $Kstat = Sun::Solaris::Kstat->new(); my $Kstat = Sun::Solaris::Kstat->new();
# --- Fetch Hardware info --- # --- Fetch Hardware info ---

View file

@ -71,7 +71,8 @@ else
sub value sub value
{ {
my %h_swapvalue; my %h_swapvalue;
use Sun::Solaris::Kstat; eval 'use Sun::Solaris::Kstat; 1;'
or die 'Please install Sun::Solaris::Kstat';
my $Kstat = Sun::Solaris::Kstat->new(); my $Kstat = Sun::Solaris::Kstat->new();
# --- Fetch Hardware info --- # --- Fetch Hardware info ---

View file

@ -115,9 +115,14 @@ use strict;
use sort 'stable'; # guarantee stability use sort 'stable'; # guarantee stability
no warnings; # don't want warnings in output no warnings; # don't want warnings in output
use VMware::VIRuntime; # need to install VIM SDK (vSphere CLI/SDK 4.1 or newer) # need to install VIM SDK (vSphere CLI/SDK 4.1 or newer)
use VMware::VILib; eval 'use VMware::VIRuntime; 1;'
use VMware::VIExt; or die 'Please install vSphere SDK for VMware::* modules';
eval 'use VMware::VILib; 1;'
or die 'Please install vSphere SDK for VMware::* modules';
eval 'use VMware::VIExt; 1;'
or die 'Please install vsphere SDK for VMware::* modules';
use Data::Dumper; use Data::Dumper;
use DateTime::Format::ISO8601; # may need to install "libdatetime-format-iso8601-perl" on Debian-based systems use DateTime::Format::ISO8601; # may need to install "libdatetime-format-iso8601-perl" on Debian-based systems
use List::Util qw(sum max); use List::Util qw(sum max);