X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=contrib%2Fcollection3%2Flib%2FCollectd%2FGraph%2FTypeLoader.pm;h=5a0b522b424270bd9f819023700a048762eece5e;hb=3427c2e266c04d67848bda913caa730a395c7295;hp=697155478e341a53b760e0e19b4599f2b21aeb60;hpb=79c87aeda9172e219a842e393c6499c8bf37662a;p=collectd.git diff --git a/contrib/collection3/lib/Collectd/Graph/TypeLoader.pm b/contrib/collection3/lib/Collectd/Graph/TypeLoader.pm index 69715547..5a0b522b 100644 --- a/contrib/collection3/lib/Collectd/Graph/TypeLoader.pm +++ b/contrib/collection3/lib/Collectd/Graph/TypeLoader.pm @@ -59,8 +59,9 @@ sub _create_object my $module = shift; my $obj; - local $SIG{__WARN__} = sub { print STDERR "WARNING: " . join (', ', @_) . "\n"; }; - local $SIG{__DIE__} = sub { print STDERR "FATAL: " . join (', ', @_) . "\n"; }; + # Surpress warnings and error messages caused by the eval. + local $SIG{__WARN__} = sub { return (1); print STDERR "WARNING: " . join (', ', @_) . "\n"; }; + local $SIG{__DIE__} = sub { return (1); print STDERR "FATAL: " . join (', ', @_) . "\n"; }; eval <