X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=contrib%2Fcollection3%2Flib%2FCollectd%2FGraph%2FTypeLoader.pm;h=3d6f61e366cd03a70d768478eb8710843a0e0f92;hb=6299d39b903cb87a3db5b6d2148a2d717754a30a;hp=697155478e341a53b760e0e19b4599f2b21aeb60;hpb=9d15d1058b93acb7be041934acfe76548539041a;p=collectd.git diff --git a/contrib/collection3/lib/Collectd/Graph/TypeLoader.pm b/contrib/collection3/lib/Collectd/Graph/TypeLoader.pm index 69715547..3d6f61e3 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"; }; + # Suppress 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 <