+6.03 Wed Jun 19 17:06:14 EDT 2002
+ - Documented that we're clamping down on cargo-cult MakeMaker
+ programming.
+ - Eased up the parameter verification to leave errant values alone.
+ - Doug MacEachern documented LDDLFLAGS and added to known parameters.
+ - Possible fix for XS compiles on Cygwin for pre 5.8 perls.
+
6.02 Sat Jun 15 19:46:06 EDT 2002
- ExtUtils::Installed->modules() was broken in scalar context
- Sync bleadperl 16922: Netware updates from Ananth Kesari.
require ExtUtils::MM_Unix;
@ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
-$VERSION = 1.03;
+$VERSION = 1.04;
sub cflags {
my($self,$libperl)=@_;
sub perl_archive {
if ($Config{useshrplib} eq 'true') {
my $libperl = '$(PERL_INC)' .'/'. "$Config{libperl}";
- $libperl =~ s/a$/dll.a/;
+ if( $] >= 5.007 ) {
+ $libperl =~ s/a$/dll.a/;
+ }
return $libperl;
} else {
return '$(PERL_INC)' .'/'. ("$Config{libperl}" or "libperl.a");
BEGIN {require 5.005_03;}
-$VERSION = "6.02";
+$VERSION = "6.03";
$Version_OK = "5.49"; # Makefiles older than $Version_OK will die
# (Will be checked from MakeMaker version 4.13 onwards)
-($Revision = substr(q$Revision: 1.61 $, 10)) =~ s/\s+$//;
+($Revision = substr(q$Revision: 1.63 $, 10)) =~ s/\s+$//;
require Exporter;
use Config;
INST_MAN3DIR => '',
INST_SCRIPT => '',
_KEEP_AFTER_FLUSH => '',
+ LDDLFLAGS => '',
LDFROM => '',
LIB => '',
LIBPERL_A => '',
tool_autosplit => 'hash',
);
-my %Default_Att = (
- '' => '',
- hash => {},
- array => [],
- code => sub {},
- );
sub _verify_att {
my($att) = @_;
: "string/number";
warn "WARNING: $key takes a $takes not a $has.\n".
" Please inform the author.\n";
- $att->{$key} = $Default_Att{$sigs[0]};
}
}
}
=head2 Using Attributes and Parameters
-The following attributes can be specified as arguments to WriteMakefile()
-or as NAME=VALUE pairs on the command line:
+The following attributes may be specified as arguments to WriteMakefile()
+or as NAME=VALUE pairs on the command line.
=over 2
testing. make install will copy the files in INST_SCRIPT to
INSTALLSCRIPT.
+=item LDDLFLAGS
+
+Any special flags that might need to be passed to ld to create a
+shared library suitable for dynamic loading. It is up to the makefile
+to use it. (See L<Config/lddlflags>)
+
+Defaults to $Config{lddlflags}.
+
=item LDFROM
Defaults to "$(OBJECT)" and is used in the ld command to specify
$VERSION = '1.00';
*VERSION = \'1.01';
- ( $VERSION ) = '$Revision: 1.61 $ ' =~ /\$Revision:\s+([^\s]+)/;
+ ( $VERSION ) = '$Revision: 1.63 $ ' =~ /\$Revision:\s+([^\s]+)/;
$FOO::VERSION = '1.10';
*FOO::VERSION = \'1.11';
our $VERSION = 1.2.3; # new for perl5.6.0
MAKE_FRAG
}
+=head2 The End Of Cargo Cult Programming
+
+WriteMakefile() now does some basic sanity checks on its parameters to
+protect against typos and malformatted values. This means some things
+which happened to work in the past will now throw warnings and
+possibly produce internal errors.
+
+Some of the most common mistakes:
+
+=over 2
+
+=item C<<MAN3PODS => ' '>>
+
+This is commonly used to supress the creation of man pages. MAN3PODS
+takes a hash ref not a string, but the above worked by accident in old
+versions of MakeMaker.
+
+The correct code is C<<MAN3PODS => { }>>.
+
+=back
+
=head2 Hintsfile support
}
use strict;
-use Test::More tests => 16;
+use Test::More tests => 13;
use TieOut;
use MakeMaker::Test::Utils;
$warnings .= join '', @_;
};
- my $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION_FROM => 'lib/Big/Dummy.pm',
- MAN3PODS => ' ', # common mistake
- );
+ my $mm;
+
+ eval {
+ $mm = WriteMakefile(
+ NAME => 'Big::Dummy',
+ VERSION_FROM => 'lib/Big/Dummy.pm',
+ MAN3PODS => ' ', # common mistake
+ );
+ };
is( $warnings, <<VERIFY );
WARNING: MAN3PODS takes a hash reference not a string/number.
Please inform the author.
VERIFY
- is_deeply( $mm->{MAN3PODS}, {}, 'Wrong argument type corrected' );
$warnings = '';
- $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION_FROM => 'lib/Big/Dummy.pm',
- AUTHOR => sub {},
- );
+ eval {
+ $mm = WriteMakefile(
+ NAME => 'Big::Dummy',
+ VERSION_FROM => 'lib/Big/Dummy.pm',
+ AUTHOR => sub {},
+ );
+ };
is( $warnings, <<VERIFY );
WARNING: AUTHOR takes a string/number not a code reference.
Please inform the author.
VERIFY
- is_deeply( $mm->{AUTHOR}, '' );
-
-
# LIBS accepts *both* a string or an array ref. The first cut of
# our verification did not take this into account.
$warnings = '';
is_deeply( $mm->{LIBS}, ['-lwibble', '-lwobble'] );
$warnings = '';
- $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION_FROM => 'lib/Big/Dummy.pm',
- LIBS => { wibble => "wobble" },
- );
+ eval {
+ $mm = WriteMakefile(
+ NAME => 'Big::Dummy',
+ VERSION_FROM => 'lib/Big/Dummy.pm',
+ LIBS => { wibble => "wobble" },
+ );
+ };
# We'll get warnings about the bogus libs, that's ok.
like( $warnings, qr{^WARNING: LIBS takes a array reference or string/number not a hash reference}m );
- is_deeply( $mm->{LIBS}, [] );
$warnings = '';