File tree Expand file tree Collapse file tree 4 files changed +11
-1
lines changed Expand file tree Collapse file tree 4 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ use DirHandle;
1212our %Config_Override ;
1313our %XS_ext2src = qw(
1414 xs c
15+ xspp cpp
1516) ;
1617my $xspat = join ' |' , keys %XS_ext2src ;
1718our $XS_extRE = qr /\. ($xspat )\z / ;
Original file line number Diff line number Diff line change @@ -520,7 +520,13 @@ This tip has been brought to you by Nick Ing-Simmons and Stas Bekman.
520520An alternative way to achieve this can be seen in L<Gtk2::CodeGen>
521521and L<Glib::CodeGen>.
522522
523- =back
523+ =head3 How can I build my XS files as C++
524+
525+ If you want to write XSUBs in C++, put them in a file called (for class
526+ Foo::Bar) F<lib/Foo/Bar.xspp>, next to F<lib/Foo/Bar.pm>. In your
527+ F<Makefile.PL>, give C<XSMULTI> as 1. You will make your distribution
528+ much more portable, with much less effort for yourself, if you use
529+ L<ExtUtils::CppGuess> for C++ compiler configuration information.
524530
525531=head1 DESIGN
526532
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ use Test::More;
1414plan skip_all => " ExtUtils::CBuilder not installed or no C++ compiler"
1515 unless have_cplusplus();
1616plan skip_all => ' Dynaloading not enabled' if $Config {usedl } ne ' define' ;
17+ plan skip_all => ' No ExtUtils::CppGuess'
18+ unless eval { require ExtUtils::CppGuess };
1719my @tests = list_cpp();
1820plan skip_all => " No tests" unless @tests ;
1921plan tests => 6 * @tests ;
Original file line number Diff line number Diff line change @@ -313,6 +313,7 @@ sub list_dynamic {
313313
314314sub list_cpp {
315315 (
316+ [ ' cppbasic' , ' ' , ' ' ],
316317 );
317318}
318319
You can’t perform that action at this time.
0 commit comments