use strict; use warnings; use feature 'say'; use Inline C => << 'END'; int add (int x, int y) { return x + y; } END say add( 5, 7 ); #### use Inline::MakeMaker; WriteMakefile( NAME => 'myC', VERSION_FROM => 'myC.pm' ); #### package myC; our $VERSION = 1; use Inline C => << 'END', VERSION => 1, NAME => 'myC'; int add (int x, int y) { return x + y; } END 1; #### package myC; our $VERSION = 1; use Inline C => 'END', VERSION => 1, NAME => 'myC'; 1; #### use strict; use warnings; use feature 'say'; use blib; use myC; say myC::add( 5, 7 );