summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 755022b)
raw | patch | inline | side by side (parent: 755022b)
author | Florian Forster <octo@huhu.verplant.org> | |
Mon, 14 Sep 2009 13:41:07 +0000 (15:41 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Mon, 14 Sep 2009 13:41:07 +0000 (15:41 +0200) |
contrib/collection3/lib/Collectd/Graph/TypeLoader.pm | patch | blob | history |
diff --git a/contrib/collection3/lib/Collectd/Graph/TypeLoader.pm b/contrib/collection3/lib/Collectd/Graph/TypeLoader.pm
index 697155478e341a53b760e0e19b4599f2b21aeb60..9078110b3bb3216b9706e9d1cb5246f0177f34ec 100644 (file)
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 <<PERL;
require $module;