Skip to content

Commit

Permalink
CPAN Release 0.16
Browse files Browse the repository at this point in the history
- Update tutorial for postamble
  • Loading branch information
ingydotnet committed Nov 22, 2014
1 parent ecc1742 commit 68ef209
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 15 deletions.
5 changes: 5 additions & 0 deletions Changes
@@ -1,4 +1,9 @@
---
version: 0.16
date: Sat Nov 22 07:29:34 UTC 2014
changes:
- Update tutorial for postamble
---
version: 0.15
date: Sat Nov 22 05:02:50 UTC 2014
changes:
Expand Down
2 changes: 1 addition & 1 deletion Meta
@@ -1,7 +1,7 @@
=meta: 0.0.1

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

Expand Down
26 changes: 15 additions & 11 deletions doc/Inline/Module/Tutorial.swim
Expand Up @@ -24,23 +24,27 @@ No matter which framework you use to make modules ([ExtUtils::MakeMaker],
[Dist::Zilla]) etc, you'll need to add a little metadata to the controls. For
now we'll just show `Makefile.PL` way:

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

WriteMakefile(
NAME => 'Acme::Math::XS',
...
postamble => {
inline => {
module => 'Acme::Math::XS',
inline => 'Acme::Math::XS::Inline',
ilsm => 'Inline::C',
},
},
);

use lib 'inc';
use Inline::Module;
FixMakefile(
module => 'Acme::Math::XS',
inline => 'Acme::Math::XS::Inline',
ilsm => 'Inline::C',
);

So you need to use `Inline::Module` and call `FixMakefile` after
`WriteMakefile`. The arguments specify the information the [Inline::Module]
needs to do the right things.
So you need to use `Inline::Module` and add a `postamble` section with an
`inline` section (with at least a `module` name) to `WriteMakefile`. The
arguments specify the information the [Inline::Module] needs to do the right
things.

NOTE: You also need to add `inc` to @INC, even if doesn't exist while you are
developing and testing. It will exist when you ship it to CPAN, and the `make
Expand Down Expand Up @@ -88,7 +92,7 @@ You'll get a `lib/Acme/Math/XS/Inline.pm` that looks like this:
use Inline::Module 'v1' => '1.23';
1;

The astute tutorialist will note that this module depends in `Inline` and
The astute tutorialist will note that this module depends on `Inline` and
`Inline::Module`, and that's a no-no. That's because this stub is used for
author side development and testing, and another stub replaces it at module
release time.
Expand Down
4 changes: 2 additions & 2 deletions lib/Inline/Module.pm
@@ -1,6 +1,6 @@
use strict; use warnings;
package Inline::Module;
our $VERSION = '0.15';
our $VERSION = '0.16';

use Config;
use File::Path;
Expand Down Expand Up @@ -148,7 +148,7 @@ sub postamble {
croak "postamble 'inline' section requires 'module' key in Makefile.PL"
unless $inline->{module};

my $self = Inline::Module->new;
my $self = $Inline::Module::Self = Inline::Module->new;
$self->default_args($inline, $makemaker);

my $code_modules = $self->{module};
Expand Down
41 changes: 40 additions & 1 deletion note/ToDo
@@ -1 +1,40 @@
Write a test/devel test for making a full module like Acme::Math::XS
+ Switch Inline::Module to the postamble model
+ Release new acme-math-xs
+ Release new inline-module
+ Fix Tutorial for postamble
- Add a test or two
+ Write Module::Install::InlineModule
+ and Alt-Acme-Math-XS-ModuleInstall
- Refactor Dist-Zilla-Plugin-InlineModule to use postamble
- and Alt-Acme-Math-XS-DistZilla
- Look at ZillaDist too
- Write weekend blog post (#5)


== Cards

- Add new plugin sections to the tutorial

- Try putting ::Inline module into author time blib
- This would simplify everything greatly

- Fix this `make` time bug:
> make
Can't opendir(blib/lib/auto/Alt): No such file or directory
at inc/Inline/Module.pm line 227.
- Happens on:
- make
- make test
- make install

- Get rid of `perl-inline-module` bin script (probably)
- The ::Inline module can be generated by the Makefile.PL etc
- It should likely never be committed. (We commit it now)

- Think of a way to make sure Inline::Module version does not regress.
- From release to release with comaintainers
- Not sure how important this is

- Change the 'inline' meta keyword to 'loader' or 'stub'

- Write a test/devel test for making a full module like Acme::Math::XS

0 comments on commit 68ef209

Please sign in to comment.