Move ExtUtils::Command from lib to ext.
Nicholas Clark [Wed, 9 Sep 2009 15:41:28 +0000 (16:41 +0100)]
MANIFEST
Porting/Maintainers.pl
ext/ExtUtils-Command/lib/ExtUtils/Command.pm [moved from lib/ExtUtils/Command.pm with 100% similarity]
ext/ExtUtils-Command/t/cp.t [moved from lib/ExtUtils/t/cp.t with 78% similarity]
ext/ExtUtils-Command/t/eu_command.t [moved from lib/ExtUtils/t/eu_command.t with 98% similarity]
ext/ExtUtils-Command/t/lib/TieOut.pm [new file with mode: 0644]
make_ext.pl

index a358f54..145b65a 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -1039,6 +1039,10 @@ ext/Errno/ChangeLog      Errno changes
 ext/Errno/Errno_pm.PL  Errno perl module create script
 ext/Errno/Makefile.PL  Errno extension makefile writer
 ext/Errno/t/Errno.t    See if Errno works
+ext/ExtUtils-Command/lib/ExtUtils/Command.pm   Utilities for Make on non-UNIX platforms
+ext/ExtUtils-Command/t/cp.t                    See if ExtUtils::Command works
+ext/ExtUtils-Command/t/eu_command.t            See if ExtUtils::Command works
+ext/ExtUtils-Command/t/lib/TieOut.pm           Testing library to capture prints
 ext/Fcntl/Fcntl.pm     Fcntl extension Perl module
 ext/Fcntl/Fcntl.xs     Fcntl extension external subroutines
 ext/Fcntl/Makefile.PL  Fcntl extension makefile writer
@@ -2553,7 +2557,6 @@ lib/ExtUtils/CBuilder/t/02-link.t tests for ExtUtils::CBuilder
 lib/ExtUtils/Changes           MakeMaker change log
 lib/ExtUtils/Changes_EU-Install                ExtUtils-Install change log
 lib/ExtUtils/Command/MM.pm     Calling MM functions from the cmd line
-lib/ExtUtils/Command.pm                Utilities for Make on non-UNIX platforms
 lib/ExtUtils/Constant/Base.pm  generate XS code to import C header constants
 lib/ExtUtils/Constant.pm       generate XS code to import C header constants
 lib/ExtUtils/Constant/ProxySubs.pm     generate XS code for proxy constants
@@ -2612,11 +2615,9 @@ lib/ExtUtils/t/can_write_dir.t   Does the _can_write_dir function of ExtUtils::Ins
 lib/ExtUtils/t/cd.t            Test to see cd works
 lib/ExtUtils/t/config.t                Test ExtUtils::MakeMaker::Config
 lib/ExtUtils/t/Constant.t      See if ExtUtils::Constant works
-lib/ExtUtils/t/cp.t            See if ExtUtils::Command works
 lib/ExtUtils/t/dir_target.t    Verify if dir_target() is supported
 lib/ExtUtils/t/Embed.t         See if ExtUtils::Embed and embedding works
 lib/ExtUtils/testlib.pm                Fixes up @INC to use just-built extension
-lib/ExtUtils/t/eu_command.t    See if ExtUtils::Command works
 lib/ExtUtils/t/FIRST_MAKEFILE.t                See if FIRST_MAKEFILE works
 lib/ExtUtils/t/fixin.t         See if ExtUtils::MakeMaker works
 lib/ExtUtils/t/fix_libs.t      Test for ExtUtils::MakeMaker
index 9e1ad3f..eb62920 100755 (executable)
@@ -573,18 +573,12 @@ use File::Glob qw(:case);
        {
        'MAINTAINER'    => 'rkobes',
        'DISTRIBUTION'  => 'RKOBES/ExtUtils-Command-1.16.tar.gz',
-       'FILES'         => q[lib/ExtUtils/Command.pm
-                            lib/ExtUtils/t/{cp,eu_command}.t
-                           ],
+       'FILES'         => q[ext/ExtUtils-Command],
        'EXCLUDED'      => [ qw{ t/shell_command.t
                                 t/shell_exit.t
-                                t/lib/TieOut.pm
                                 lib/Shell/Command.pm
                               },
                           ],
-       'MAP'           => { 't/'       => 'lib/ExtUtils/t/',
-                            'lib/'     => 'lib/',
-                          },
        'CPAN'          => 1,
        'UPSTREAM'      => undef,
        },
similarity index 78%
rename from lib/ExtUtils/t/cp.t
rename to ext/ExtUtils-Command/t/cp.t
index 3d7ba6e..0b899bf 100644 (file)
@@ -1,13 +1,7 @@
 #!/usr/bin/perl -w
 
 BEGIN {
-    if( $ENV{PERL_CORE} ) {
-        chdir 't';
-        @INC = ('../lib', 'lib/');
-    }
-    else {
-        unshift @INC, 't/lib/';
-    }
+    unshift @INC, 't/lib/';
 }
 chdir 't';
 
similarity index 98%
rename from lib/ExtUtils/t/eu_command.t
rename to ext/ExtUtils-Command/t/eu_command.t
index 99e45aa..71ec8c2 100644 (file)
@@ -1,13 +1,7 @@
 #!/usr/bin/perl -w
 
 BEGIN {
-    if( $ENV{PERL_CORE} ) {
-        chdir 't';
-        @INC = ('../lib', 'lib/');
-    }
-    else {
-        unshift @INC, 't/lib/';
-    }
+    unshift @INC, 't/lib/';
 }
 chdir 't';
 
diff --git a/ext/ExtUtils-Command/t/lib/TieOut.pm b/ext/ExtUtils-Command/t/lib/TieOut.pm
new file mode 100644 (file)
index 0000000..0a0f5f9
--- /dev/null
@@ -0,0 +1,28 @@
+package TieOut;
+
+sub TIEHANDLE {
+    my $scalar = '';
+    bless( \$scalar, $_[0]);
+}
+
+sub PRINT {
+    my $self = shift;
+    $$self .= join('', @_);
+}
+
+sub PRINTF {
+    my $self = shift;
+    my $fmt  = shift;
+    $$self .= sprintf $fmt, @_;
+}
+
+sub FILENO {}
+
+sub read {
+    my $self = shift;
+    my $data = $$self;
+    $$self = '';
+    return $data;
+}
+
+1;
index 691f7b1..9b32065 100644 (file)
@@ -4,7 +4,7 @@ use warnings;
 use Config;
 use Cwd;
 
-my @toolchain = qw(ext/constant/lib);
+my @toolchain = qw(ext/constant/lib ext/ExtUtils-Command/lib);
 
 # This script acts as a simple interface for building extensions.