blob: 8312c0d7966b6c58b2636e8f23670386a39c75d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
package c;
use vars qw($AUTOLOAD);
use c::stuff;
use MDK::Common;
sub AUTOLOAD() {
$AUTOLOAD =~ /::(.*)/ or return;
my $fct = $1;
my @l = eval { &{$c::stuff::{$fct}} };
if (my $err = $@) {
$err =~ /Undefined subroutine &main::/ ?
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
|