From: Nicholas Clark Date: Tue, 8 Sep 2009 20:56:38 +0000 (+0100) Subject: Move constant from lib/ to ext/ X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f345288bed836e76c48c201640d2a1178d3f443d;p=p5sagit%2Fp5-mst-13.2.git Move constant from lib/ to ext/ This is the first step in moving dual-life toolchain modules into ext. --- diff --git a/MANIFEST b/MANIFEST index 8566305..a4fe424 100644 --- a/MANIFEST +++ b/MANIFEST @@ -379,6 +379,8 @@ ext/Compress-Raw-Zlib/zlib-src/zlib.h Compress::Raw::Zlib ext/Compress-Raw-Zlib/zlib-src/zutil.c Compress::Raw::Zlib ext/Compress-Raw-Zlib/zlib-src/zutil.h Compress::Raw::Zlib ext/Compress-Raw-Zlib/Zlib.xs Compress::Raw::Zlib +ext/constant/lib/constant.pm For "use constant" +ext/constant/t/constant.t See if compile-time constants work ext/CPAN/lib/CPAN/API/HOWTO.pod recipe book for programming with CPAN.pm ext/CPAN/lib/CPAN/Author.pm helper package for CPAN.pm ext/CPAN/lib/CPAN/Bundle.pm helper package for CPAN.pm @@ -2474,8 +2476,6 @@ lib/complete.pl A command completion subroutine lib/Config/Extensions.pm Convenient hash lookup for built extensions lib/Config/Extensions.t See if Config::Extensions works lib/Config.t See if Config works -lib/constant.pm For "use constant" -lib/constant.t See if compile-time constants work lib/CORE.pod document the CORE namespace lib/ctime.pl A ctime workalike lib/Cwd.pm Various cwd routines (getcwd, fastcwd, chdir) diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index d1204f5..2a05539 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -364,7 +364,7 @@ use File::Glob qw(:case); { 'MAINTAINER' => 'saper', 'DISTRIBUTION' => 'SAPER/constant-1.17.tar.gz', - 'FILES' => q[lib/constant.{pm,t}], + 'FILES' => q[ext/constant], 'EXCLUDED' => [ qw( t/00-load.t t/more-tests.t t/pod-coverage.t @@ -372,9 +372,6 @@ use File::Glob qw(:case); eg/synopsis.pl ) ], - 'MAP' => { 'lib/' => 'lib/', - 't/' => 'lib/', - }, 'CPAN' => 1, 'UPSTREAM' => 'blead', }, diff --git a/ext/.gitignore b/ext/.gitignore index e13382a..d737ff4 100644 --- a/ext/.gitignore +++ b/ext/.gitignore @@ -22,6 +22,7 @@ ppport.h /B-Deparse/Makefile.PL /B-Lint/Makefile.PL /CGI/Makefile.PL +/constant/Makefile.PL /CPANPLUS-Dist-Build/Makefile.PL /Data-Dumper/Makefile.PL /Digest/Makefile.PL diff --git a/lib/constant.pm b/ext/constant/lib/constant.pm similarity index 100% rename from lib/constant.pm rename to ext/constant/lib/constant.pm diff --git a/lib/constant.t b/ext/constant/t/constant.t similarity index 98% rename from lib/constant.t rename to ext/constant/t/constant.t index 10560c9..a42b7d2 100644 --- a/lib/constant.t +++ b/ext/constant/t/constant.t @@ -1,12 +1,5 @@ #!./perl -T -BEGIN { - if ($ENV{PERL_CORE}) { - chdir 't' if -d 't'; - @INC = '../lib'; - } -} - use warnings; use vars qw{ @warnings $fagwoosh $putt $kloong}; BEGIN { # ...and save 'em for later diff --git a/lib/.gitignore b/lib/.gitignore index 6ec8c4d..93be609 100644 --- a/lib/.gitignore +++ b/lib/.gitignore @@ -246,6 +246,7 @@ /attributes.pm /auto /base.pm +/constant.pm /encoding.pm /fields.pm /lib.pm diff --git a/make_ext.pl b/make_ext.pl index b544830..691f7b1 100644 --- a/make_ext.pl +++ b/make_ext.pl @@ -4,6 +4,8 @@ use warnings; use Config; use Cwd; +my @toolchain = qw(ext/constant/lib); + # This script acts as a simple interface for building extensions. # It's actually a cut and shut of the Unix version ext/utils/makeext and the @@ -219,7 +221,8 @@ sub build_extension { $perl ||= "$up/miniperl"; my $return_dir = $up; my $lib_dir = "$up/lib"; - $ENV{PERL5LIB} = $lib_dir; + $ENV{PERL5LIB} + = join $Config{path_sep}, $lib_dir, map {"$up/$_"} @toolchain; unless (chdir "$ext_dir") { warn "Cannot cd to $ext_dir: $!";