-
Notifications
You must be signed in to change notification settings - Fork 213
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 #426 from tartansandal/add-vendor
core modules may be installed under 'vendor' paths
- Loading branch information
Showing
3 changed files
with
54 additions
and
9 deletions.
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
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,31 @@ | ||
use xt::Run; | ||
use Test::More; | ||
|
||
# If ExtUtils::MakeMaker is installed under vendor path and not a core path, | ||
# then --exclude-vendor will fail | ||
|
||
use Config; | ||
use Module::Metadata; | ||
my $vendor_path = $Config{vendorlibexp}; | ||
my $core_path = $Config{privlibexp}; | ||
|
||
my $core_mod = 'ExtUtils::MakeMaker'; | ||
|
||
my $core_in_vendor = 0; | ||
if ( Module::Metadata->new_from_module( $core_mod, inc => [$vendor_path] ) ) { | ||
$core_in_vendor = 1; | ||
} | ||
if ( Module::Metadata->new_from_module( $core_mod, inc => [$core_path] ) ) { | ||
$core_in_vendor = 0; | ||
} | ||
|
||
SKIP: { | ||
skip 'Core modules not moved to vendor on this system' unless $core_in_vendor; | ||
|
||
# Something with some core dependencies | ||
run_L( "--exclude-vendor", "URI::Find" ); | ||
|
||
like last_build_log, qr{Installing the dependencies failed: Module 'ExtUtils::MakeMaker'}; | ||
} | ||
|
||
done_testing; |