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 @@ -11,6 +11,7 @@ use File::Basename qw(basename dirname);
1111our %Config_Override ;
1212our %XS_ext2src = qw(
1313 xs c
14+ xscc cpp
1415) ;
1516my $xspat = join ' |' , keys %XS_ext2src ;
1617our $XS_extRE = qr /\. ($xspat )\z / ;
Original file line number Diff line number Diff line change @@ -521,7 +521,13 @@ This tip has been brought to you by Nick Ing-Simmons and Stas Bekman.
521521An alternative way to achieve this can be seen in L<Gtk2::CodeGen>
522522and L<Glib::CodeGen>.
523523
524- =back
524+ =head3 How can I build my XS files as C++
525+
526+ If you want to write XSUBs in C++, put them in a file called (for class
527+ Foo::Bar) F<lib/Foo/Bar.xscc>, next to F<lib/Foo/Bar.pm>. In your
528+ F<Makefile.PL>, give C<XSMULTI> as 1. You will make your distribution
529+ much more portable, with much less effort for yourself, if you use
530+ L<ExtUtils::CppGuess> for C++ compiler configuration information.
525531
526532=head1 DESIGN
527533
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 @@ -414,6 +414,7 @@ sub list_dynamic {
414414
415415sub list_cpp {
416416 (
417+ [ ' cppbasic' , ' ' , ' ' ],
417418 );
418419}
419420
You can’t perform that action at this time.
0 commit comments