forked from dagolden/extutils-makemaker
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
To make testing easier we add ExtUtils::MakeMaker::Config, a thin wra…
…pper around Config which makes it writable and in a centralized location. This allows tests to override %Config. Also add the new MM_* files to the MANIFEST git-svn-id: http://svn.schwern.org/repos/CPAN/ExtUtils-MakeMaker/trunk@2212 8151f2b9-fde8-0310-94fd-f048d12aab9e
- Loading branch information
Showing
15 changed files
with
82 additions
and
38 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
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
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
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,39 @@ | ||
package ExtUtils::MakeMaker::Config; | ||
|
||
$VERSION = '0.01_02'; | ||
|
||
use strict; | ||
use Config (); | ||
|
||
# Give us an overridable config. | ||
use vars qw(%Config); | ||
%Config = %Config::Config; | ||
|
||
sub import { | ||
my $caller = caller; | ||
|
||
no strict 'refs'; | ||
*{$caller.'::Config'} = \%Config; | ||
} | ||
|
||
1; | ||
|
||
|
||
=head1 NAME | ||
ExtUtils::MakeMaker::Config - Wrapper around Config.pm | ||
=head1 SYNOPSIS | ||
use ExtUtils::MakeMaker::Config; | ||
print $Config{installbin}; # or whatever | ||
=head1 DESCRIPTION | ||
B<FOR INTERNAL USE ONLY> | ||
A very thin wrapper around Config.pm so MakeMaker is easier to test. | ||
=cut |
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,23 @@ | ||
#!/usr/bin/perl -w | ||
|
||
BEGIN { | ||
if( $ENV{PERL_CORE} ) { | ||
chdir 't'; | ||
@INC = ('../lib', 'lib/'); | ||
} | ||
else { | ||
unshift @INC, 't/lib/'; | ||
} | ||
} | ||
|
||
use Test::More tests => 3; | ||
use Config (); | ||
|
||
BEGIN { use_ok 'ExtUtils::MakeMaker::Config'; } | ||
|
||
is $Config{path_sep}, $Config::Config{path_sep}; | ||
|
||
eval { | ||
$Config{wibble} = 42; | ||
}; | ||
is $Config{wibble}, 42; |
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