Skip to content

Commit

Permalink
CPAN Release 0.32
Browse files Browse the repository at this point in the history
- Add a (bundle => 0) option
  • Loading branch information
ingydotnet committed Dec 30, 2014
1 parent 7c7eeaa commit 83ca6fd
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
@@ -1,6 +1,6 @@
# DO NOT EDIT
#
# This .travis.yml file generated by Zilla-Dist-0.0.179.
# This .travis.yml file generated by Zilla-Dist-0.0.181.
#
# To update it, run:
#
Expand Down
2 changes: 1 addition & 1 deletion About
Expand Up @@ -92,4 +92,4 @@ for up-to-date instructions.



# This file generated by Zilla-Dist-0.0.179
# This file generated by Zilla-Dist-0.0.181
5 changes: 5 additions & 0 deletions Changes
@@ -1,4 +1,9 @@
---
version: 0.32
date: Tue Dec 30 16:38:48 EST 2014
changes:
- Add a (bundle => 0) option
---
version: 0.31
date: Fri Dec 26 19:02:07 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.31
version: 0.32
abstract: Support for Inline-based CPAN Extension Modules
homepage: https://metacpan.org/release/Inline-Module

Expand Down
10 changes: 10 additions & 0 deletions ReadMe.pod
Expand Up @@ -88,6 +88,16 @@ using. It defaults to L<Inline::C>. It can be an array ref of multiple ilsm-s.

This will cause the stubs to be updated every time the C<Makefile.PL> is run.

=item C<bundle>

bundle => 0,

By default Inline::Module will bundle all the dependencies under your
distribution's C<inc/> directory. Setting this option to 0 will disable
that, but then you are responsible for declaring all the dependencies
yourself. Do this with the knowledge that if Inline::* APIs change, your
distribution may break.

=back

=head1 STUB MODULE GENERATION
Expand Down
10 changes: 10 additions & 0 deletions doc/Inline/Module.swim
Expand Up @@ -78,6 +78,16 @@ Arguments are key/value pairs.

This will cause the stubs to be updated every time the `Makefile.PL` is run.

- `bundle`

bundle => 0,

By default Inline::Module will bundle all the dependencies under your
distribution's `inc/` directory. Setting this option to 0 will disable that,
but then you are responsible for declaring all the dependencies yourself. Do
this with the knowledge that if Inline::* APIs change, your distribution may
break.

= Stub Module Generation

During development, [Inline::Module] needs to generate /stub/ modules. For the
Expand Down
4 changes: 3 additions & 1 deletion lib/Inline/Module.pm
@@ -1,6 +1,6 @@
use strict; use warnings;
package Inline::Module;
our $VERSION = '0.31';
our $VERSION = '0.32';
our $API_VERSION = 'v2';

use Carp 'croak';
Expand Down Expand Up @@ -233,10 +233,12 @@ sub default_meta {
$meta->{stub} = [ $meta->{stub} ] unless ref $meta->{stub};
$meta->{ilsm} ||= 'Inline::C';
$meta->{ilsm} = [ $meta->{ilsm} ] unless ref $meta->{ilsm};
$meta->{bundle} = 1 unless defined $meta->{bundle};
}

sub included_modules {
my ($class, $meta) = @_;
return [] if not $meta->{bundle};
my $ilsm = $meta->{ilsm};
my $include = [
'Inline',
Expand Down
16 changes: 16 additions & 0 deletions test/devel/test-inline-modules.t
Expand Up @@ -20,6 +20,7 @@ source "$dir/test-module.sh"
lib/Acme/Math/XS.pm
inc/Acme/Math/XS/Inline.pm
)
test_no_bundle=false
}

cpp() {
Expand Down Expand Up @@ -98,6 +99,20 @@ d-g-xs() {
test_module
}

u-t() {
local test_dir=Unicode-Truncate
local test_repo_url=$TEST_HOME/../Unicode-Truncate/.git
local test_dist=$test_dir
local test_branch='master'
local test_dist_files=(
MANIFEST
lib/Unicode/Truncate.pm
inc/Unicode/Truncate/Inline.pm
)
local test_no_bundle=true
test_module
}

# You can run specific tests like this:
# prove -v test/devel/test-inline-modules.t :: dz cpp d-g-xs
if [ $# -gt 0 ]; then
Expand All @@ -115,6 +130,7 @@ else
zd
m-p-fs
d-g-xs
u-t
fi

done_testing;
Expand Down
5 changes: 5 additions & 0 deletions test/devel/test-module.sh
Expand Up @@ -65,6 +65,11 @@ test_module() {
fi
)
pass "$dd passes its tests"

if $test_no_bundle; then
ok "`[ ! -e "$dd/inc/Inline/Module.pm" ]`" \
"Inline::Module is not bundled in inc/"
fi
}

cd "$test_home"
Expand Down

0 comments on commit 83ca6fd

Please sign in to comment.