Code

Collectd.pm: Check for ithread support.
authorSebastian Harl <sh@tokkee.org>
Wed, 14 Nov 2007 13:20:08 +0000 (14:20 +0100)
committerFlorian Forster <octo@huhu.verplant.org>
Wed, 14 Nov 2007 14:32:21 +0000 (15:32 +0100)
Abort if perl has been compiled without ithread support (i.e.
$Config{'useithreads'} is not defined).

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
bindings/perl/Collectd.pm

index fd5632a47d53a8d26509ab6bcaa1cf1eeb9ee06d..1d26d2072a6491cdeafc76f13a12c5c934536850 100644 (file)
@@ -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 );