Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remake master as a top level pointer branch.
- Loading branch information
0 parents
commit f9fef91
Showing
6 changed files
with
151 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
This repository has several branches, that support several different (but | ||
similar) CPAN distributions: | ||
|
||
- `xs` | ||
|
||
[Acme::Math::XS] is a plain old XS version. | ||
|
||
|
||
- `eumm` | ||
|
||
[Alt::Acme::Math::XS::EUMM] is a version written using [Inline::Module] and | ||
[Inline::C] that uses the plain old [ExtUtils::MakeMaker] module framework. | ||
|
||
- `dzil` | ||
|
||
[Alt::Acme::Math::XS::DistZilla] is a version that uses the [Dist::Zilla] | ||
module framework. | ||
|
||
- `m-b` | ||
|
||
[Alt::Acme::Math::XS::ModuleBuild] is a version that uses the [Module::Build] | ||
module framework. | ||
|
||
- `m-i` | ||
|
||
[Alt::Acme::Math::XS::ModuleInstall] is a version that uses the | ||
[Module::Install] module framework. | ||
|
||
- `zild` | ||
|
||
[Alt::Acme::Math::XS::ZillaDist] is a version that uses the [ZillaDist] | ||
module framework. | ||
|
||
- `cpp` | ||
|
||
[Alt::Acme::Math::XS::CPP] is a version written using [Inline::Module] and | ||
[Inline::CPP] (C++) (and [ExtUtils::MakeMaker]). | ||
|
||
The `master` branch just has the code, doc and tests that should be shared by | ||
every other branch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
default: | ||
|
||
doc: ReadMe.pod | ||
|
||
ReadMe.pod: doc/Acme/Math/XS.swim | ||
swim --pod-cpan $< > $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
=pod | ||
|
||
=for comment | ||
DO NOT EDIT. This Pod was generated by Swim v0.1.31. | ||
See http://github.com/ingydotnet/swim-pm#readme | ||
|
||
=encoding utf8 | ||
|
||
=head1 NAME | ||
|
||
Acme::Math::XS - Math is HARD (faster) | ||
|
||
=for html | ||
<a href="https://travis-ci.org/ingydotnet/acme-math-xs-pm"><img src="https://travis-ci.org/ingydotnet/acme-math-xs-pm.png" alt="acme-math-xs-pm"></a> | ||
<a href="https://coveralls.io/r/ingydotnet/acme-math-xs-pm?branch=master"><img src="https://coveralls.io/repos/ingydotnet/acme-math-xs-pm/badge.png" alt="acme-math-xs-pm"></a> | ||
|
||
=head1 SYNOPSIS | ||
|
||
use Acme::Math::XS; | ||
|
||
print "2 + 2 = ${\add(2, 2)}\n"; | ||
|
||
=head1 DESCRIPTION | ||
|
||
This is the smallest possible XS module written with Inline::C. | ||
|
||
=head1 AUTHORS | ||
|
||
=over | ||
|
||
=item * Ingy döt Net <ingy@cpan.org> | ||
|
||
=item * David Oswald <davido@cpan.org> | ||
|
||
=back | ||
|
||
=head1 COPYRIGHT | ||
|
||
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 L<http://www.perl.com/perl/misc/Artistic.html> | ||
|
||
=cut |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Acme::Math::XS | ||
============== | ||
|
||
Math is HARD (faster) | ||
|
||
<badge travis coveralls ingydotnet/acme-math-xs-pm> | ||
|
||
= Synopsis | ||
|
||
use Acme::Math::XS; | ||
|
||
print "2 + 2 = ${\add(2, 2)}\n"; | ||
|
||
= Description | ||
|
||
This is the smallest possible XS module written with Inline::C. | ||
|
||
= Authors | ||
|
||
* Ingy döt Net <ingy@cpan.org> | ||
* David Oswald <davido@cpan.org> | ||
|
||
= Copyright | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
use strict; use warnings; | ||
package Acme::Math::XS; | ||
our $VERSION = '0.0.6'; | ||
|
||
use Exporter 'import'; | ||
our @EXPORT = qw( | ||
add | ||
subtract | ||
); | ||
|
||
use Acme::Math::XS::Inline C => <<'...'; | ||
long add(long a, long b) { | ||
return a + b; | ||
} | ||
long subtract(long a, long b) { | ||
return a - b; | ||
} | ||
... | ||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
use Test::More; | ||
|
||
use Acme::Math::XS; | ||
|
||
is add(2, 2), 4, 'Addition works'; | ||
is subtract(3, 2), 1, 'Subtraction works'; | ||
|
||
done_testing; |