[collectd] [PATCH] Collectd.pm: Check for ithread support.
Sebastian Harl
sh at tokkee.org
Wed Nov 14 14:20:08 CET 2007
Abort if perl has been compiled without ithread support (i.e.
$Config{'useithreads'} is not defined).
Signed-off-by: Sebastian Harl <sh at tokkee.org>
---
bindings/perl/Collectd.pm | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/bindings/perl/Collectd.pm b/bindings/perl/Collectd.pm
index fd5632a..1d26d20 100644
--- a/bindings/perl/Collectd.pm
+++ b/bindings/perl/Collectd.pm
@@ -22,6 +22,14 @@ package Collectd;
use strict;
use warnings;
+use Config;
+
+BEGIN {
+ if (! $Config{'useithreads'}) {
+ die "Perl does not support ithreads!";
+ }
+}
+
require Exporter;
our @ISA = qw( Exporter );
--
1.5.3.4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20071114/bac560d9/attachment.pgp
More information about the collectd
mailing list