Short version:
h2xs -An My::Module
cd My-Module
rm Makefile.PL
cat >Build.PL

use common::sense; use 5.006001; use Module::Build::WithXSpp; my $build = Module::Build::WithXSpp->new( module_name => 'My::Module', license => 'perl', dist_author => q{John Doe <john_does_mail_address>}, dist_version_from => 'lib/My/Module.pm', build_requires => { 'Test::More' => 0, }, extra_typemap_modules => { 'ExtUtils::Typemaps::ObjectMap' => '0', # ... }, # extra_linker_flags => [qw(-lfoo)], # early_includes => [qw(<foo.hpp>)], ); $build->create_build_script;

mkdir src xsp
# cat > src/anythingwhatever.cc
cp /usr/include/foo.hpp xsp/foo.xsp
$EDITOR xsp/foo.xsp

Syntax for .xsp files is still unknown to me, but you'll be hitting shift-5 allot.

After that it's modules as usual, use ./Build.PL to configure and make to build.


In reply to Re: ExtUtils::XSpp usage for a novice by cheako
in thread ExtUtils::XSpp usage for a novice by rovingeyes

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.