Author image Marvin Humphrey
and 1 contributors

NAME

Boilerplater::CBlock - A block of embedded C code.

DESCRIPTION

CBlock exists to support embedding literal C code within .bp files:

    parcel Boil;

    class Foo {
        /** Print a greeting. 
         */
        public inline void
        Say_Hello(Foo *self);
    }

    __C__
    #include <stdio.h>
    static CHY_INLINE void
    boil_Foo_say_hello(boil_Foo *self)
    {
        printf("Greetings, Earthlings.\n");
    }
    __END_C__

METHODS

new

    my $c_block = Boilerplater::CBlock->new(
        contents => $text,
    );
  • contents - Raw C code.

get_contents

Accessor.

COPYRIGHT AND LICENSE

Copyright 2009 Marvin Humphrey

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.