+6.52 Sat May 30 11:22:04 PDT 2009
+ Docs
+ * Documented CONFIGURE_REQUIRES (Alexandr Ciornii)
+ * Modnerized the docs for PREREQ_PM
+
+
+6.51_04 Sun May 24 14:04:11 PDT 2009
+ Other
+ * All work on INSTALLHTML* has been reverted pending a fix for
+ [rt.cpan.org 45600]
+
+
+6.51_03 Sat May 23 22:38:26 PDT 2009
+ Bug Fixes
+ * Building *.C files was broken in 6.37. [rt.cpan.org 45557]
+ Thanks to Rajesh Mandalemula for spotting it.
+ New Features
+ * Optional parameter CONFIGURE_REQUIRES was added, to control
+ this section in META.yml (Alexandr Ciornii)
+
+
+6.51_02 Mon Apr 13 21:19:56 PDT 2009
+ Bug Fixes
+ * Fix a minor bug with the new PERM_DIR stuff which caused EUI to think
+ PERM_DIR was an install skip file.
+ * A Win32 function call in the last alpha broke Win32 builds.
+
+
+6.51_01 Fri Apr 10 14:30:27 PDT 2009
+ New Features
+ * Module installation will not be stopped by a broken Pod::Man.
+ Man pages will just not be installed.
+ [rt.cpan.org 43546] (Jesse Vincent)
+ * vim swap files, *.swp, will now be ignored by MakeMaker.
+ * Added PERM_DIR to control permissions on directories.
+ [rt.cpan.org 3927] (Rajesh Mandalemula)
+
+ Feature Changes
+ * Modules in PREREQ_PM are no longer loaded in order to figure out
+ their version. parse_version() is used instead.
+ [rt.cpan.org 44646]
+ * PPD files generated with "make ppd" now use the new REQUIRES key
+ rather than the now deprecated DEPENDENCY.
+ [rt.cpan.org 25179] (GAAS)
+ * PPD files no longer contain the deprecated OS tag.
+ * fixin is a bit less restrictive allowing things like
+ #!perl5.8.8 and #!perl-debug [rt.cpan.org 29442]
+ * Remove the unused perm_rw() and perm_rwx() methods.
+
+ Bug Fixes
+ * On 5.10 "make ppd" would generate the wrong ARCHITECTURE saying the
+ version is 5.1 instead of 5.10.
+ * Our pod2man emulation now requires an argument to --perm_rw.
+ [rt.cpan.org 35190] (imacat)
+ * DISTVNAME was documented as a WriteMakefile() param but you'd
+ get a warning if you tried to use it. [rt.cpan.org 43217]
+ * Better support for parallel make installs.
+ [rt.cpan.org 32758] (Brendan O'Dea)
+ * parse_version() will now skip uses of $VERSION in conditions
+ [rt.cpan.org 9452] (jc@unser.net)
+ * The architecture mismatch warning could show up on Win32 due
+ to long vs short filenames being used to compare.
+ [rt.cpan.org 33532] (DAGOLDEN)
+ * maybe_command() will recognize Windows executables in
+ /cygdrive on Cygwin [rt.cpan.org 16375] (PJF)
+ * parse_version() will now look for the first use of $VERSION
+ that results in $VERSION being set.
+
+ Test Fixes
+ * basic.t will not leave a "bin" environment variable defined on VMS.
+ [rt.cpan.org 42150] (John E. Malmberg)
+ * Made the tests work ok on systems whose makes assume that files which
+ have the same mod time are out of date. This is often the case for
+ the tests which generate files and run make rapidly.
+ [rt.cpan.org 29955] (Ken Hirsch)
+ * skip test numbers were wrong on VMS in t/basic.t
+ [rt.cpan.org 43511] (John E. Malmberg)
+
+ Portability
+ * Removed a few hard coded uses of the "false" command.
+ [rt.cpan.org 44504]
+
+ VMS
+ * Fixed a few calls to catfile() that should be catdir().
+ (John E. Malmberg)
+ * Override catdir() and catfile() to expand macros. This is normally done
+ inside File::Spec::VMS but is really a MakeMaker-only thing.
+ (John E. Malmberg)
+
+ Other
+ * Remove ExtUtils::MakeMaker::bytes and vmsish which are unused and
+ seem to never have been used.
+ * Repository now on github.
+
+
+6.50 Sun Mar 22 12:28:06 PDT 2009
+ Windows
+ * Remove the special checks for compilers that need a "manifest". Instead,
+ the code will just be a no-op if there's no manifest. Or something.
+ I dunno, I'm hoping Jan and Steve know what they're doing.
+ [rt.perl.org 61492]
+
+
+6.49_01 Thu Feb 19 17:06:36 PST 2009
+ New OS Support
+ * Recognize "Haiku", a resurrection of BeOS.
+
+ New Features
+ - META.yml now includes ExtUtils::MakeMaker in build_requires by
+ default.
+
+ Test Fixes
+ - ExtUtils::Install 1.51 changed its output breaking some tests that
+ were looking for /^Writing/ [rt.cpan.org 42927]
+
+ Bug Fixes
+ - Upgrade bundled modules: ExtUtils::Install 1.52, ExtUtils::Command
+ 1.16, ExtUtils::Manifest 1.56.
+
+ Other
+ - The MakeMaker repository moved slightly. Changed the metadata to
+ reflect this. [rt.cpan.org 41571]
+
+
6.48 Mon Oct 20 11:18:13 PDT 2008
Test Fixes
* Protect against stray environment variables effecting the tests.
our @EXPORT = qw(test_harness pod2man perllocal_install uninstall
warn_if_old_packlist);
-our $VERSION = '6.50';
+our $VERSION = '6.52';
my $Is_VMS = $^O eq 'VMS';
If no arguments are given to pod2man it will read from @ARGV.
+If Pod::Man is unavailable, this function will warn and return undef.
+
=cut
sub pod2man {
local @ARGV = @_ ? @_ : @ARGV;
- require Pod::Man;
+ {
+ local $@;
+ if( !eval { require Pod::Man } ) {
+ warn "Pod::Man is not available: $@".
+ "Man pages will not be generated during this install.\n";
+ return undef;
+ }
+ }
require Getopt::Long;
# We will cheat and just use Getopt::Long. We fool it by putting
'section|s=s', 'release|r=s', 'center|c=s',
'date|d=s', 'fixed=s', 'fixedbold=s', 'fixeditalic=s',
'fixedbolditalic=s', 'official|o', 'quotes|q=s', 'lax|l',
- 'name|n=s', 'perm_rw:i'
+ 'name|n=s', 'perm_rw=i'
);
# If there's no files, don't bother going further.
$parser->parse_from_file($pod, $man)
or do { warn("Could not install $man\n"); next };
- if (length $options{perm_rw}) {
+ if (exists $options{perm_rw}) {
chmod(oct($options{perm_rw}), $man)
or do { warn("chmod $options{perm_rw} $man: $!\n"); next };
}
use strict;
-our $VERSION = '6.50';
+our $VERSION = '6.52';
use File::Spec;
require ExtUtils::Liblist::Kid;
# Broken out of MakeMaker from version 4.11
use strict;
-our $VERSION = 6.50;
+our $VERSION = 6.52;
use Config;
use Cwd 'cwd';
use strict;
use ExtUtils::MakeMaker::Config;
-our $VERSION = '6.50';
+our $VERSION = '6.52';
require ExtUtils::Liblist;
require ExtUtils::MakeMaker;
package ExtUtils::MM_AIX;
use strict;
-our $VERSION = '6.50';
+our $VERSION = '6.52';
require ExtUtils::MM_Unix;
our @ISA = qw(ExtUtils::MM_Unix);
package ExtUtils::MM_Any;
use strict;
-our $VERSION = '6.50';
+our $VERSION = '6.52';
use Carp;
use File::Spec;
+use File::Basename;
BEGIN { our @ISA = qw(File::Spec); }
# We need $Verbose
my $make_frag = $mm->dir_target(@directories);
Generates targets to create the specified directories and set its
-permission to 0755.
+permission to PERM_DIR.
Because depending on a directory to just ensure it exists doesn't work
too well (the modified time changes too often) dir_target() creates a
$make .= sprintf <<'MAKE', ($dir) x 7;
%s$(DFSEP).exists :: Makefile.PL
$(NOECHO) $(MKPATH) %s
- $(NOECHO) $(CHMOD) 755 %s
+ $(NOECHO) $(CHMOD) $(PERM_DIR) %s
$(NOECHO) $(TOUCH) %s$(DFSEP).exists
MAKE
meta-spec
);
+ my $configure_requires;
+ if( $self->{CONFIGURE_REQUIRES} and ref($self->{CONFIGURE_REQUIRES}) eq 'HASH' ) {
+ $configure_requires = $self->{CONFIGURE_REQUIRES};
+ } else {
+ $configure_requires = {
+ 'ExtUtils::MakeMaker' => 0,
+ };
+ }
+
my %meta = (
name => $self->{DISTNAME},
version => $self->{VERSION},
license => $self->{LICENSE} || 'unknown',
distribution_type => $self->{PM} ? 'module' : 'script',
- configure_requires => {
- 'ExtUtils::MakeMaker' => 0
- },
+ configure_requires => $configure_requires,
build_requires => {
'ExtUtils::MakeMaker' => 0
}
-=head3 init_others I<Abstract>
+=head3 init_others
$MM->init_others();
TEST_F Test for a file's existence
CP Copy a file
MV Move a file
- CHMOD Change permissions on a
- file
+ CHMOD Change permissions on a file
+ FALSE Exit with non-zero
+ TRUE Exit with zero
UMASK_NULL Nullify umask
DEV_NULL Suppress all command output
+=cut
+
+sub init_others {
+ my $self = shift;
+
+ $self->{ECHO} ||= $self->oneliner('print qq{@ARGV}', ['-l']);
+ $self->{ECHO_N} ||= $self->oneliner('print qq{@ARGV}');
+
+ $self->{TOUCH} ||= $self->oneliner('touch', ["-MExtUtils::Command"]);
+ $self->{CHMOD} ||= $self->oneliner('chmod', ["-MExtUtils::Command"]);
+ $self->{RM_F} ||= $self->oneliner('rm_f', ["-MExtUtils::Command"]);
+ $self->{RM_RF} ||= $self->oneliner('rm_rf', ["-MExtUtils::Command"]);
+ $self->{TEST_F} ||= $self->oneliner('test_f', ["-MExtUtils::Command"]);
+ $self->{FALSE} ||= $self->oneliner('exit 1');
+ $self->{TRUE} ||= $self->oneliner('exit 0');
+
+ $self->{MKPATH} ||= $self->oneliner('mkpath', ["-MExtUtils::Command"]);
+
+ $self->{CP} ||= $self->oneliner('cp', ["-MExtUtils::Command"]);
+ $self->{MV} ||= $self->oneliner('mv', ["-MExtUtils::Command"]);
+
+ $self->{MOD_INSTALL} ||=
+ $self->oneliner(<<'CODE', ['-MExtUtils::Install']);
+install([ from_to => {@ARGV}, verbose => '$(VERBINST)', uninstall_shadows => '$(UNINST)', dir_mode => '$(PERM_DIR)' ]);
+CODE
+ $self->{DOC_INSTALL} ||= $self->oneliner('perllocal_install', ["-MExtUtils::Command::MM"]);
+ $self->{UNINSTALL} ||= $self->oneliner('uninstall', ["-MExtUtils::Command::MM"]);
+ $self->{WARN_IF_OLD_PACKLIST} ||=
+ $self->oneliner('warn_if_old_packlist', ["-MExtUtils::Command::MM"]);
+ $self->{FIXIN} ||= $self->oneliner('MY->fixin(shift)', ["-MExtUtils::MY"]);
+ $self->{EQUALIZE_TIMESTAMP} ||= $self->oneliner('eqtime', ["-MExtUtils::Command"]);
+
+ $self->{UNINST} ||= 0;
+ $self->{VERBINST} ||= 0;
+
+ $self->{FIRST_MAKEFILE} ||= $self->{MAKEFILE} || 'Makefile';
+ $self->{MAKEFILE} ||= $self->{FIRST_MAKEFILE};
+ $self->{MAKEFILE_OLD} ||= $self->{MAKEFILE}.'.old';
+ $self->{MAKE_APERL_FILE} ||= $self->{MAKEFILE}.'.aperl';
+
+ # Not everybody uses -f to indicate "use this Makefile instead"
+ $self->{USEMAKEFILE} ||= '-f';
+
+ # Some makes require a wrapper around macros passed in on the command
+ # line.
+ $self->{MACROSTART} ||= '';
+ $self->{MACROEND} ||= '';
+
+ $self->{SHELL} ||= $Config{sh};
+
+ # UMASK_NULL is not used by MakeMaker but some CPAN modules
+ # make use of it.
+ $self->{UMASK_NULL} ||= "umask 0";
+
+ # Not the greatest default, but its something.
+ $self->{DEV_NULL} ||= "> /dev/null 2>&1";
+
+ $self->{NOOP} ||= '$(TRUE)';
+ $self->{NOECHO} = '@' unless defined $self->{NOECHO};
+
+ $self->{LD_RUN_PATH} = "";
+
+ # Compute EXTRALIBS, BSLOADLIBS and LDLOADLIBS from $self->{LIBS}
+ # Lets look at $self->{LIBS} carefully: It may be an anon array, a string or
+ # undefined. In any case we turn it into an anon array:
+
+ # May check $Config{libs} too, thus not empty.
+ $self->{LIBS} = !defined $self->{LIBS} ? [''] :
+ !ref $self->{LIBS} ? [$self->{LIBS}] :
+ $self->{LIBS} ;
+
+ foreach my $libs ( @{$self->{LIBS}} ){
+ $libs =~ s/^\s*(.*\S)\s*$/$1/; # remove leading and trailing whitespace
+ my(@libs) = $self->extliblist($libs);
+ if ($libs[0] or $libs[1] or $libs[2]){
+ # LD_RUN_PATH now computed by ExtUtils::Liblist
+ ($self->{EXTRALIBS}, $self->{BSLOADLIBS},
+ $self->{LDLOADLIBS}, $self->{LD_RUN_PATH}) = @libs;
+ last;
+ }
+ }
+
+ if ( $self->{OBJECT} ) {
+ $self->{OBJECT} =~ s!\.o(bj)?\b!\$(OBJ_EXT)!g;
+ } else {
+ # init_dirscan should have found out, if we have C files
+ $self->{OBJECT} = "";
+ $self->{OBJECT} = '$(BASEEXT)$(OBJ_EXT)' if @{$self->{C}||[]};
+ }
+ $self->{OBJECT} =~ s/\n+/ \\\n\t/g;
+
+ $self->{BOOTDEP} = (-f "$self->{BASEEXT}_BS") ? "$self->{BASEEXT}_BS" : "";
+ $self->{PERLMAINCC} ||= '$(CC)';
+ $self->{LDFROM} = '$(OBJECT)' unless $self->{LDFROM};
+
+ # Sanity check: don't define LINKTYPE = dynamic if we're skipping
+ # the 'dynamic' section of MM. We don't have this problem with
+ # 'static', since we either must use it (%Config says we can't
+ # use dynamic loading) or the caller asked for it explicitly.
+ if (!$self->{LINKTYPE}) {
+ $self->{LINKTYPE} = $self->{SKIPHASH}{'dynamic'}
+ ? 'static'
+ : ($Config{usedl} ? 'dynamic' : 'static');
+ }
+
+ return 1;
+}
+
+
+=head3 tools_other
+
+ my $make_frag = $MM->tools_other;
+
+Returns a make fragment containing definitions for the macros init_others()
+initializes.
+
+=cut
+
+sub tools_other {
+ my($self) = shift;
+ my @m;
+
+ # We set PM_FILTER as late as possible so it can see all the earlier
+ # on macro-order sensitive makes such as nmake.
+ for my $tool (qw{ SHELL CHMOD CP MV NOOP NOECHO RM_F RM_RF TEST_F TOUCH
+ UMASK_NULL DEV_NULL MKPATH EQUALIZE_TIMESTAMP
+ FALSE TRUE
+ ECHO ECHO_N
+ UNINST VERBINST
+ MOD_INSTALL DOC_INSTALL UNINSTALL
+ WARN_IF_OLD_PACKLIST
+ MACROSTART MACROEND
+ USEMAKEFILE
+ PM_FILTER
+ FIXIN
+ } )
+ {
+ next unless defined $self->{$tool};
+ push @m, "$tool = $self->{$tool}\n";
+ }
+
+ return join "", @m;
+}
+
=head3 init_DIRFILESEP I<Abstract>
}
+=head3 arch_check
+
+ my $arch_ok = $mm->arch_check(
+ $INC{"Config.pm"},
+ File::Spec->catfile($Config{archlibexp}, "Config.pm")
+ );
+
+A sanity check that what Perl thinks the architecture is and what
+Config thinks the architecture is are the same. If they're not it
+will return false and show a diagnostic message.
+
+When building Perl it will always return true, as nothing is installed
+yet.
+
+The interface is a bit odd because this is the result of a
+quick refactoring. Don't rely on it.
+
+=cut
+
+sub arch_check {
+ my $self = shift;
+ my($pconfig, $cconfig) = @_;
+
+ return 1 if $self->{PERL_SRC};
+
+ my($pvol, $pthinks) = $self->splitpath($pconfig);
+ my($cvol, $cthinks) = $self->splitpath($cconfig);
+
+ $pthinks = $self->canonpath($pthinks);
+ $cthinks = $self->canonpath($cthinks);
+
+ my $ret = 1;
+ if ($pthinks ne $cthinks) {
+ print "Have $pthinks\n";
+ print "Want $cthinks\n";
+
+ $ret = 0;
+
+ my $arch = (grep length, $self->splitdir($pthinks))[-1];
+
+ print STDOUT <<END unless $self->{UNINSTALLED_PERL};
+Your perl and your Config.pm seem to have different ideas about the
+architecture they are running on.
+Perl thinks: [$arch]
+Config says: [$Config{archname}]
+This may or may not cause problems. Please check your installation of perl
+if you have problems building this extension.
+END
+ }
+
+ return $ret;
+}
+
=head2 File::Spec wrappers
require ExtUtils::MM_Unix;
our @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
-our $VERSION = '6.50';
+our $VERSION = '6.52';
=item os_flavor
use ExtUtils::MakeMaker::Config;
use File::Spec;
-require ExtUtils::MM_Any;
require ExtUtils::MM_Unix;
-our @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
+require ExtUtils::MM_Win32;
+our @ISA = qw( ExtUtils::MM_Unix );
-our $VERSION = '6.50';
+our $VERSION = '6.52';
=head1 NAME
$self->{EXPORT_LIST} ||= '';
}
+=item maybe_command
+
+If our path begins with F</cygdrive/> then we use C<ExtUtils::MM_Win32>
+to determine if it may be a command. Otherwise we use the tests
+from C<ExtUtils::MM_Unix>.
+
+=cut
+
+sub maybe_command {
+ my ($self, $file) = @_;
+
+ if ($file =~ m{^/cygdrive/}i) {
+ return ExtUtils::MM_Win32->maybe_command($file);
+ }
+
+ return $self->SUPER::maybe_command($file);
+}
+
=back
=cut
use strict;
-our $VERSION = 6.50;
+our $VERSION = 6.52;
require ExtUtils::MM_Any;
require ExtUtils::MM_Unix;
our @ISA = qw( ExtUtils::MM_Unix );
}
-our $VERSION = '6.50';
+our $VERSION = '6.52';
=head1 NAME
use strict;
-our $VERSION = 6.50;
+our $VERSION = 6.52;
sub new {
die <<'UNSUPPORTED';
use ExtUtils::MakeMaker::Config;
use File::Basename;
-our $VERSION = '6.50';
+our $VERSION = '6.52';
require ExtUtils::MM_Win32;
our @ISA = qw(ExtUtils::MM_Win32);
use ExtUtils::MakeMaker qw(neatvalue);
use File::Spec;
-our $VERSION = '6.50';
+our $VERSION = '6.52';
require ExtUtils::MM_Any;
require ExtUtils::MM_Unix;
package ExtUtils::MM_QNX;
use strict;
-our $VERSION = '6.50';
+our $VERSION = '6.52';
require ExtUtils::MM_Unix;
our @ISA = qw(ExtUtils::MM_Unix);
package ExtUtils::MM_UWIN;
use strict;
-our $VERSION = 6.50;
+our $VERSION = 6.52;
require ExtUtils::MM_Unix;
our @ISA = qw(ExtUtils::MM_Unix);
# If we make $VERSION an our variable parse_version() breaks
use vars qw($VERSION);
-$VERSION = '6.50';
+$VERSION = '6.52';
require ExtUtils::MM_Any;
our @ISA = qw(ExtUtils::MM_Any);
push @m, qq{
.C\$(OBJ_EXT):
- $command \$*.C
+ $command $flags \$*.C
} if !$Is{OS2} and !$Is{Win32} and !$Is{Dos}; #Case-specific
return join "", @m;
PERLRUN FULLPERLRUN ABSPERLRUN
PERLRUNINST FULLPERLRUNINST ABSPERLRUNINST
PERL_CORE
- PERM_RW PERM_RWX
+ PERM_DIR PERM_RW PERM_RWX
) )
{
# Now look (in reverse) for interpreter in absolute PATH (unless perl).
my $interpreter;
- if ( $cmd eq "perl" ) {
+ if ( $cmd =~ m{^perl(?:\z|[^a-z])} ) {
if ( $Config{startperl} =~ m,^\#!.*/perl, ) {
$interpreter = $Config{startperl};
$interpreter =~ s,^\#!,,;
}
else {
my (@absdirs)
- = reverse grep { $self->file_name_is_absolute } $self->path;
+ = reverse grep { $self->file_name_is_absolute($_) } $self->path;
$interpreter = '';
foreach my $dir (@absdirs) {
if ($txt =~ /Extracting \S+ \(with variable substitutions/) {
($pl_files{$name} = $name) =~ s/[._]pl\z//i ;
}
- else {
+ else {
$pm{$name} = $self->catfile($self->{INST_LIBDIR},$name);
}
} elsif ($name =~ /\.(p[ml]|pod)\z/){
# Set up names of manual pages to generate from pods
foreach my $man (qw(MAN1 MAN3)) {
- if ( $self->{"${man}PODS"}
+ if ( $self->{"${man}PODS"}
or $self->{"INSTALL${man}DIR"} =~ /^(none|\s*)$/
) {
$self->{"${man}PODS"} ||= {};
else {
my $init_method = "init_${man}PODS";
$self->$init_method();
- }
+ }
}
}
return;
}
return if /\#/;
- return if /~$/; # emacs temp files
- return if /,v$/; # RCS files
+ return if /~$/; # emacs temp files
+ return if /,v$/; # RCS files
+ return if m{\.swp$}; # vim swap files
my $path = $File::Find::name;
my $prefix = $self->{INST_LIBDIR};
# uninstalled Perl outside of Perl build tree
my $lib;
for my $dir (@INC) {
- $lib = $dir, last if -e $self->catdir($dir, "Config.pm");
+ $lib = $dir, last if -e $self->catfile($dir, "Config.pm");
}
if ($lib) {
# Win32 puts its header files in /perl/src/lib/CORE.
# Unix leaves them in /perl/src.
my $inc = $Is{Win32} ? $self->catdir($lib, "CORE" )
: dirname $lib;
- if (-e $self->catdir($inc, "perl.h")) {
+ if (-e $self->catfile($inc, "perl.h")) {
$self->{PERL_LIB} = $lib;
$self->{PERL_ARCHLIB} = $lib;
$self->{PERL_INC} = $inc;
sub init_others { # --- Initialize Other Attributes
my($self) = shift;
- $self->{LD} ||= 'ld';
-
- # Compute EXTRALIBS, BSLOADLIBS and LDLOADLIBS from $self->{LIBS}
- # Lets look at $self->{LIBS} carefully: It may be an anon array, a string or
- # undefined. In any case we turn it into an anon array:
-
- # May check $Config{libs} too, thus not empty.
- $self->{LIBS} = [$self->{LIBS}] unless ref $self->{LIBS};
-
- $self->{LIBS} = [''] unless @{$self->{LIBS}} && defined $self->{LIBS}[0];
- $self->{LD_RUN_PATH} = "";
-
- foreach my $libs ( @{$self->{LIBS}} ){
- $libs =~ s/^\s*(.*\S)\s*$/$1/; # remove leading and trailing whitespace
- my(@libs) = $self->extliblist($libs);
- if ($libs[0] or $libs[1] or $libs[2]){
- # LD_RUN_PATH now computed by ExtUtils::Liblist
- ($self->{EXTRALIBS}, $self->{BSLOADLIBS},
- $self->{LDLOADLIBS}, $self->{LD_RUN_PATH}) = @libs;
- last;
- }
- }
-
- if ( $self->{OBJECT} ) {
- $self->{OBJECT} =~ s!\.o(bj)?\b!\$(OBJ_EXT)!g;
- } else {
- # init_dirscan should have found out, if we have C files
- $self->{OBJECT} = "";
- $self->{OBJECT} = '$(BASEEXT)$(OBJ_EXT)' if @{$self->{C}||[]};
- }
- $self->{OBJECT} =~ s/\n+/ \\\n\t/g;
- $self->{BOOTDEP} = (-f "$self->{BASEEXT}_BS") ? "$self->{BASEEXT}_BS" : "";
- $self->{PERLMAINCC} ||= '$(CC)';
- $self->{LDFROM} = '$(OBJECT)' unless $self->{LDFROM};
-
- # Sanity check: don't define LINKTYPE = dynamic if we're skipping
- # the 'dynamic' section of MM. We don't have this problem with
- # 'static', since we either must use it (%Config says we can't
- # use dynamic loading) or the caller asked for it explicitly.
- if (!$self->{LINKTYPE}) {
- $self->{LINKTYPE} = $self->{SKIPHASH}{'dynamic'}
- ? 'static'
- : ($Config{usedl} ? 'dynamic' : 'static');
- };
-
- $self->{NOOP} ||= '$(SHELL) -c true';
- $self->{NOECHO} = '@' unless defined $self->{NOECHO};
-
- $self->{FIRST_MAKEFILE} ||= $self->{MAKEFILE} || 'Makefile';
- $self->{MAKEFILE} ||= $self->{FIRST_MAKEFILE};
- $self->{MAKEFILE_OLD} ||= $self->{MAKEFILE}.'.old';
- $self->{MAKE_APERL_FILE} ||= $self->{MAKEFILE}.'.aperl';
-
- # Some makes require a wrapper around macros passed in on the command
- # line.
- $self->{MACROSTART} ||= '';
- $self->{MACROEND} ||= '';
-
- # Not everybody uses -f to indicate "use this Makefile instead"
- $self->{USEMAKEFILE} ||= '-f';
-
- $self->{SHELL} ||= $Config{sh} || '/bin/sh';
-
$self->{ECHO} ||= 'echo';
$self->{ECHO_N} ||= 'echo -n';
$self->{RM_F} ||= "rm -f";
$self->{CP} ||= "cp";
$self->{MV} ||= "mv";
$self->{CHMOD} ||= "chmod";
- $self->{MKPATH} ||= '$(ABSPERLRUN) "-MExtUtils::Command" -e mkpath';
- $self->{EQUALIZE_TIMESTAMP} ||=
- '$(ABSPERLRUN) "-MExtUtils::Command" -e eqtime';
-
- $self->{UNINST} ||= 0;
- $self->{VERBINST} ||= 0;
- $self->{MOD_INSTALL} ||=
- $self->oneliner(<<'CODE', ['-MExtUtils::Install']);
-install({@ARGV}, '$(VERBINST)', 0, '$(UNINST)');
-CODE
- $self->{DOC_INSTALL} ||=
- '$(ABSPERLRUN) "-MExtUtils::Command::MM" -e perllocal_install';
- $self->{UNINSTALL} ||=
- '$(ABSPERLRUN) "-MExtUtils::Command::MM" -e uninstall';
- $self->{WARN_IF_OLD_PACKLIST} ||=
- '$(ABSPERLRUN) "-MExtUtils::Command::MM" -e warn_if_old_packlist';
- $self->{FIXIN} ||=
- q{$(PERLRUN) "-MExtUtils::MY" -e "MY->fixin(shift)"};
-
- $self->{UMASK_NULL} ||= "umask 0";
- $self->{DEV_NULL} ||= "> /dev/null 2>&1";
+ $self->{FALSE} ||= 'false';
+ $self->{TRUE} ||= 'true';
+
+ $self->{LD} ||= 'ld';
+
+ $self->SUPER::init_others(@_);
+
+ # After SUPER::init_others so $Config{shell} has a
+ # chance to get set.
+ $self->{SHELL} ||= '/bin/sh';
return 1;
}
sub init_PERM {
my($self) = shift;
+ $self->{PERM_DIR} = 755 unless defined $self->{PERM_DIR};
$self->{PERM_RW} = 644 unless defined $self->{PERM_RW};
$self->{PERM_RWX} = 755 unless defined $self->{PERM_RWX};
my(@m);
push @m, q{
-install :: all pure_install doc_install
+install :: pure_install doc_install
$(NOECHO) $(NOOP)
-install_perl :: all pure_perl_install doc_perl_install
+install_perl :: pure_perl_install doc_perl_install
$(NOECHO) $(NOOP)
-install_site :: all pure_site_install doc_site_install
+install_site :: pure_site_install doc_site_install
$(NOECHO) $(NOOP)
-install_vendor :: all pure_vendor_install doc_vendor_install
+install_vendor :: pure_vendor_install doc_vendor_install
$(NOECHO) $(NOOP)
pure_install :: pure_$(INSTALLDIRS)_install
doc__install : doc_site_install
$(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
-pure_perl_install ::
+pure_perl_install :: all
$(NOECHO) $(MOD_INSTALL) \
read }.$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q{ \
write }.$self->catfile('$(DESTINSTALLARCHLIB)','auto','$(FULLEXT)','.packlist').q{ \
}.$self->catdir('$(SITEARCHEXP)','auto','$(FULLEXT)').q{
-pure_site_install ::
+pure_site_install :: all
$(NOECHO) $(MOD_INSTALL) \
read }.$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').q{ \
write }.$self->catfile('$(DESTINSTALLSITEARCH)','auto','$(FULLEXT)','.packlist').q{ \
$(NOECHO) $(WARN_IF_OLD_PACKLIST) \
}.$self->catdir('$(PERL_ARCHLIB)','auto','$(FULLEXT)').q{
-pure_vendor_install ::
+pure_vendor_install :: all
$(NOECHO) $(MOD_INSTALL) \
read }.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{ \
write }.$self->catfile('$(DESTINSTALLVENDORARCH)','auto','$(FULLEXT)','.packlist').q{ \
$(INST_MAN1DIR) $(DESTINSTALLVENDORMAN1DIR) \
$(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR)
-doc_perl_install ::
+doc_perl_install :: all
$(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
-$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
-$(NOECHO) $(DOC_INSTALL) \
EXE_FILES "$(EXE_FILES)" \
>> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{
-doc_site_install ::
+doc_site_install :: all
$(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
-$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
-$(NOECHO) $(DOC_INSTALL) \
EXE_FILES "$(EXE_FILES)" \
>> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{
-doc_vendor_install ::
+doc_vendor_install :: all
$(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
-$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
-$(NOECHO) $(DOC_INSTALL) \
$(PERLRUN) Makefile.PL %s
$(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <=="
$(NOECHO) $(ECHO) "==> Please rerun the $(MAKE) command. <=="
- false
+ $(FALSE)
MAKE_FRAG
is. $VERSION should be for all to see, so C<our $VERSION> or plain $VERSION
are okay, but C<my $VERSION> is not.
-parse_version() will try to C<use version> before checking for C<$VERSION> so the following will work.
+parse_version() will try to C<use version> before checking for
+C<$VERSION> so the following will work.
$VERSION = qv(1.2.3);
$inpod = /^=(?!cut)/ ? 1 : /^=cut/ ? 0 : $inpod;
next if $inpod || /^\s*#/;
chop;
- next unless /(?<!\\)([\$*])(([\w\:\']*)\bVERSION)\b.*\=/;
+ next if /^\s*(if|unless)/;
+ next unless m{(?<!\\) ([\$*]) (([\w\:\']*) \bVERSION)\b .* =}x;
my $eval = qq{
package ExtUtils::MakeMaker::_version;
no strict;
local $^W = 0;
$result = eval($eval); ## no critic
warn "Could not eval '$eval' in $parsefile: $@" if $@;
- last;
+ last if defined $result;
}
close $fh;
# We do NOT just update config.h because that is not sufficient.
# An out of date config.h is not fatal but complains loudly!
$(PERL_INC)/config.h: $(PERL_SRC)/config.sh
- -$(NOECHO) $(ECHO) "Warning: $(PERL_INC)/config.h out of date with $(PERL_SRC)/config.sh"; false
+ -$(NOECHO) $(ECHO) "Warning: $(PERL_INC)/config.h out of date with $(PERL_SRC)/config.sh"; $(FALSE)
$(PERL_ARCHLIB)/Config.pm: $(PERL_SRC)/config.sh
$(NOECHO) $(ECHO) "Warning: $(PERL_ARCHLIB)/Config.pm may be out of date with $(PERL_SRC)/config.sh"
}
-=item perm_rw (o)
-
-Returns the attribute C<PERM_RW> or the string C<644>.
-Used as the string that is passed
-to the C<chmod> command to set the permissions for read/writeable files.
-MakeMaker chooses C<644> because it has turned out in the past that
-relying on the umask provokes hard-to-track bug reports.
-When the return value is used by the perl function C<chmod>, it is
-interpreted as an octal value.
-
-=cut
-
-sub perm_rw {
- return shift->{PERM_RW};
-}
-
-=item perm_rwx (o)
-
-Returns the attribute C<PERM_RWX> or the string C<755>,
-i.e. the string that is passed
-to the C<chmod> command to set the permissions for executable files.
-See also perl_rw.
-
-=cut
-
-sub perm_rwx {
- return shift->{PERM_RWX};
-}
-
=item pm_to_blib
Defines target that copies all files in the hash PM to their
pm_to_blib : $(TO_INST_PM)
};
+ # VMS will swallow '' and PM_FILTER is often empty. So use q[]
my $pm_to_blib = $self->oneliner(<<CODE, ['-MExtUtils::Install']);
-pm_to_blib({\@ARGV}, '$autodir', '\$(PM_FILTER)')
+pm_to_blib({\@ARGV}, '$autodir', q[\$(PM_FILTER)], '\$(PERM_DIR)')
CODE
my @cmds = $self->split_command($pm_to_blib, %{$self->{PM}});
sub ppd {
my($self) = @_;
- my $pack_ver = $self->_ppd_version($self->{VERSION});
-
my $abstract = $self->{ABSTRACT} || '';
$abstract =~ s/\n/\\n/sg;
$abstract =~ s/</</g;
$author =~ s/</</g;
$author =~ s/>/>/g;
- my $ppd_xml = sprintf <<'PPD_HTML', $pack_ver, $abstract, $author;
+ my $ppd_xml = sprintf <<'PPD_HTML', $self->{VERSION}, $abstract, $author;
<SOFTPKG NAME="$(DISTNAME)" VERSION="%s">
- <TITLE>$(DISTNAME)</TITLE>
<ABSTRACT>%s</ABSTRACT>
<AUTHOR>%s</AUTHOR>
PPD_HTML
PPD_PERLVERS
}
- foreach my $prereq (sort keys %{$self->{PREREQ_PM}}) {
- my $pre_req = $prereq;
- $pre_req =~ s/::/-/g;
- my $dep_ver = $self->_ppd_version($self->{PREREQ_PM}{$prereq});
- $ppd_xml .= sprintf <<'PPD_OUT', $pre_req, $dep_ver;
- <DEPENDENCY NAME="%s" VERSION="%s" />
-PPD_OUT
+ # Don't add "perl" to requires. perl dependencies are
+ # handles by ARCHITECTURE.
+ my %prereqs = %{$self->{PREREQ_PM}};
+ delete $prereqs{perl};
+
+ # Build up REQUIRE
+ foreach my $prereq (sort keys %prereqs) {
+ my $name = $prereq;
+ $name .= '::' unless $name =~ /::/;
+ my $version = $prereqs{$prereq}+0; # force numification
+
+ my %attrs = ( NAME => $name );
+ $attrs{VERSION} = $version if $version;
+ my $attrs = join " ", map { qq[$_="$attrs{$_}"] } keys %attrs;
+ $ppd_xml .= qq( <REQUIRE $attrs />\n);
}
my $archname = $Config{archname};
# archname did not change from 5.6 to 5.8, but those versions may
# not be not binary compatible so now we append the part of the
# version that changes when binary compatibility may change
- $archname .= "-". substr($Config{version},0,3);
+ $archname .= "-$Config{PERL_REVISION}.$Config{PERL_VERSION}";
}
$ppd_xml .= sprintf <<'PPD_OUT', $archname;
- <OS NAME="$(OSNAME)" />
<ARCHITECTURE NAME="%s" />
PPD_OUT
}
-=item tools_other (o)
-
- my $make_frag = $MM->tools_other;
-
-Returns a make fragment containing definitions for the macros init_others()
-initializes.
-
-=cut
-
-sub tools_other {
- my($self) = shift;
- my @m;
-
- # We set PM_FILTER as late as possible so it can see all the earlier
- # on macro-order sensitive makes such as nmake.
- for my $tool (qw{ SHELL CHMOD CP MV NOOP NOECHO RM_F RM_RF TEST_F TOUCH
- UMASK_NULL DEV_NULL MKPATH EQUALIZE_TIMESTAMP
- ECHO ECHO_N
- UNINST VERBINST
- MOD_INSTALL DOC_INSTALL UNINSTALL
- WARN_IF_OLD_PACKLIST
- MACROSTART MACROEND
- USEMAKEFILE
- PM_FILTER
- FIXIN
- } )
- {
- next unless defined $self->{$tool};
- push @m, "$tool = $self->{$tool}\n";
- }
-
- return join "", @m;
-}
-
=item tool_xsubpp (o)
Determines typemaps, xsubpp version, prototype behaviour.
use File::Basename;
-our $VERSION = '6.50';
+our $VERSION = '6.52';
require ExtUtils::MM_Any;
require ExtUtils::MM_Unix;
# Expand DEST variables.
foreach my $var ($self->installvars) {
my $destvar = 'DESTINSTALL'.$var;
- $self->{$destvar} = File::Spec->eliminate_macros($self->{$destvar});
+ $self->{$destvar} = $self->eliminate_macros($self->{$destvar});
}
}
$self->{NOOP} = 'Continue';
$self->{NOECHO} ||= '@ ';
- $self->{MAKEFILE} ||= $self->{FIRST_MAKEFILE} || 'Descrip.MMS';
+ $self->{MAKEFILE} ||= $self->{FIRST_MAKEFILE} || 'Descrip.MMS';
$self->{FIRST_MAKEFILE} ||= $self->{MAKEFILE};
$self->{MAKE_APERL_FILE} ||= 'Makeaperl.MMS';
$self->{MAKEFILE_OLD} ||= $self->eliminate_macros('$(FIRST_MAKEFILE)_old');
$self->{MACROEND} ||= ')';
$self->{USEMAKEFILE} ||= '/Descrip=';
- $self->{ECHO} ||= '$(ABSPERLRUN) -le "print qq{@ARGV}"';
- $self->{ECHO_N} ||= '$(ABSPERLRUN) -e "print qq{@ARGV}"';
- $self->{TOUCH} ||= '$(ABSPERLRUN) "-MExtUtils::Command" -e touch';
- $self->{CHMOD} ||= '$(ABSPERLRUN) "-MExtUtils::Command" -e chmod';
- $self->{RM_F} ||= '$(ABSPERLRUN) "-MExtUtils::Command" -e rm_f';
- $self->{RM_RF} ||= '$(ABSPERLRUN) "-MExtUtils::Command" -e rm_rf';
- $self->{TEST_F} ||= '$(ABSPERLRUN) "-MExtUtils::Command" -e test_f';
$self->{EQUALIZE_TIMESTAMP} ||= '$(ABSPERLRUN) -we "open F,qq{>>$ARGV[1]};close F;utime(0,(stat($ARGV[0]))[9]+1,$ARGV[1])"';
$self->{MOD_INSTALL} ||=
$self->oneliner(<<'CODE', ['-MExtUtils::Install']);
-install({split(' ',<STDIN>)}, '$(VERBINST)', 0, '$(UNINST)');
+install([ from_to => {split(' ', <STDIN>)}, verbose => '$(VERBINST)', uninstall_shadows => '$(UNINST)', dir_mode => '$(PERM_DIR)' ]);
CODE
- $self->{SHELL} ||= 'Posix';
-
$self->SUPER::init_others;
- # So we can copy files into directories with less fuss
- $self->{CP} = '$(ABSPERLRUN) "-MExtUtils::Command" -e cp';
- $self->{MV} = '$(ABSPERLRUN) "-MExtUtils::Command" -e mv';
+ $self->{SHELL} ||= 'Posix';
$self->{UMASK_NULL} = '! ';
$self->SUPER::init_dist;
- $self->{DISTVNAME} = "$self->{DISTNAME}-$self->{VERSION_SYM}";
+ $self->{DISTVNAME} = "$self->{DISTNAME}-$self->{VERSION_SYM}"
+ unless $self->{ARGS}{DISTVNAME};
+
+ return;
}
=item c_o (override)
join '', @m;
}
+
+=item arch_check (override)
+
+vmsify all arguments for consistency
+
+=cut
+
+sub arch_check {
+ my $self = shift;
+
+ return $self->SUPER::arch_check(map { vmsify($_) } @_);
+}
+
+
# --- Output postprocessing section ---
=item maketext_filter (override)
# Translate $(PERLPREFIX) to a real path.
$rprefix = $self->eliminate_macros($rprefix);
- $rprefix = VMS::Filespec::vmspath($rprefix) if $rprefix;
- $sprefix = VMS::Filespec::vmspath($sprefix) if $sprefix;
+ $rprefix = vmspath($rprefix) if $rprefix;
+ $sprefix = vmspath($sprefix) if $sprefix;
- $default = VMS::Filespec::vmsify($default)
+ $default = vmsify($default)
unless $default =~ /\[.*\]/;
(my $var_no_install = $var) =~ s/^install//;
$self->{PERL_ARCHIVE_AFTER} ||= '';
}
+
+=item catdir (override)
+
+=item catfile (override)
+
+Eliminate the macros in the output to the MMS/MMK file.
+
+(File::Spec::VMS used to do this for us, but it's being removed)
+
+=cut
+
+sub catdir {
+ my $self = shift;
+
+ # Process the macros on VMS MMS/MMK
+ my @args = map { m{\$\(} ? $self->eliminate_macros($_) : $_ } @_;
+
+ my $dir = $self->SUPER::catdir(@args);
+
+ # Fix up the directory and force it to VMS format.
+ $dir = $self->fixpath($dir, 1);
+
+ return $dir;
+}
+
+sub catfile {
+ my $self = shift;
+
+ # Process the macros on VMS MMS/MMK
+ my @args = map { m{\$\(} ? $self->eliminate_macros($_) : $_ } @_;
+
+ my $file = $self->SUPER::catfile(@args);
+
+ $file = vmsify($file);
+
+ return $file
+}
+
+
=item eliminate_macros
Expands MM[KS]/Make macros in a text string, using the contents of
package ExtUtils::MM_VOS;
use strict;
-our $VERSION = '6.50';
+our $VERSION = '6.52';
require ExtUtils::MM_Unix;
our @ISA = qw(ExtUtils::MM_Unix);
require ExtUtils::MM_Any;
require ExtUtils::MM_Unix;
our @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
-our $VERSION = '6.50';
+our $VERSION = '6.52';
$ENV{EMXSHELL} = 'sh'; # to run `commands`
sub init_others {
my ($self) = @_;
- # Used in favor of echo because echo won't strip quotes. :(
- $self->{ECHO} ||= $self->oneliner('print qq{@ARGV}', ['-l']);
- $self->{ECHO_N} ||= $self->oneliner('print qq{@ARGV}');
-
- $self->{TOUCH} ||= '$(ABSPERLRUN) -MExtUtils::Command -e touch';
- $self->{CHMOD} ||= '$(ABSPERLRUN) -MExtUtils::Command -e chmod';
- $self->{CP} ||= '$(ABSPERLRUN) -MExtUtils::Command -e cp';
- $self->{RM_F} ||= '$(ABSPERLRUN) -MExtUtils::Command -e rm_f';
- $self->{RM_RF} ||= '$(ABSPERLRUN) -MExtUtils::Command -e rm_rf';
- $self->{MV} ||= '$(ABSPERLRUN) -MExtUtils::Command -e mv';
$self->{NOOP} ||= 'rem';
- $self->{TEST_F} ||= '$(ABSPERLRUN) -MExtUtils::Command -e test_f';
$self->{DEV_NULL} ||= '> NUL';
$self->{FIXIN} ||= $self->{PERL_CORE} ?
"\$(PERLRUN) $self->{PERL_SRC}/win32/bin/pl2bat.pl" :
'pl2bat.bat';
- $self->{LD} ||= $Config{ld} || 'link';
- $self->{AR} ||= $Config{ar} || 'lib';
+ $self->{LD} ||= 'link';
+ $self->{AR} ||= 'lib';
$self->SUPER::init_others;
# Embed the manifest file if it exists
push(@m, q{
- if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2
- if exist $@.manifest del $@.manifest});
+ if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2
+ if exist $@.manifest del $@.manifest});
}
push @m, '
$(CHMOD) $(PERM_RWX) $@
}
+=item arch_check (override)
+
+Normalize all arguments for consistency of comparison.
+
+=cut
+
+sub arch_check {
+ my $self = shift;
+
+ require Win32;
+ return $self->SUPER::arch_check( map { lc Win32::GetShortPathName($_) } @_);
+}
+
+
=item oneliner
These are based on what command.com does on Win98. They may be wrong
dmake can handle Unix style cd'ing but nmake (at least 1.5) cannot. It
wants:
- cd dir
+ cd dir1\dir2
command
another_command
- cd ..
-
-NOTE: This only works with simple relative directories. Throw it an absolute dir or something with .. in it and things will go wrong.
+ cd ..\..
=cut
use strict;
-our $VERSION = '6.50';
+our $VERSION = '6.52';
require ExtUtils::MM_Win32;
our @ISA = qw(ExtUtils::MM_Win32);
use strict;
require ExtUtils::MM;
-our $VERSION = 6.50;
+our $VERSION = 6.52;
our @ISA = qw(ExtUtils::MM);
{
my @Prepend_parent;
my %Recognized_Att_Keys;
-our $VERSION = '6.50';
+our $VERSION = '6.52';
# Emulate something resembling CVS $Revision$
(our $Revision = $VERSION) =~ s{_}{};
PMLIBDIRS => 'ARRAY',
PMLIBPARENTDIRS => 'ARRAY',
PREREQ_PM => 'HASH',
+ CONFIGURE_REQUIRES => 'HASH',
SKIP => 'ARRAY',
TYPEMAPS => 'ARRAY',
XS => 'HASH',
my @attrib_help = qw/
AUTHOR ABSTRACT ABSTRACT_FROM BINARY_LOCATION
- C CAPI CCFLAGS CONFIG CONFIGURE DEFINE DIR DISTNAME DL_FUNCS DL_VARS
+ C CAPI CCFLAGS CONFIG CONFIGURE DEFINE DIR DISTNAME DISTVNAME
+ DL_FUNCS DL_VARS
EXCLUDE_EXT EXE_FILES FIRST_MAKEFILE
FULLPERL FULLPERLRUN FULLPERLRUNINST
FUNCLIST H IMPORTS
INC INCLUDE_EXT LDFROM LIB LIBPERL_A LIBS LICENSE
LINKTYPE MAKE MAKEAPERL MAKEFILE MAKEFILE_OLD MAN1PODS MAN3PODS MAP_TARGET
- META_ADD META_MERGE MIN_PERL_VERSION
+ META_ADD META_MERGE MIN_PERL_VERSION CONFIGURE_REQUIRES
MYEXTLIB NAME NEEDS_LINKING NOECHO NO_META NORECURS NO_VC OBJECT OPTIMIZE
PERL_MALLOC_OK PERL PERLMAINCC PERLRUN PERLRUNINST PERL_CORE
- PERL_SRC PERM_RW PERM_RWX
+ PERL_SRC PERM_DIR PERM_RW PERM_RWX
PL_FILES PM PM_FILTER PMLIBDIRS PMLIBPARENTDIRS POLLUTE PPM_INSTALL_EXEC
PPM_INSTALL_SCRIPT PREREQ_FATAL PREREQ_PM PREREQ_PRINT PRINT_PREREQ
SIGN SKIP TYPEMAPS VERSION VERSION_FROM XS XSOPT XSPROTOARG
@Overridable = @MM_Sections;
push @Overridable, qw[
- libscan makeaperl needs_linking perm_rw perm_rwx
+ libscan makeaperl needs_linking
subdir_x test_via_harness test_via_script
init_VERSION init_dist init_INST init_INSTALL init_DEST init_dirscan
my(%unsatisfied) = ();
foreach my $prereq (sort keys %{$self->{PREREQ_PM}}) {
- # 5.8.0 has a bug with require Foo::Bar alone in an eval, so an
- # extra statement is a workaround.
my $file = "$prereq.pm";
$file =~ s{::}{/}g;
- eval { require $file };
-
- my $pr_version = $prereq->VERSION || 0;
+ my $path;
+ for my $dir (@INC) {
+ my $tmp = File::Spec->catfile($dir, $file);
+ if( -r $tmp ) {
+ $path = $tmp;
+ last;
+ }
+ }
+ my $pr_version = defined $path ? MM->parse_version($path) : 0;
# convert X.Y_Z alpha version #s to X.YZ for easier comparisons
$pr_version =~ s/(\d+)\.(\d+)_(\d+)/$1.$2$3/;
- if ($@) {
+ if (!defined $path) {
warn sprintf "Warning: prerequisite %s %s not found.\n",
$prereq, $self->{PREREQ_PM}{$prereq}
unless $self->{PREREQ_FATAL};
$self->init_linker;
$self->init_ABSTRACT;
- if (! $self->{PERL_SRC} ) {
- require VMS::Filespec if $Is_VMS;
- my($pthinks) = $self->canonpath($INC{'Config.pm'});
- my($cthinks) = $self->catfile($Config{'archlibexp'},'Config.pm');
- $pthinks = VMS::Filespec::vmsify($pthinks) if $Is_VMS;
- if ($pthinks ne $cthinks &&
- !($Is_Win32 and lc($pthinks) eq lc($cthinks))) {
- print "Have $pthinks expected $cthinks\n";
- if ($Is_Win32) {
- $pthinks =~ s![/\\]Config\.pm$!!i; $pthinks =~ s!.*[/\\]!!;
- }
- else {
- $pthinks =~ s!/Config\.pm$!!; $pthinks =~ s!.*/!!;
- }
- print STDOUT <<END unless $self->{UNINSTALLED_PERL};
-Your perl and your Config.pm seem to have different ideas about the
-architecture they are running on.
-Perl thinks: [$pthinks]
-Config says: [$Config{archname}]
-This may or may not cause problems. Please check your installation of perl
-if you have problems building this extension.
-END
- }
- }
+ $self->arch_check(
+ $INC{'Config.pm'},
+ $self->catfile($Config{'archlibexp'}, "Config.pm")
+ );
$self->init_others();
$self->init_platform();
hash may contain further attributes, e.g. {LIBS =E<gt> ...}, that have to
be determined by some evaluation method.
+=item CONFIGURE_REQUIRES
+
+A hash of modules that are required to run Makefile.PL itself, but not
+to run your distribution.
+
+This will go into the C<configure_requires> field of your F<META.yml>.
+
+Defaults to C<{ "ExtUtils::MakeMaker" => 0 }>
+
+The format is the same as PREREQ_PM.
+
=item DEFINE
Something like C<"-DHAVE_UNISTD_H">
=item DIR
-Ref to array of subdirectories containing Makefile.PLs e.g. [ 'sdbm'
-] in ext/SDBM_File
+Ref to array of subdirectories containing Makefile.PLs e.g. ['sdbm']
+in ext/SDBM_File
=item DISTNAME
here will be converted to man pages and installed as was requested
at Configure time.
+This hash should map POD files (or scripts containing POD) to the
+man file names under the C<blib/man1/> directory, as in the following
+example:
+
+ MAN1PODS => {
+ 'doc/command.pod' => 'blib/man1/command.1',
+ 'scripts/script.pl' => 'blib/man1/script.1',
+ }
+
=item MAN3PODS
Hashref that assigns to *.pm and *.pod files the files into which the
the MAN3PODS hashref. These will then be converted to man pages during
C<make> and will be installed during C<make install>.
+Example similar to MAN1PODS.
+
=item MAP_TARGET
If it is intended, that a new perl binary be produced, this variable
Directory containing the Perl source code (use of this should be
avoided, it may be undefined)
+=item PERM_DIR
+
+Desired permission for directories. Defaults to C<755>.
+
=item PERM_RW
Desired permission for read/writable files. Defaults to C<644>.
-See also L<MM_Unix/perm_rw>.
=item PERM_RWX
Desired permission for executable files. Defaults to C<755>.
-See also L<MM_Unix/perm_rwx>.
=item PL_FILES
=item PREREQ_PM
-Hashref: Names of modules that need to be available to run this
-extension (e.g. Fcntl for SDBM_File) are the keys of the hash and the
-desired version is the value. If the required version number is 0, we
-only check if any version is installed already.
+A hash of modules that are needed to run your module. The keys are
+the module names ie. Test::More, and the minimum version is the
+value. If the required version number is 0 any version will do.
+
+This will go into the C<requires> field of your F<META.yml>.
+
+ PREREQ_PM => {
+ # Require Test::More at least 0.47
+ "Test::More" => "0.47",
+
+ # Require any version of Acme::Buffy
+ "Acme::Buffy" => 0,
+ }
=item PREREQ_PRINT
use strict;
-our $VERSION = '6.50';
+our $VERSION = '6.52';
use Config ();
);
+=item Which zip should I use on Windows for '[nd]make zipdist'?
+
+We recommend InfoZIP: L<http://www.info-zip.org/Zip.html>
+
+
=back
=head2 XS
# There's just too much Dynaloader incest here to turn on strict vars.
use strict 'refs';
-our $VERSION = '6.50';
+our $VERSION = '6.52';
require Exporter;
our @ISA = ('Exporter');
our @ISA = qw(Exporter);
our @EXPORT = qw(&Mksymlists);
-our $VERSION = '6.50';
+our $VERSION = '6.52';
sub Mksymlists {
my(%spec) = @_;
chdir File::Spec->updir;
my $manifest = File::Spec->catfile('MANIFEST');
-open(MANIFEST, $manifest) or die "Can't open $manifest: $!";
+open(my $manifest_fh, "<", $manifest) or die "Can't open $manifest: $!";
my @modules = map { m{^lib/(\S+)}; $1 }
grep { m{^lib/ExtUtils/\S*\.pm} }
- grep { !m{/t/} } <MANIFEST>;
+ grep { !m{/t/} } <$manifest_fh>;
chomp @modules;
-close MANIFEST;
+close $manifest_fh;
chdir 'lib';
plan tests => scalar @modules * 2;
BEGIN {
if ($^O =~ /cygwin/i) {
- plan tests => 11;
+ plan tests => 14;
} else {
plan skip_all => "This is not cygwin";
}
use Config;
use File::Spec;
use ExtUtils::MM;
+use Config;
use_ok( 'ExtUtils::MM_Cygwin' );
is( $MM->{EXPORT_LIST}, $export, 'EXPORT_LIST' );
}
+# Tests for correct handling of maybe_command in /cygdrive/*
+# and c:/*. $ENV{COMSPEC}, if it exists, should always be executable.
+
+SKIP: {
+ my $comspec = $ENV{COMSPEC};
+
+ skip("\$ENV{COMSPEC} does not exist", 3) unless $comspec;
+
+ # Convert into cygwin-flavoured '/cygdrive/c/...' path.
+ # Is there a better way than direct munging? A File::*
+ # module perhaps?
+
+ $comspec =~ s{^(\w):} {/cygdrive/\l$1}x;
+ $comspec =~ s{\\ } {/}gx;
+
+ ok(MM->maybe_command($comspec),"$comspec should be executable");
+ # /cygdrive/c should *never* be executable, it's a directory.
+
+ ok(! MM->maybe_command(q{/cygdrive/c}),
+ qq{/cygdrive/c should never be executable}
+ );
+
+ # Our copy of Perl (with a unix-path) should always be executable.
+
+ ok(MM->maybe_command($Config{perlpath}),
+ qq{$Config{perlpath} should be executable}
+ );
+
+}
package FakeOut;
plan skip_all => 'Non-Unix platform';
}
else {
- plan tests => 109;
+ plan tests => 110;
}
}
is ($t->perl_script($self_name),$self_name, 'we pass as a perl_script()');
###############################################################################
-# perm_rw perm_rwx
+# PERM_RW and PERM_RWX
$t->init_PERM;
-is ($t->perm_rw(),'644', 'perm_rw() is 644');
-is ($t->perm_rwx(),'755', 'perm_rwx() is 755');
+is ($t->{PERM_RW},'644', 'PERM_RW is 644');
+is ($t->{PERM_RWX},'755', 'PERM_RWX is 755');
+is ($t->{PERM_DIR},'755', 'PERM_DIR is 755');
+
###############################################################################
# post_constants, postamble, post_initialize
--- /dev/null
+#!/usr/bin/perl -w
+
+use strict;
+use lib 't/lib';
+
+use TieOut;
+use Test::More 'no_plan';
+
+use Config;
+use ExtUtils::MakeMaker;
+
+ok( my $stdout = tie *STDOUT, 'TieOut' );
+
+# Create a normalized MM object to test with
+my $mm = bless {}, "MM";
+$mm->{PERL_SRC} = 0;
+$mm->{UNINSTALLED_PERL} = 0;
+
+my $rel2abs = sub { $mm->rel2abs($mm->catfile(@_)) };
+
+ok $mm->arch_check(
+ $rel2abs->(qw(. t testdata reallylongdirectoryname arch1 Config.pm)),
+ $rel2abs->(qw(. t testdata reallylongdirectoryname arch1 Config.pm)),
+);
+
+
+# Different architecures.
+{
+ ok !$mm->arch_check(
+ $rel2abs->(qw(. t testdata reallylongdirectoryname arch1 Config.pm)),
+ $rel2abs->(qw(. t testdata reallylongdirectoryname arch2 Config.pm)),
+ );
+
+ like $stdout->read, qr{\Q
+Your perl and your Config.pm seem to have different ideas about the
+architecture they are running on.
+Perl thinks: [arch1]
+Config says: [$Config{archname}]
+This may or may not cause problems. Please check your installation of perl
+if you have problems building this extension.
+};
+
+}
+
+
+# Different file path separators [rt.cpan.org 46416]
+SKIP: {
+ skip "Can't load File::Spec::Win32" unless eval "require File::Spec::Win32";
+ local @File::Spec::ISA = qw(File::Spec::Win32);
+ ok $mm->arch_check(
+ "/_64/perl1004/lib/Config.pm",
+ '\\_64\\perl1004\\lib\\Config.pm',
+ );
+}
+
+
+# PERL_SRC is set, no check is done
+{
+ local $mm->{PERL_SRC} = 1;
+ ok $mm->arch_check(
+ $rel2abs->(qw(. t testdata reallylongdirectoryname arch1 Config.pm)),
+ $rel2abs->(qw(. t testdata reallylongdirectoryname arch2 Config.pm)),
+ );
+
+ is $stdout->read, '';
+}
+
+
+# UNINSTALLED_PERL is set, no message is sent
+{
+ local $mm->{UNINSTALLED_PERL} = 1;
+ ok !$mm->arch_check(
+ $rel2abs->(qw(. t testdata reallylongdirectoryname arch1 Config.pm)),
+ $rel2abs->(qw(. t testdata reallylongdirectoryname arch2 Config.pm)),
+ );
+
+ like $stdout->read, qr{^Have .*\nWant .*$};
+}
use Config;
use ExtUtils::MakeMaker;
-use Test::More tests => 81;
+use Test::More tests => 79;
use MakeMaker::Test::Utils;
use MakeMaker::Test::Setup::BFD;
use File::Find;
my $Is_VMS = $^O eq 'VMS';
# GNV logical interferes with testing
-$ENV{'bin'} = '[.bin]' if $Is_VMS;
+local $ENV{'bin'} = '[.bin]' if $Is_VMS;
chdir 't';
my $ppd_html;
{ local $/; $ppd_html = <PPD> }
close PPD;
-like( $ppd_html, qr{^<SOFTPKG NAME="Big-Dummy" VERSION="0,01,0,0">}m,
+like( $ppd_html, qr{^<SOFTPKG NAME="Big-Dummy" VERSION="0.01">}m,
' <SOFTPKG>' );
-like( $ppd_html, qr{^\s*<TITLE>Big-Dummy</TITLE>}m, ' <TITLE>' );
like( $ppd_html, qr{^\s*<ABSTRACT>Try "our" hot dog's</ABSTRACT>}m,
' <ABSTRACT>');
like( $ppd_html,
qr{^\s*<AUTHOR>Michael G Schwern <schwern\@pobox.com></AUTHOR>}m,
' <AUTHOR>' );
like( $ppd_html, qr{^\s*<IMPLEMENTATION>}m, ' <IMPLEMENTATION>');
-like( $ppd_html, qr{^\s*<DEPENDENCY NAME="strict" VERSION="0,0,0,0" />}m,
- ' <DEPENDENCY>' );
-like( $ppd_html, qr{^\s*<OS NAME="$Config{osname}" />}m,
- ' <OS>' );
+like( $ppd_html, qr{^\s*<REQUIRE NAME="strict::" />}m, ' <REQUIRE>' );
+
my $archname = $Config{archname};
-$archname .= "-". substr($Config{version},0,3) if $] >= 5.008;
+if( $] >= 5.008 ) {
+ # XXX This is a copy of the internal logic, so it's not a great test
+ $archname .= "-$Config{PERL_REVISION}.$Config{PERL_VERSION}";
+}
like( $ppd_html, qr{^\s*<ARCHITECTURE NAME="$archname" />}m,
' <ARCHITECTURE>');
like( $ppd_html, qr{^\s*<CODEBASE HREF="" />}m, ' <CODEBASE>');
SKIP: {
- skip 'VMS install targets do not preserve $(PREFIX)', 9 if $Is_VMS;
+ skip 'VMS install targets do not preserve $(PREFIX)', 8 if $Is_VMS;
$install_out = run("$make install PREFIX=elsewhere");
is( $?, 0, 'install with PREFIX override' ) || diag $install_out;
SKIP: {
- skip 'VMS install targets do not preserve $(DESTDIR)', 11 if $Is_VMS;
+ skip 'VMS install targets do not preserve $(DESTDIR)', 10 if $Is_VMS;
$install_out = run("$make install PREFIX= DESTDIR=other");
is( $?, 0, 'install with DESTDIR' ) ||
SKIP: {
- skip 'VMS install targets do not preserve $(PREFIX)', 10 if $Is_VMS;
+ skip 'VMS install targets do not preserve $(PREFIX)', 9 if $Is_VMS;
$install_out = run("$make install PREFIX=elsewhere DESTDIR=other/");
is( $?, 0, 'install with PREFIX override and DESTDIR' ) ||
# I know we'll get ignored errors from make here, that's ok.
# Send STDERR off to oblivion.
open(SAVERR, ">&STDERR") or die $!;
-open(STDERR, ">".File::Spec->devnull) or die $!;
+open(STDERR, ">",File::Spec->devnull) or die $!;
my $realclean_out = run("$make realclean");
is( $?, 0, 'realclean' ) || diag($realclean_out);
INSTALLMAN3DIR => 'none'
);
- ok( !keys %{ $mm->{MAN3PODS} } );
+ is_deeply( $mm->{MAN3PODS}, {} );
}
#!/usr/bin/perl -w
+# Try to test fixin. I say "try" because what fixin will actually do
+# is highly variable from system to system.
+
BEGIN {
if( $ENV{PERL_CORE} ) {
chdir 't';
use File::Spec;
-use Test::More tests => 6;
+use Test::More tests => 22;
+use Config;
use TieOut;
use MakeMaker::Test::Utils;
use MakeMaker::Test::Setup::BFD;
is $\, "bar", '$\ not clobbered';
}
+
+sub test_fixin {
+ my($code, $test) = @_;
+
+ my $file = "fixin_test";
+ ok(open(my $fh, ">", $file), "write $file") or diag "Can't write $file: $!";
+ print $fh $code;
+ close $fh;
+
+ MY->fixin($file);
+
+ ok(open($fh, "<", $file), "read $file") or diag "Can't read $file: $!";
+ my @lines = <$fh>;
+ close $fh;
+
+ $test->(@lines);
+
+ 1 while unlink $file;
+ ok !-e $file, "cleaned up $file";
+}
+
+
+# A simple test of fixin
+test_fixin(<<END,
+#!/foo/bar/perl -w
+
+blah blah blah
+END
+ sub {
+ my @lines = @_;
+ unlike $lines[0], qr[/foo/bar/perl], "#! replaced";
+ like $lines[0], qr[ -w\b], "switch retained";
+
+ # In between might be that "not running under some shell" madness.
+
+ is $lines[-1], "blah blah blah\n", "Program text retained";
+ }
+);
+
+
+# [rt.cpan.org 29442]
+test_fixin(<<END,
+#!/foo/bar/perl5.8.8 -w
+
+blah blah blah
+END
+
+ sub {
+ my @lines = @_;
+ unlike $lines[0], qr[/foo/bar/perl5.8.8], "#! replaced";
+ like $lines[0], qr[ -w\b], "switch retained";
+
+ # In between might be that "not running under some shell" madness.
+
+ is $lines[-1], "blah blah blah\n", "Program text retained";
+ }
+);
+
+
+# fixin shouldn't pick this up.
+test_fixin(<<END,
+#!/foo/bar/perly -w
+
+blah blah blah
+END
+
+ sub {
+ is join("", @_), <<END;
+#!/foo/bar/perly -w
+
+blah blah blah
+END
+ }
+);
}
use strict;
-use Test::More tests => 5;
+use Test::More tests => 6;
use Data::Dumper;
},
];
}
+
+# Test CONFIGURE_REQUIRES
+{
+ my $mm = $new_mm->(
+ DISTNAME => 'Foo-Bar',
+ VERSION => 1.23,
+ CONFIGURE_REQUIRES => {
+ "Fake::Module1" => 1.01,
+ },
+ PM => {
+ "Foo::Bar" => 'lib/Foo/Bar.pm',
+ },
+ );
+
+ is_deeply [$mm->metafile_data], [
+ name => 'Foo-Bar',
+ version => 1.23,
+ abstract => undef,
+ author => [],
+ license => 'unknown',
+ distribution_type => 'module',
+
+ configure_requires => {
+ 'Fake::Module1' => 1.01,
+ },
+ build_requires => {
+ 'ExtUtils::MakeMaker' => 0,
+ },
+
+ no_index => {
+ directory => [qw(t inc)],
+ },
+
+ generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION",
+ 'meta-spec' => {
+ url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
+ version => 1.4
+ },
+ ],'CONFIGURE_REQUIRES';
+}
q[my $VERSION = '1.01'] => 'undef',
q[local $VERISON = '1.02'] => 'undef',
q[local $FOO::VERSION = '1.30'] => 'undef',
+ q[if( $Foo::VERSION >= 3.00 ) {]=> 'undef',
q[our $VERSION = '1.23';] => '1.23',
+
+ '$Something::VERSION == 1.0' => 'undef',
+ '$Something::VERSION <= 1.0' => 'undef',
+ '$Something::VERSION >= 1.0' => 'undef',
+ '$Something::VERSION != 1.0' => 'undef',
+
+ qq[\$Something::VERSION == 1.0\n\$VERSION = 2.3\n] => '2.3',
+ qq[\$Something::VERSION == 1.0\n\$VERSION = 2.3\n\$VERSION = 4.5\n] => '2.3',
+
+ '$VERSION = sprintf("%d.%03d", q$Revision: 3.74 $ =~ /(\d+)\.(\d+)/);' => '3.074',
+ '$VERSION = substr(q$Revision: 2.8 $, 10) + 2 . "";' => '4.8',
);
if( $Has_Version ) {
--- /dev/null
+#!/usr/bin/perl -w
+
+# Test our simulation of pod2man
+
+use strict;
+use lib 't/lib';
+
+use ExtUtils::Command::MM;
+
+use Test::More tests => 3;
+
+# The argument to perm_rw was optional.
+# [rt.cpan.org 35190]
+{
+ my $warnings;
+ local $SIG{__WARN__} = sub {
+ $warnings .= join '', @_;
+ };
+
+ pod2man("--perm_rw");
+
+ like $warnings, qr/^Option perm_rw requires an argument/;
+};
+
+
+# Simulate the failure of Pod::Man loading.
+# pod2man() should react gracefully.
+{
+ local @INC = @INC;
+ unshift @INC, sub {
+ die "Simulated Pod::Man failure\n" if $_[1] eq 'Pod/Man.pm';
+ };
+ local %INC = %INC;
+ delete $INC{"Pod/Man.pm"};
+
+ my $warnings;
+ local $SIG{__WARN__} = sub {
+ $warnings .= join '', @_;
+ };
+
+ is pod2man(), undef;
+ is $warnings, <<'END'
+Pod::Man is not available: Simulated Pod::Man failure
+Man pages will not be generated during this install.
+END
+
+}
}
use strict;
-use Test::More tests => 30;
+use Test::More tests => 35;
use TieOut;
use MakeMaker::Test::Utils;
isa_ok( $mm->{VERSION}, 'version' );
is( $mm->{VERSION}, $version );
}
+
+
+ # DISTNAME
+ $warnings = '';
+ eval {
+ $mm = WriteMakefile(
+ NAME => 'Big::Dummy',
+ VERSION => '1.00',
+ DISTNAME => "Hooballa",
+ );
+ };
+ is( $warnings, '' );
+ is( $mm->{DISTNAME}, "Hooballa" );
+ is( $mm->{DISTVNAME}, $Is_VMS ? "Hooballa-1_00" : "Hooballa-1.00" );
+
+
+ # DISTVNAME (rt.cpan.org 43217)
+ $warnings = '';
+ eval {
+ $mm = WriteMakefile(
+ NAME => 'Big::Dummy',
+ VERSION => 1.00,
+ DISTVNAME => "Hooballoo",
+ );
+ };
+ is( $warnings, '' );
+ is( $mm->{DISTVNAME}, 'Hooballoo' );
}
}
chdir 't';
+use strict;
+
use Test::More;
use MakeMaker::Test::Utils;
use MakeMaker::Test::Setup::XS;
use File::Spec;
use File::Path;
+my $Skipped = 0;
if( have_compiler() ) {
plan tests => 5;
}
else {
+ $Skipped = 1;
plan skip_all => "ExtUtils::CBuilder not installed or couldn't find a compiler";
}
ok( setup_xs(), 'setup' );
END {
- chdir File::Spec->updir or die;
- teardown_xs(), 'teardown' or die;
+ unless( $Skipped ) {
+ chdir File::Spec->updir or die;
+ teardown_xs(), 'teardown' or die;
+ }
}
ok( chdir('XS-Test'), "chdir'd to XS-Test" ) ||
use strict;
use warnings;
-our $VERSION = 6.50;
+our $VERSION = 6.52;
use Cwd;
use File::Spec;
open(FILE, ">$file") || die "Can't create $file: $!";
print FILE $text;
close FILE;
+
+ # ensure file at least 1 second old for makes that assume
+ # files with the same time are out of date.
+ my $time = calibrate_mtime();
+ utime $time, $time - 1, $file;
}
return 1;
open(FILE, ">$file") || die "Can't create $file: $!";
print FILE $text;
close FILE;
+
+ # ensure file at least 1 second old for makes that assume
+ # files with the same time are out of date.
+ my $time = calibrate_mtime();
+ utime $time, $time - 1, $file;
}
return 1;
use strict;
use File::Path;
use File::Basename;
+use MakeMaker::Test::Utils;
my %Files = (
'Problem-Module/Makefile.PL' => <<'END',
open(FILE, ">$file") || die "Can't create $file: $!";
print FILE $text;
close FILE;
+
+ # ensure file at least 1 second old for makes that assume
+ # files with the same time are out of date.
+ my $time = calibrate_mtime();
+ utime $time, $time - 1, $file;
}
return 1;
open(FILE, ">$file") || die "Can't create $file: $!";
print FILE $text;
close FILE;
+
+ # ensure file at least 1 second old for makes that assume
+ # files with the same time are out of date.
+ my $time = calibrate_mtime();
+ utime $time, $time - 1, $file;
}
return 1;
package TieOut;
-# $Id: /mirror/googlecode/test-more-trunk/t/lib/TieOut.pm 67132 2008-10-01T01:11:04.501643Z schwern $
sub TIEHANDLE {
my $scalar = '';
- bless( \$scalar, $_[0] );
+ bless( \$scalar, $_[0]);
}
sub PRINT {
my $self = shift;
- $$self .= join( '', @_ );
+ $$self .= join('', @_);
}
sub PRINTF {
$$self .= sprintf $fmt, @_;
}
-sub FILENO { }
+sub FILENO {}
sub read {
my $self = shift;