Skip to content

Commit

Permalink
CPAN Release 0.18
Browse files Browse the repository at this point in the history
- Auto-Stubbing
  • Loading branch information
ingydotnet committed Dec 7, 2014
1 parent c0e018c commit 856bac9
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 20 deletions.
2 changes: 1 addition & 1 deletion About
Expand Up @@ -63,8 +63,8 @@ This repoository contains the following top level files and directories:
ReadMe.pod - Top level ReadMe file for GitHub. (generated)
.travis.yml - Travis CI test control file. (generated)

bin/ - Directory of installable scripts.
doc/ - Documentation directory.
ext/ - External dependency repos.
.git/ - Git repository data.
lib/ - All the source code libraries (modules).
note/ - Random note files. To-Do lists, specs, etc.
Expand Down
5 changes: 5 additions & 0 deletions Changes
@@ -1,4 +1,9 @@
---
version: 0.18
date: Sun Dec 7 00:23:01 PST 2014
changes:
- Auto-Stubbing
---
version: 0.17
date: Mon Nov 24 10:27:25 PST 2014
changes:
Expand Down
2 changes: 1 addition & 1 deletion Meta
@@ -1,7 +1,7 @@
=meta: 0.0.1

name: Inline-Module
version: 0.17
version: 0.18
abstract: Support for Inline-based CPAN Extension Modules
homepage: https://metacpan.org/release/Inline-Module

Expand Down
51 changes: 34 additions & 17 deletions ReadMe.pod
Expand Up @@ -16,18 +16,26 @@ Inline::Module - Support for Inline-based CPAN Extension Modules

=head1 SYNOPSIS

In your module (say C<Acme::Math::XS>):

use Acme::Math::XS::Inline C =>
"long add(long a, long b) { return a + b; }";

In C<Makefile.PL>:

use lib 'inc';
use ExtUtils::MakeMaker;
use Inline::Module;

WriteMakefile(
NAME => 'Module::Name',
...,
NAME => 'Acme::Math::XS',
postamble => {
inline => {
module => 'Acme::Math::XS',
},
},
);

use lib 'inc';
use Inline::Module::MakeMaker;
FixMakefile(module => 'Module::Name');

=head1 DESCRIPTION

This module provides support and documentation for creating and maintaining
Expand All @@ -38,13 +46,12 @@ The L<Inline::Module::Tutorial> explains the simple processes involved.
When used from a C<Makefile.PL>, this module provides support for modifying
the Makefile generated by L<ExtUtils::MakeMaker>.

=head1 EXPORTS
You just need to provide a C<postamble> section. See below.

This module exports C<FixMakefile> when used from a C<Makefile.PL>.
You also need to make sure that the C<inc/> directory is in C<@INC>. This is
where the build tools will be when your module is shipped to CPAN.

C<FixMakefile> takes the following arguments:

=head2 Arguments
=head2 postamble Section

Arguments are key/value pairs.

Expand All @@ -57,9 +64,9 @@ Arguments are key/value pairs.
Required. This is the module that contains inline C<C> or C<C++> code. It can
be an array ref of multiple modules.

=item C<inline>
=item C<stub>

inline => 'My::Module::Inline',
stub => 'My::Module::Inline',

Optional. This is the name of the Inline::Module generated stub module. It's
value defaults to the C<module> argument with '::Inline' appended. It can be
Expand All @@ -74,12 +81,22 @@ using. It defaults to L<Inline::C>. It can be an array ref of multiple ilsm-s.

=back

=head1 SCRIPT
=head1 STUB MODULE GENERATION

During development, L<Inline::Module> needs to generate I<stub> modules. For
the case in the synopsis, it would need to generate C<Acme::Math::XS::Inline>.
There a few similar but different ways to do this:

perl -MInline::Module=makestub,Acme::Math::XS::Inline

or:

export PERL5OPT='-MInline::Module=autostub'
prove -lv t/

This module provides a script to generate a required Inline stub file.
or:

> perl-inline-module generate Module::Name::Inline
Inline module 'Module::Name::Inline' generated as 'lib/Module/Name/Inline.pm'
perl Makefile.PL

=head1 TPF GRANT

Expand Down
2 changes: 1 addition & 1 deletion lib/Inline/Module.pm
@@ -1,6 +1,6 @@
use strict; use warnings;
package Inline::Module;
our $VERSION = '0.17';
our $VERSION = '0.18';

use Config();
use File::Path();
Expand Down

0 comments on commit 856bac9

Please sign in to comment.