Acme::Math::XS - Math is HARD (faster!)
use Acme::Math::XS; print "2 + 2 = ${\add(2, 2)}\n";
This is a tiny example "XS" module. It was written to show how one would write the same thing using Inline::Module, Inline, Inline::C and Inline::CPP.
It has a pure "XS" version and "Alt"(ternate) modules for all the common CPAN module frameworks.
The source code for all these modules is in one git repository, on separate branches: <https://github.com/ingydotnet/acme-math-xs-pm>
Pure XS version, shipped with ExtUtils::MakeMaker.
Inline::Module (using Inline::C) version shipped with plain old ExtUtils::MakeMaker.
Inline::Module version shipped with Dist::Zilla and Dist::Zilla::Plugin::InlineModule.
Inline::Module version shipped with Zilla::Dist.
Inline::Module version shipped with Module::Build and Module::Build::InlineModule.
Inline::Module (using Inline::CPP) version shipped with ExtUtils::MakeMaker.
Ingy döt Net <ingy@cpan.org>
David Oswald <davido@cpan.org>
Copyright 2014. Ingy döt Net.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html
To install Alt::Acme::Math::XS::ModuleBuild, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Alt::Acme::Math::XS::ModuleBuild
CPAN shell
perl -MCPAN -e shell install Alt::Acme::Math::XS::ModuleBuild
For more information on module installation, please visit the detailed CPAN module installation guide.