lib/Exporter.pm Exporter base class
lib/Exporter.t See if Exporter works
lib/Exporter/Heavy.pm Complicated routines for Exporter
+lib/ExtUtils/Changes MakeMaker change log
lib/ExtUtils/Command.pm Utilities for Make on non-UNIX platforms
lib/ExtUtils/Constant.pm generate XS code to import C header constants
lib/ExtUtils/Embed.pm Utilities for embedding Perl in C programs
-lib/ExtUtils/inst Give information about installed extensions
+lib/ExtUtils/instmodsh Give information about installed extensions
lib/ExtUtils/Install.pm Handles 'make install' on extensions
lib/ExtUtils/Installed.pm Information on installed extensions
lib/ExtUtils/Liblist.pm Locates libraries
t/lib/Test/Simple/sample_tests/success.plx for exit.t
t/lib/Test/Simple/sample_tests/too_few.plx for exit.t
t/lib/Test/Simple/sample_tests/two_fail.plx for exit.t
+t/lib/TieOut.pm Testing library to capture prints
t/lib/warnings/1global Tests of global warnings for warnings.t
t/lib/warnings/2use Tests for "use warnings" for warnings.t
t/lib/warnings/3both Tests for interaction of $^W and "use warnings"
--- /dev/null
+5.48_03 Thu Jan 17 23:44:38 EST 2002
+ * moved bin/inst to bin/instmodsh
+ * Some Win32 backporting fixes. The -x switch doesn't seem to
+ work on Win32/5.6.1.
+ * Bug on Win32. MAKEMAKER variable not set properly.
+ * _02 broke hints files. Now fixed.
+ - Minor prereq error formatting glitch
+ - ExtUtils::testlib no longer a thin wrapper around blib, now a
+ thin wrapper around lib like it was. blib is noisy on 5.6.1.
+ - Nick and chromatic found and fixed some warnings in the tests
+
+5.48_02 Wed Jan 16 19:11:26 EST 2002
+ - Fixed some Win32 warnings. Needs more work.
+
+5.48_01 Wed Jan 16 15:10:28 EST 200
+ * Adapted from bleadperl@14303
+ * Backported to 5.6.1
+ - inst and xsubpp moved out of lib/ and into bin/
+ - ExtUtils::testlib obsoleted. Now a thin wrapper around blib.pm
+ ***--> Non-Unix platforms not tested at all! Please test and report
+ back. Tests probably only need minor fixes.
+
-# $Id: Embed.pm,v 1.2501 $
+# $Id: Embed.pm,v 1.1.1.1 2002/01/16 19:27:19 schwern Exp $
require 5.002;
package ExtUtils::Embed;
);
use strict;
-$VERSION = sprintf("%d.%02d", q$Revision: 1.2506_00 $ =~ /(\d+)\.(\d+)/);
+$VERSION = 1.2506_01;
@ISA = qw(Exporter);
@EXPORT = qw(&xsinit &ldopts
use 5.006_001;
# Broken out of MakeMaker from version 4.11
-our $VERSION = substr q$Revision: 1.27 $, 10;
+our $VERSION = 1.27_01;
use Config;
use Cwd 'cwd';
package ExtUtils::MM_Win32;
-our $VERSION = '1.00';
+our $VERSION = '1.00_02';
=head1 NAME
sub find_perl {
my($self, $ver, $names, $dirs, $trace) = @_;
+ $trace ||= 0;
+
my($name, $dir);
if ($trace >= 2){
print "Looking for perl $ver by these names:
};
push @m, qq{
-MAKEMAKER = $INC{'ExtUtils\MakeMaker.pm'}
+MAKEMAKER = $INC{'ExtUtils/MakeMaker.pm'}
MM_VERSION = $ExtUtils::MakeMaker::VERSION
};
.SUFFIXES: .xs .c .C .cpp .cxx .cc \$(OBJ_EXT)
-# Nick wanted to get rid of .PRECIOUS. I don't remember why. I seem to recall, that
-# some make implementations will delete the Makefile when we rebuild it. Because
-# we call false(1) when we rebuild it. So make(1) is not completely wrong when it
-# does so. Our milage may vary.
+# Nick wanted to get rid of .PRECIOUS. I don't remember why. I seem to
+# recall, that some make implementations will delete the Makefile when we
+# rebuild it. Because we call false(1) when we rebuild it. So make(1) is
+# not completely wrong when it does so. Our milage may vary.
# .PRECIOUS: Makefile # seems to be not necessary anymore
.PHONY: all config static dynamic test linkext manifest
package ExtUtils::MakeMaker;
-$VERSION = "5.48";
+$VERSION = "5.48_03";
$Version_OK = "5.17"; # Makefiles older than $Version_OK will die
# (Will be checked from MakeMaker version 4.13 onwards)
-($Revision = substr(q$Revision: 1.222 $, 10)) =~ s/\s+$//;
+($Revision = substr(q$Revision: 1.4 $, 10)) =~ s/\s+$//;
warn "Warning: prerequisite $prereq $self->{PREREQ_PM}->{$prereq} not found.\n" unless $self->{PREREQ_FATAL};
$unsatisfied{$prereq} = 'not installed';
} elsif ($prereq->VERSION < $self->{PREREQ_PM}->{$prereq} ){
- warn "Warning: prerequisite $prereq $self->{PREREQ_PM}->{$prereq} not found. We have"
+ warn "Warning: prerequisite $prereq $self->{PREREQ_PM}->{$prereq} not found. We have "
. ($prereq->VERSION || 'unknown version') unless $self->{PREREQ_FATAL};
$unsatisfied{$prereq} = $self->{PREREQ_PM}->{$prereq} ? $self->{PREREQ_PM}->{$prereq} : 'unknown version' ;
}
return unless -f $hint_file; # really there
# execute the hintsfile:
- print STDOUT "Processing hints file $hint_file\n";
+ print STDERR "Processing hints file $hint_file\n";
{
local *HINT;
open(HINT, $hint_file) || die "Can't open $hint_file: $!";
eval join '', <HINT>;
close HINT;
}
- print STDOUT $@ if $@;
+ print STDERR $@ if $@;
}
sub mv_all_methods {
$VERSION = '1.00';
*VERSION = \'1.01';
- ( $VERSION ) = '$Revision: 1.222 $ ' =~ /\$Revision:\s+([^\s]+)/;
+ ( $VERSION ) = '$Revision: 1.4 $ ' =~ /\$Revision:\s+([^\s]+)/;
$FOO::VERSION = '1.10';
*FOO::VERSION = \'1.11';
our $VERSION = 1.2.3; # new for perl5.6.0
$Is_MacOS,$Is_VMS,
$Debug,$Verbose,$Quiet,$MANIFEST,$found,$DEFAULT_MSKIP);
-$VERSION = substr(q$Revision: 1.35 $, 10);
+$VERSION = 1.35_00;
@ISA=('Exporter');
@EXPORT_OK = ('mkmanifest', 'manicheck', 'fullcheck', 'filecheck',
'skipcheck', 'maniread', 'manicopy');
package ExtUtils::Mkbootstrap;
-$VERSION = substr q$Revision: 1.14 $, 10;
-# $Date: 1996/09/03 17:04:43 $
+$VERSION = 1.14_01;
use Config;
use Exporter;
=head1 SYNOPSIS
-C<mkbootstrap>
+C<Mkbootstrap>
=head1 DESCRIPTION
our(@ISA, @EXPORT, $VERSION);
@ISA = 'Exporter';
@EXPORT = '&Mksymlists';
-$VERSION = substr q$Revision: 1.18 $, 10;
+$VERSION = 1.18_00;
sub Mksymlists {
my(%spec) = @_;
-#!./perl -Tw
+#!/usr/bin/perl -w
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
+ if( $ENV{PERL_CORE} ) {
+ chdir 't';
+ @INC = ('../lib', 'lib/');
+ }
+ else {
+ unshift @INC, 't/lib/';
+ }
}
+chdir 't';
BEGIN {
1 while unlink 'ecmdfile';
}
{
- use vars qw( *CORE::GLOBAL::exit );
-
# bad neighbor, but test_f() uses exit()
+ *CORE::GLOBAL::exit = ''; # quiet 'only once' warning.
*CORE::GLOBAL::exit = sub { return @_ };
use_ok( 'ExtUtils::Command' );
# concatenate this file with itself
# be extra careful the regex doesn't match itself
+ use TieOut;
my $out = tie *STDOUT, 'TieOut';
my $self = $0;
unless (-f $self) {
1 while unlink 'ecmdfile';
File::Path::rmtree( 'ecmddir' );
}
-
-package TieOut;
-
-sub TIEHANDLE {
- bless( \(my $text), $_[0] );
-}
-
-sub PRINT {
- ${ $_[0] } .= join($/, @_);
-}
-#!./perl
+#!/usr/bin/perl
BEGIN {
- chdir 't' if -d 't';
- unshift @INC, '../lib';
+ if( $ENV{PERL_CORE} ) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
}
+chdir 't';
+
use Config;
use ExtUtils::Embed;
use File::Spec;
-#!./perl -w
+#!/usr/bin/perl -w
print "1..27\n";
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
+ if( $ENV{PERL_CORE} ) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
}
# use warnings;
$^X = $perl;
print "# perl=$perl\n";
-my $runperl = "$perl -x \"-I../../lib\"";
+my $runperl = "$perl \"-I../../lib\"";
$| = 1;
print "not ok $test # $maketest failed: $?\n";
print "# $_" foreach @makeout;
} else {
- print "ok $test\n";
+ print "ok $test - maketest\n";
}
$test++;
-my $regen = `$runperl $package.xs`;
+
+# -x is busted on Win32 < 5.6.1, so we emulate it.
+my $regen;
+if( $^O eq 'MSWin32' && $] <= 5.006001 ) {
+ open(REGENTMP, ">regentmp") or die $!;
+ open(XS, "$package.xs") or die $!;
+ my $saw_shebang;
+ while(<XS>) {
+ $saw_shebang++ if /^#!.*/i ;
+ print REGENTMP $_ if $saw_shebang;
+ }
+ close XS; close REGENTMP;
+ $regen = `$runperl regentmp`;
+ unlink 'regentmp';
+}
+else {
+ $regen = `$runperl -x $package.xs`;
+}
if ($?) {
- print "not ok $test # $runperl $package.xs failed: $?\n";
+ print "not ok $test # $runperl -x $package.xs failed: $?\n";
} else {
- print "ok $test\n";
+ print "ok $test - regen\n";
}
$test++;
"\n#### XS Section:\n" . $XS_constant;
if ($expect eq $regen) {
- print "ok $test\n";
+ print "ok $test - regen worked\n";
} else {
- print "not ok $test\n";
+ print "not ok $test - regen worked\n";
# open FOO, ">expect"; print FOO $expect;
# open FOO, ">regen"; print FOO $regen; close FOO;
}
-#!./perl
+#!/usr/bin/perl -w
+
+BEGIN {
+ if( $ENV{PERL_CORE} ) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+}
+chdir 't';
+
use strict;
use warnings;
# for directories() tests
use File::Basename;
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
-}
-
use Test::More tests => 43;
-use_ok( 'ExtUtils::Installed' );
+BEGIN { use_ok( 'ExtUtils::Installed' ) }
# saves having to qualify package name for class methods
my $ei = bless( {}, 'ExtUtils::Installed' );
is( $ei->_is_under('baz', @under), 1, '... should find file under dir' );
# new
-my $realei = ExtUtils::Installed->new();
+my $realei;
+{
+ # We're going to get warnings about not being able to find install
+ # directories if we're not installed.
+ local $SIG{__WARN__} = sub {
+ warn @_ unless $ENV{PERL_CORE} && $_[0] =~ /^Can't stat/;
+ };
+ $realei = ExtUtils::Installed->new();
+}
isa_ok( $realei, 'ExtUtils::Installed' );
isa_ok( $realei->{Perl}{packlist}, 'ExtUtils::Packlist' );
-#!perl
-
-# 2001-01-14 Tels v0.01
-
-our $VERSION = 0.01;
+#!/usr/bin/perl
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
+ if( $ENV{PERL_CORE} ) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
}
+chdir 't';
use Test::More;
-#!./perl
+#!/usr/bin/perl
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
+ if( $ENV{PERL_CORE} ) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
}
+chdir 't';
use Test::More;
-#!./perl -w
+#!/usr/bin/perl -w
use strict;
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
+ if( $ENV{PERL_CORE} ) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
}
+chdir 't';
use Test::More;
if ($^O =~ /os2/i) {
-#!./perl -w
-
-# 2001-12-16 Tels first version
-# 2002-01-13 Tels 0.02 added some tests for various functions, added Andreas
-# fix to the version test (>= vs ==)
-# 2002-01-14 Tels 0.03 exclude on beos and netware, /i for $^O test
+#!/usr/bin/perl -w
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
+ if( $ENV{PERL_CORE} ) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
}
+chdir 't';
BEGIN {
use Test::More;
###############################################################################
# parse_version
-my $self_name = '../lib/ExtUtils/t/MM_Unix.t';
+my $self_name = $ENV{PERL_CORE} ? '../lib/ExtUtils/t/MM_Unix.t'
+ : 'MM_Unix.t';
is ($t->parse_version($self_name),'0.02',
'parse_version on ourself');
-#!./perl -w
+#!/usr/bin/perl -w
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
+ if( $ENV{PERL_CORE} ) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
}
+chdir 't';
BEGIN {
use Test::More;
-#!perl
+#!/usr/bin/perl
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
+ if( $ENV{PERL_CORE} ) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
}
+chdir 't';
use Test::More;
use Config;
use File::Spec;
use File::Basename;
-
-# Does this mimic ExtUtils::MakeMaker ok?
-{
- @MM::ISA = qw(
- ExtUtils::MM_Unix
- ExtUtils::Liblist::Kid
- ExtUtils::MakeMaker
- );
- # MM package faked up by messy MI entanglement
- package MM;
- sub DESTROY {}
-}
+use ExtUtils::MakeMaker;
require_ok( 'ExtUtils::MM_Win32' );
# test import of $Verbose and &neatvalue
can_ok( 'MM', 'neatvalue' );
+() = $ExtUtils::MM_Win32::Verbose;
+() = $ExtUtils::MakeMaker::Verbose;
is( $ExtUtils::MM_Win32::Verbose, $ExtUtils::MakeMaker::Verbose,
'ExtUtils::MM_Win32 should import $Verbose from ExtUtils::MakeMaker' );
VERSION_FROM => 'TestMM_Win32',
PM => { 'MM_Win32.pm' => 1 },
}, 'MM';
+
+ # XXX Hack until we have a proper init method.
+ # Flesh out some necessary keys in the MM object.
+ foreach my $key (qw(XS C O_FILES H HTMLLIBPODS HTMLSCRIPTPODS
+ MAN1PODS MAN3PODS PARENT_NAME)) {
+ $mm_w32{$key} = '';
+ }
my $s_PM = join( " \\\n\t", sort keys %{$mm_w32->{PM}} );
my $k_PM = join( " \\\n\t", %{$mm_w32->{PM}} );
like( $mm_w32->constants(),
qr/^NAME\ =\ TestMM_Win32\s+VERSION\ =\ 1\.00.+
- MAKEMAKER\ =\ $INC{'ExtUtils\MakeMaker.pm'}\s+
+ MAKEMAKER\ =\ $INC{'ExtUtils/MakeMaker.pm'}\s+
MM_VERSION\ =\ $ExtUtils::MakeMaker::VERSION.+
VERSION_FROM\ =\ TestMM_Win32.+
TO_INST_PM\ =\ \Q$s_PM\E\s+
-#!./perl
+#!/usr/bin/perl
BEGIN {
- chdir 't' if -d 't';
- unshift @INC, '../lib';
+ if( $ENV{PERL_CORE} ) {
+ chdir 't' if -d 't';
+ unshift @INC, '../lib';
+ }
}
+chdir 't';
# these files help the test run
use Test::More tests => 31;
}
# use module, import functions
-use_ok( 'ExtUtils::Manifest',
- qw( mkmanifest manicheck filecheck fullcheck maniread manicopy) );
+BEGIN { use_ok( 'ExtUtils::Manifest',
+ qw( mkmanifest manicheck filecheck fullcheck maniread manicopy) ); }
my $cwd = Cwd::getcwd();
is( $res, 'bar', 'bar reported as new' );
# now quiet the warning that bar was added and test again
-use vars qw($ExtUtils::Manifest::Quiet);
-$ExtUtils::Manifest::Quiet = 1;
+{ package ExtUtils::Manifest; use vars qw($Quiet); $Quiet = 1; }
($res, $warn) = catch_warning( \&ExtUtils::Manifest::skipcheck );
cmp_ok( $warn, ,'eq', '', 'disabled warnings' );
'carped about none' );
# tell ExtUtils::Manifest to use a different file
-use vars qw($ExtUtils::Manifest::MANIFEST);
-$ExtUtils::Manifest::MANIFEST = 'albatross';
+{ package ExtUtils::Manifest;
+ use vars qw($MANIFEST);
+ $MANIFEST = 'albatross';
+}
($res, $warn) = catch_warning( \&mkmanifest );
like( $warn, qr/Added to albatross: /, 'using a new manifest file' );
-#!./perl -w
+#!/usr/bin/perl -w
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
+ if( $ENV{PERL_CORE} ) {
+ chdir 't';
+ @INC = ('../lib', 'lib/');
+ }
+ else {
+ unshift @INC, 't/lib/';
+ }
}
+chdir 't';
use vars qw( $required );
use Test::More tests => 18;
-use_ok( 'ExtUtils::Mkbootstrap' );
+BEGIN { use_ok( 'ExtUtils::Mkbootstrap' ) }
# Mkbootstrap makes a backup copy of "$_[0].bs" if it exists and is non-zero
my $file_is_ready;
Mkbootstrap('fakeboot');
ok( !( -f 'fakeboot.bso' ), 'Mkbootstrap should not backup an empty file' );
-
+use TieOut;
my $out = tie *STDOUT, 'TieOut';
# with $Verbose set, it should print status messages about libraries
close OUT;
# if $DynaLoader::bscode is set, write its contents to the file
- # localize the variable to prevent "used only once"
- local $DynaLoader::bscode;
+ local $DynaLoader::bscode;
$DynaLoader::bscode = 'Wall';
$ExtUtils::Mkbootstrap::Verbose = 0;
# clean things up, even on VMS
1 while unlink(qw( mkboot.bso boot_BS dasboot.bs .bs ));
}
-
-package TieOut;
-
-sub TIEHANDLE {
- bless( \(my $scalar), $_[0]);
-}
-
-sub PRINT {
- my $self = shift;
- $$self .= join('', @_);
-}
-
-sub read {
- my $self = shift;
- return substr($$self, 0, length($$self), '');
-}
-#!./perl
+#!/usr/bin/perl -w
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
+ if( $ENV{PERL_CORE} ) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
}
+chdir 't';
use Test::More tests => 34;
# test FIRSTKEY and NEXTKEY
SKIP: {
$pl->{data}{bar} = 'baz';
- skip('not enough keys to test FIRSTKEY', 2) unless %{ $pl->{data} } > 2;
+ skip('not enough keys to test FIRSTKEY', 2)
+ unless keys %{ $pl->{data} } > 2;
# get the first and second key
my ($first, $second) = keys %{ $pl->{data} };
BEGIN {
if( $ENV{PERL_CORE} ) {
chdir 't';
- @INC = '../lib';
+ @INC = ('../lib', 'lib/');
+ }
+ else {
+ unshift @INC, 't/lib/';
}
}
chdir 't';
-use Test::More tests => 1;
+use Test::More tests => 2;
mkdir 'hints';
-my $hint = $^O;
-open(HINT, ">hints/$hint.pl") || die "Can't write dummy hints file: $!";
+my $hint_file = "hints/$^O.pl";
+open(HINT, ">$hint_file") || die "Can't write dummy hints file $hint_file: $!";
print HINT <<'CLOO';
$self->{CCFLAGS} = 'basset hounds got long ears';
CLOO
close HINT;
+use TieOut;
use ExtUtils::MakeMaker;
+
+my $out = tie *STDERR, 'TieOut';
my $mm = bless {}, 'ExtUtils::MakeMaker';
$mm->check_hints;
is( $mm->{CCFLAGS}, 'basset hounds got long ears' );
+is( $out->read, "Processing hints file $hint_file\n" );
+
+package Catch;
END {
-#!./perl
+#!/usr/bin/perl -w
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
+ if( $ENV{PERL_CORE} ) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
}
+chdir 't';
use Test::More tests => 3;
-my @blib_paths = grep { /blib/ } @INC;
+BEGIN {
+ # non-core tests will have blib in their path. We remove it
+ # and just use the one in lib/.
+ unless( $ENV{PERL_CORE} ) {
+ @INC = grep !/blib/, @INC;
+ unshift @INC, '../lib';
+ }
+}
+
+my @blib_paths = grep /blib/, @INC;
is( @blib_paths, 0, 'No blib dirs yet in @INC' );
use_ok( 'ExtUtils::testlib' );
package ExtUtils::testlib;
-$VERSION = substr q$Revision: 1.11 $, 10;
-# $Id: testlib.pm,v 1.11 1996/05/31 08:27:07 k Exp $
+$VERSION = 1.12_01;
use lib qw(blib/arch blib/lib);
1;
=head1 SYNOPSIS
-C<use ExtUtils::testlib;>
+ use ExtUtils::testlib;
=head1 DESCRIPTION
+B<THIS MODULE IS OBSOLETE!> Use blib instead.
+
After an extension has been built and before it is installed it may be
desirable to test it bypassing C<make test>. By adding
--- /dev/null
+package TieOut;
+
+sub TIEHANDLE {
+ bless( \(my $scalar), $_[0]);
+}
+
+sub PRINT {
+ my $self = shift;
+ $$self .= join('', @_);
+}
+
+sub read {
+ my $self = shift;
+ return substr($$self, 0, length($$self), '');
+}
+
+1;