Affix
view release on metacpan or search on metacpan
# Bind 'cos' from the math library
affix libm(), 'cos', [Double] => Double;
```
### `get_last_error_message()`
If `load_library`, `find_symbol`, or a signature parsing step fails, this function returns a string describing the
most recent internal or operating system error (via `dlerror` or `FormatMessage`).
```perl
my $lib = load_library('does_not_exist');
if (!$lib) {
die "Failed to load library: " . get_last_error_message();
}
```
# INTROSPECTION
When working with C APIs, you often need to know exactly how much memory a structure consumes or where a specific field
is located within a block of memory. Affix provides compiler-grade type introspection.
lib/Affix.pod view on Meta::CPAN
affix libc(), 'puts', [String] => Int;
# Bind 'cos' from the math library
affix libm(), 'cos', [Double] => Double;
=head3 C<get_last_error_message()>
If C<load_library>, C<find_symbol>, or a signature parsing step fails, this function returns a string describing the
most recent internal or operating system error (via C<dlerror> or C<FormatMessage>).
my $lib = load_library('does_not_exist');
if (!$lib) {
die "Failed to load library: " . get_last_error_message();
}
=head1 INTROSPECTION
When working with C APIs, you often need to know exactly how much memory a structure consumes or where a specific field
is located within a block of memory. Affix provides compiler-grade type introspection.
=head3 C<sizeof( $type )>
( run in 1.041 second using v1.01-cache-2.11-cpan-bbe5e583499 )