Skip to content

Commit

Permalink
Start a Zilla::Dist branch
Browse files Browse the repository at this point in the history
  • Loading branch information
ingydotnet committed Nov 16, 2014
0 parents commit 76a0dae
Show file tree
Hide file tree
Showing 8 changed files with 243 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .travis.yml
@@ -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]+/
5 changes: 5 additions & 0 deletions Changes
@@ -0,0 +1,5 @@
---
version: 0.0.1
date: Sat Nov 15 17:43:35 PST 2014
changes:
- First Release
55 changes: 55 additions & 0 deletions Contributing
@@ -0,0 +1,55 @@
Contributing
============

The "Alt-Acme-Math-XS-ZillaDist" Project needs your help!

Please consider being a contributor. This file contains instructions that will
help you be an effective contributor to the Project.

GitHub
------

The code for this Project is hosted at GitHub. The repository is:

https://github.com/ingydotnet/alt-acme-math-xs-zilladist-pm

You can get the code with this command:

git clone https://github.com/ingydotnet/alt-acme-math-xs-zilladist-pm

If you've found a bug or a missing feature that you would like the author to
know about, report it here:

https://github.com/ingydotnet/alt-acme-math-xs-zilladist-pm/issues

or fix it and submit a pull request here:

https://github.com/ingydotnet/alt-acme-math-xs-zilladist-pm/pulls

See these links for help on interacting with GitHub:

* https://help.github.com/
* https://help.github.com/articles/creating-a-pull-request

Zilla::Dist
-----------

This Project uses Zilla::Dist to prepare it for publishing to CPAN. Read:

https://metacpan.org/pod/distribution/Zilla-Dist/lib/Zilla/Dist/Contributing.pod

for up-to-date instructions on what contributors like yourself need to know to
use it.

IRC
---

Alt-Acme-Math-XS-ZillaDist has an IRC channel where you can find real people to help you:

irc.perl.org#inline

Join the channel. Join the team!


Thanks in advance, Ingy döt Net

32 changes: 32 additions & 0 deletions Meta
@@ -0,0 +1,32 @@
=meta: 0.0.2

name: Alt-Acme-Math-XS-ZillaDist
version: 0.0.1
abstract: Math is HARD (faster)
homepage: https://metacpan.org/release/Alt-Acme-Math-XS-ZillaDist
language: perl
license: perl
copyright: 2014

author:
name: Ingy döt Net
email: ingy@cpan.org
homepage: http://ingy.net
github: ingydotnet
twitter: ingydotnet
freenode: ingy

devel:
git: https://github.com/ingydotnet/alt-acme-math-xs-zilladist-pm
bug: https://github.com/ingydotnet/alt-acme-math-xs-zilladist-pm/issues
irc: irc.perl.org#inline

requires:
perl: 5.8.1

=zild:
libname: Acme::Math::XS
inline:
module: Acme::Math::XS
metanoindex:
lib/Acme: directory
46 changes: 46 additions & 0 deletions ReadMe.pod
@@ -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
30 changes: 30 additions & 0 deletions doc/Acme/Math/XS.swim
@@ -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
21 changes: 21 additions & 0 deletions lib/Acme/Math/XS.pm
@@ -0,0 +1,21 @@
use strict; use warnings;
package Acme::Math::XS;
# our $VERSION = '0.0.1';

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;
8 changes: 8 additions & 0 deletions test/test.t
@@ -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;

0 comments on commit 76a0dae

Please sign in to comment.