Dist-Maker

 view release on metacpan or  search on metacpan

lib/Dist/Maker/Template/XS.pm  view on Meta::CPAN

package Dist::Maker::Template::XS;
use utf8;
use Mouse;
use MouseX::StrictConstructor;

extends 'Dist::Maker::Template::Default';
with    'Dist::Maker::Template';

sub distribution {
    return <<'DIST';
: cascade Default;

:# @@ Makefile.PL

: after author_requires -> {
        Module::Install::XSUtil 0.41
: }

: after mpl_command {
use_xshelper;
cc_warnings;
cc_src_paths 'src';
: }

:# @@ author/requires.cpanm
: after author_requires_cpanm_configure_requires -> {
Module::Install::XSUtil
: }

: after author_requires_cpanm_test_requires -> {
Test::LeakTrace
Test::Valgrind
: }

:# @@ .gitignore
: after gitignore {
src/*.c
: }
:# @@ MANIFEST.SKIP
: after manifest_skip {
src/.*\.c$
: }
:# @@ lib/$dist.module_path
: after module_code -> {
use XSLoader;
XSLoader::load(__PACKAGE__, $VERSION);
: }

: override basic_t_tests -> {
is <: $dist.module :>::hello(), 'Hello, world!';
: }

: after extra_files -> {
@@ src/<: $dist :>.xs
#define NEED_newSVpvn_flags
#include "xshelper.h"

#define MY_CXT_KEY "<: $dist.module :>::_guts" XS_VERSION
typedef struct {
} my_cxt_t;
START_MY_CXT

static void
my_cxt_initialize(pTHX_ pMY_CXT) {
}

MODULE = <: $dist.module :>    PACKAGE = <: $dist.module :>

PROTOTYPES: DISABLE

BOOT:



( run in 0.883 second using v1.01-cache-2.11-cpan-39bf76dae61 )