Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Starting work on dzil version of Acme::Math::XS
- Loading branch information
0 parents
commit 34381e4
Showing
8 changed files
with
190 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,46 @@ | ||
# DO NOT EDIT | ||
# | ||
# This .travis.yml file generated by Zilla::Dist. To upgrade it, run: | ||
# | ||
# > make update | ||
# | ||
|
||
language: perl | ||
|
||
perl: | ||
- '5.20' | ||
- '5.18' | ||
- '5.16' | ||
- '5.14' | ||
- '5.12' | ||
- '5.10' | ||
- '5.8' | ||
|
||
install: | ||
- cpanm --quiet --notest | ||
Devel::Cover::Report::Coveralls | ||
Inline | ||
Inline::C | ||
|
||
script: | ||
- test -e test && | ||
PERL5OPT=-MDevel::Cover=-coverage,statement,branch,condition,path,subroutine | ||
prove -lv test/ | ||
|| true | ||
- test -e test && cover || true | ||
|
||
after_success: | ||
- cover -report coveralls | ||
|
||
notifications: | ||
irc: | ||
channels: | ||
- irc.perl.org#inline | ||
on_success: change | ||
on_failure: always | ||
skip_join: true | ||
|
||
# Hack to not run on tag pushes: | ||
branches: | ||
except: | ||
- /^v?[0-9]+\.[0-9]+/ |
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,5 @@ | ||
--- | ||
version: 0.0.1 | ||
date: Fri Nov 14 20:47:54 UTC 2014 | ||
changes: | ||
- First Release |
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,48 @@ | ||
name = Alt-Acme-Math-XS-DistZilla | ||
abstract = Dist::Zilla version of Acme::Math::XS | ||
author = Ingy döt Net <ingy@cpan.org> | ||
license = Perl_5 | ||
copyright_holder = Ingy döt Net | ||
version = 0.0.1 | ||
|
||
[@Filter] | ||
-bundle = @Basic | ||
-remove = MakeMaker | ||
[ChangesFromYaml] | ||
;[ReadmeFromPod] | ||
;filename = lib/Zilla/Dist.pod | ||
[MetaJSON] | ||
|
||
|
||
|
||
; Add this section to support Inline::Module: | ||
|
||
|
||
; I want people to add these lines, then I get the arg 'module' from inside | ||
; Dist::Zilla::Plugin::InlineModule and do stuff. | ||
[InlineModule] | ||
module = Acme::Math::XS | ||
; [InlineModule::MakeMaker] | ||
|
||
|
||
|
||
|
||
[@Git] | ||
[GithubMeta] | ||
user = ingydotnet | ||
issues = 1 | ||
|
||
[Prereqs] | ||
perl = v5.8.1 | ||
|
||
[PodSyntaxTests] | ||
[Prereqs / TestRequires] | ||
|
||
[PruneFiles] | ||
filename = dist.ini | ||
|
||
[MetaNoIndex] | ||
directory = inc | ||
directory = t | ||
directory = xt | ||
directory = example |
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,46 @@ | ||
=pod | ||
|
||
=for comment | ||
DO NOT EDIT. This Pod was generated by Swim v0.1.30. | ||
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,14 @@ | ||
# DO NOT EDIT | ||
# | ||
# GENERATED BY: Inline::Module 0.11 | ||
# | ||
# This module is for author-side development only. When this module is shipped | ||
# to CPAN, it will be automagically replaced with content that does not | ||
# require any Inline framework modules (or any other non-core modules). | ||
|
||
use strict; use warnings; | ||
package Acme::Math::XS::Inline; | ||
use base 'Inline'; | ||
use Inline::Module 'v1' => '0.11'; | ||
|
||
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,2 @@ | ||
package lib::Alt::Acme::Math::XS::DistZilla; | ||
our $VERSION = '0.0.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; |