NAME
Clownfish::CBlock - A block of embedded C code.
DESCRIPTION
CBlock exists to support embedding literal C code within Clownfish header files:
class Crustacean::Lobster {
/* ... */
/** Give a lobstery greeting.
*/
inert inline void
say_hello(Lobster *self);
}
__C__
#include <stdio.h>
static CHY_INLINE void
crust_Lobster_say_hello(crust_Lobster *self)
{
printf("Prepare to die, human scum.\n");
}
__END_C__
METHODS
new
my $c_block = Clownfish::CBlock->new(
contents => $text,
);
contents - Raw C code.
get_contents
Accessor.
COPYRIGHT AND LICENSE
Copyright 2009-2011 Marvin Humphrey
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.