Skip to content

Commit

Permalink
Merge pull request #5 from lharey/master
Browse files Browse the repository at this point in the history
add license and min perl version and new test
  • Loading branch information
rueycheng committed Nov 24, 2017
2 parents 81668dd + 8c8e5a7 commit 4236e37
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ WriteMakefile(
AUTHOR => 'Ruey-Cheng Chen <rueycheng@cpan.com>',
VERSION_FROM => 'lib/Module/Starter/Smart.pm',
ABSTRACT_FROM => 'lib/Module/Starter/Smart.pm',
MIN_PERL_VERSION => 5.6.0,
PL_FILES => {},
LICENSE => 'perl',
BUILD_REQUIRES => {
'ExtUtils::MakeMaker' => 0,
'ExtUtils::MakeMaker' => 6.48,
'File::Spec' => 0,
'parent' => 0,
'Module::Starter' => 1.58,
Expand Down
34 changes: 34 additions & 0 deletions t/03.create_distro_with_build.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env perl

use strict;
use warnings;

use Test::More tests => 3;
use Test::TempDir::Tiny;
use Module::Starter qw/Module::Starter::Smart/;
use File::Spec;

my $tempdir = tempdir();
my $root = File::Spec->catdir($tempdir, 'Foo-Bar');

{
local $SIG{__WARN__} = sub {
warn $_[0] unless $_[0] =~ /^Added to MANIFEST/;
};

Module::Starter->create_distro(
author => 'me',
builder => 'Module::Build',
modules => ['Foo::Bar'],
email => 'me@there.com',
dir => $root,
);
}

ok(-d $root, 'Module root exists');

my $file = File::Spec->catfile($root, qw(lib Foo Bar.pm));
ok(-f $file, 'Module file exists');

push @INC, File::Spec->catdir($root, 'lib');
require_ok('Foo::Bar');

0 comments on commit 4236e37

Please sign in to comment.