summaryrefslogtreecommitdiffstats
path: root/perl-install/c.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/c.pm')
-rw-r--r--perl-install/c.pm37
1 files changed, 33 insertions, 4 deletions
diff --git a/perl-install/c.pm b/perl-install/c.pm
index ee44fa426..8312c0d79 100644
--- a/perl-install/c.pm
+++ b/perl-install/c.pm
@@ -1,4 +1,4 @@
-package c; # $Id$
+package c;
use vars qw($AUTOLOAD);
@@ -7,13 +7,42 @@ use MDK::Common;
sub AUTOLOAD() {
$AUTOLOAD =~ /::(.*)/ or return;
- my @l = eval { &{$c::stuff::{$1}} };
+ my $fct = $1;
+ my @l = eval { &{$c::stuff::{$fct}} };
if (my $err = $@) {
$err =~ /Undefined subroutine &main::/ ?
- die("can't find function $AUTOLOAD\n" . backtrace()) :
- die($err);
+ die("cannot find function $AUTOLOAD\n" . backtrace()) :
+ die("$fct: " . $err);
}
wantarray() ? @l : $l[0];
}
1;
+
+
+=head1 SYNOPSYS
+
+The C module is glue code between the Perl & the C worlds that enable drakx to:
+
+=over
+
+=item *
+
+access various C libraries, mainly libldetect
+
+=item *
+
+bind some C functions (eg: syslog(), ...)
+
+=item *
+
+implement in C some helper functions
+
+=back
+
+It is autogenerated from perl-install/c/stuff.xs.pl.
+One needs to run "perl Makefile.PL"
+
+It's used quite a lot by L<detect_devices>.
+
+=cut