Sys::Headers - Perl interface to system headers.


 # Update your header repository
 use Sys::Headers;
   includedirs => [ qw[
                  ] ],
   headers     => [ qw[
                  ] ],

 # Use headers in your program
 use Sys::Headers qw[paths sys/fcntl];
 my $null = _PATH_DEVNULL;
 my $tmp  = _PATH_TMP;

 open( FILE, "$tmp/file" ) || die $!;
 open( NULL, $null,      ) || die $!;
 flock FILE, O_SHLOCK;
 flock NULL, O_EXLOCK;
 print NULL $_ while <FILE>;
 close NULL;
 close FILE;


This is alpha code.

This is alpha code.

This is alpha code.

This module will use h2ph to convert your systems header files into Perl header files. It should be stated that h2ph isn't very good at this, it has some bugs. However, if you can handle a few warnings every now and again, and you need access to information contained in the header files, use this module.

First you need to build a repository of Perl header files. This requires having write access to the place where Sys::Headers is installed. This limitation will most likley change.

Once you've done that, you can use these headers at compile time by listing the ones you want in similar fashion to #include from C.


It will export constants based on which header files you choose to use.


Casey West, <<gt>


Copyright (c) 2002 Casey West. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.