-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from lharey/master
add license and min perl version and new test
- Loading branch information
Showing
2 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); |