This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update ExtUtils-MakeMaker to CPAN version 6.63_01
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Wed, 26 Oct 2011 19:10:05 +0000 (20:10 +0100)
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Wed, 26 Oct 2011 19:11:53 +0000 (20:11 +0100)
  [DELTA]

  6.63_01  Sun Oct 23 16:57:24 PDT 2011
    Bug Fixes
    * Stray $ in the PPD and meta files (for example, from the ABSTRACT)
      are now escaped.  [rt.cpan.org 71847]

    Possibly incompatible changes
    * echo() now escapes all dollar signs by default

    New Features
    * echo() has an option to allow make variable expansion.
    * echo() is now passed a hash of options (old style $appending flag
      still works for compatibility).
    * quote_literal() now escapes dollar signs, but allows make variables.
    * quote_literal() has an option to escape make variables.
    * escape_dollarsigns() to escape dollar signs but allow variables
    * escape_all_dollarsigns() to escape all dollar signs

    Improvements
    * The PPD VERSION is now derived from the VERSION variable in the Makefile
      rather than hard coded.

    Bundled Modules
    * Updated CPAN::Meta to 2.112621
    * Updated CPAN::Meta::YAML to 0.004
    * Updated JSON::PP to 2.27200

  6.62  Sun Oct 23 16:43:36 PDT 2011
    No changes from 6.61_01

38 files changed:
MANIFEST
Porting/Maintainers.pl
cpan/ExtUtils-MakeMaker/Changes
cpan/ExtUtils-MakeMaker/MANIFEST
cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_AIX.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_BeOS.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Cygwin.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_DOS.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_MacOS.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_NW5.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win95.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MY.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Tutorial.pod
cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mkbootstrap.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mksymlists.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/testlib.pm
cpan/ExtUtils-MakeMaker/t/basic.t
cpan/ExtUtils-MakeMaker/t/echo.t [new file with mode: 0644]
cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/BFD.pm
cpan/ExtUtils-MakeMaker/t/min_perl_version.t
cpan/ExtUtils-MakeMaker/t/several_authors.t
pod/perldelta.pod

index 07386e3..321d48d 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -1054,6 +1054,7 @@ cpan/ExtUtils-MakeMaker/t/build_man.t                             Set if MakeMaker builds manpages
 cpan/ExtUtils-MakeMaker/t/cd.t                                 Test to see cd works
 cpan/ExtUtils-MakeMaker/t/config.t                             Test ExtUtils::MakeMaker::Config
 cpan/ExtUtils-MakeMaker/t/dir_target.t                         Verify if dir_target() is supported
+cpan/ExtUtils-MakeMaker/t/echo.t                               Test for ExtUtils::MakeMaker
 cpan/ExtUtils-MakeMaker/t/FIRST_MAKEFILE.t                     See if FIRST_MAKEFILE works
 cpan/ExtUtils-MakeMaker/t/fixin.t                              See if ExtUtils::MakeMaker works
 cpan/ExtUtils-MakeMaker/t/fix_libs.t                           Test for ExtUtils::MakeMaker
index 10b442b..6029aa0 100755 (executable)
@@ -734,7 +734,7 @@ use File::Glob qw(:case);
     'ExtUtils::MakeMaker' =>
        {
        'MAINTAINER'    => 'mschwern',
-       'DISTRIBUTION'  => 'MSCHWERN/ExtUtils-MakeMaker-6.61_01.tar.gz',
+       'DISTRIBUTION'  => 'MSCHWERN/ExtUtils-MakeMaker-6.63_01.tar.gz',
        'FILES'         => q[cpan/ExtUtils-MakeMaker],
        'EXCLUDED'      => [ qr{^t/lib/Test/},
            qr{^(bundled|my)/},
index 7b69e5c..27910e6 100644 (file)
@@ -1,3 +1,34 @@
+6.63_01  Sun Oct 23 16:57:24 PDT 2011
+    Bug Fixes
+    * Stray $ in the PPD and meta files (for example, from the ABSTRACT)
+      are now escaped.  [rt.cpan.org 71847]
+
+    Possibly incompatible changes
+    * echo() now escapes all dollar signs by default
+
+    New Features
+    * echo() has an option to allow make variable expansion.
+    * echo() is now passed a hash of options (old style $appending flag
+      still works for compatibility).
+    * quote_literal() now escapes dollar signs, but allows make variables.
+    * quote_literal() has an option to escape make variables.
+    * escape_dollarsigns() to escape dollar signs but allow variables
+    * escape_all_dollarsigns() to escape all dollar signs
+
+    Improvements
+    * The PPD VERSION is now derived from the VERSION variable in the Makefile
+      rather than hard coded.
+
+    Bundled Modules
+    * Updated CPAN::Meta to 2.112621
+    * Updated CPAN::Meta::YAML to 0.004
+    * Updated JSON::PP to 2.27200
+
+
+6.62  Sun Oct 23 16:43:36 PDT 2011
+    No changes from 6.61_01
+
+
 6.61_01  Sat Sep 24 22:16:13 PDT 2011
     Win32
     * Liblist::Kid now checks the ActiveState MinGW library path environment
index 0f31fec..e42011b 100644 (file)
@@ -73,6 +73,7 @@ t/build_man.t
 t/cd.t
 t/config.t
 t/dir_target.t
+t/echo.t
 t/FIRST_MAKEFILE.t
 t/fix_libs.t
 t/fixin.t
index dde078b..b38bfc3 100644 (file)
@@ -10,7 +10,7 @@ our @ISA = qw(Exporter);
 
 our @EXPORT  = qw(test_harness pod2man perllocal_install uninstall 
                   warn_if_old_packlist);
-our $VERSION = '6.61_01';
+our $VERSION = '6.63_01';
 
 my $Is_VMS = $^O eq 'VMS';
 
index 53ddbb0..b8a6c91 100644 (file)
@@ -2,7 +2,7 @@ package ExtUtils::Liblist;
 
 use strict;
 
-our $VERSION = '6.61_01';
+our $VERSION = '6.63_01';
 
 use File::Spec;
 require ExtUtils::Liblist::Kid;
index 55c17fa..6b7d9fe 100644 (file)
@@ -11,7 +11,7 @@ use 5.006;
 
 use strict;
 use warnings;
-our $VERSION = '6.61_01';
+our $VERSION = '6.63_01';
 
 use ExtUtils::MakeMaker::Config;
 use Cwd 'cwd';
index 6911be0..83fbe1c 100644 (file)
@@ -3,7 +3,7 @@ package ExtUtils::MM;
 use strict;
 use ExtUtils::MakeMaker::Config;
 
-our $VERSION = '6.61_01';
+our $VERSION = '6.63_01';
 
 require ExtUtils::Liblist;
 require ExtUtils::MakeMaker;
index b841d5f..c9cf24f 100644 (file)
@@ -1,7 +1,7 @@
 package ExtUtils::MM_AIX;
 
 use strict;
-our $VERSION = '6.61_01';
+our $VERSION = '6.63_01';
 
 require ExtUtils::MM_Unix;
 our @ISA = qw(ExtUtils::MM_Unix);
index 1744f0d..7791107 100644 (file)
@@ -1,7 +1,7 @@
 package ExtUtils::MM_Any;
 
 use strict;
-our $VERSION = '6.61_01';
+our $VERSION = '6.63_01';
 
 use Carp;
 use File::Spec;
@@ -206,25 +206,40 @@ sub _expand_macros {
 
     my @commands = $MM->echo($text);
     my @commands = $MM->echo($text, $file);
-    my @commands = $MM->echo($text, $file, $appending);
+    my @commands = $MM->echo($text, $file, \%opts);
 
 Generates a set of @commands which print the $text to a $file.
 
 If $file is not given, output goes to STDOUT.
 
-If $appending is true the $file will be appended to rather than
-overwritten.
+If $opts{append} is true the $file will be appended to rather than
+overwritten.  Default is to overwrite.
+
+If $opts{allow_variables} is true, make variables of the form
+C<$(...)> will not be escaped.  Other C<$> will.  Default is to escape
+all C<$>.
+
+Example of use:
+
+    my $make = map "\t$_\n", $MM->echo($text, $file);
 
 =cut
 
 sub echo {
-    my($self, $text, $file, $appending) = @_;
-    $appending ||= 0;
+    my($self, $text, $file, $opts) = @_;
+
+    # Compatibility with old options
+    if( !ref $opts ) {
+        my $append = $opts;
+        $opts = { append => $append || 0 };
+    }
+    $opts->{allow_variables} = 0 unless defined $opts->{allow_variables};
 
-    my @cmds = map { '$(NOECHO) $(ECHO) '.$self->quote_literal($_) } 
+    my $ql_opts = { allow_variables => $opts->{allow_variables} };
+    my @cmds = map { '$(NOECHO) $(ECHO) '.$self->quote_literal($_, $ql_opts) } 
                split /\n/, $text;
     if( $file ) {
-        my $redirect = $appending ? '>>' : '>';
+        my $redirect = $opts->{append} ? '>>' : '>';
         $cmds[0] .= " $redirect $file";
         $_ .= " >> $file" foreach @cmds[1..$#cmds];
     }
@@ -334,12 +349,54 @@ to include more flexible code and switches.
 =head3 quote_literal  I<Abstract>
 
     my $safe_text = $MM->quote_literal($text);
+    my $safe_text = $MM->quote_literal($text, \%options);
 
 This will quote $text so it is interpreted literally in the shell.
 
 For example, on Unix this would escape any single-quotes in $text and
 put single-quotes around the whole thing.
 
+If $options{allow_variables} is true it will leave C<'$(FOO)'> make
+variables untouched.  If false they will be escaped like any other
+C<$>.  Defaults to true.
+
+=head3 escape_dollarsigns
+
+    my $escaped_text = $MM->escape_dollarsigns($text);
+
+Escapes stray C<$> so they are not interpreted as make variables.
+
+It lets by C<$(...)>.
+
+=cut
+
+sub escape_dollarsigns {
+    my($self, $text) = @_;
+
+    # Escape dollar signs which are not starting a variable
+    $text =~ s{\$ (?!\() }{\$\$}gx;
+
+    return $text;
+}
+
+
+=head3 escape_all_dollarsigns
+
+    my $escaped_text = $MM->escape_all_dollarsigns($text);
+
+Escapes all C<$> so they are not interpreted as make variables.
+
+=cut
+
+sub escape_all_dollarsigns {
+    my($self, $text) = @_;
+
+    # Escape dollar signs
+    $text =~ s{\$}{\$\$}gx;
+
+    return $text;
+}
+
 
 =head3 escape_newlines  I<Abstract>
 
@@ -1893,15 +1950,14 @@ sub init_VERSION {
 }
 
 
-=head3 init_others
-
-    $MM->init_others();
+=head3 init_tools
 
-Initializes the macro definitions used by tools_other() and places them
-in the $MM object.
+    $MM->init_tools();
 
-If there is no description, its the same as the parameter to
-WriteMakefile() documented in ExtUtils::MakeMaker.
+Initializes the simple macro definitions used by tools_other() and
+places them in the $MM object.  These use conservative cross platform
+versions and should be overridden with platform specific versions for
+performance.
 
 Defines at least these macros.
 
@@ -1910,11 +1966,6 @@ Defines at least these macros.
   NOOP              Do nothing
   NOECHO            Tell make not to display the command itself
 
-  MAKEFILE
-  FIRST_MAKEFILE
-  MAKEFILE_OLD
-  MAKE_APERL_FILE   File used by MAKE_APERL
-
   SHELL             Program used to run shell commands
 
   ECHO              Print text adding a newline on the end
@@ -1933,7 +1984,7 @@ Defines at least these macros.
 
 =cut
 
-sub init_others {
+sub init_tools {
     my $self = shift;
 
     $self->{ECHO}     ||= $self->oneliner('print qq{@ARGV}', ['-l']);
@@ -1966,6 +2017,18 @@ CODE
     $self->{UNINST}     ||= 0;
     $self->{VERBINST}   ||= 0;
 
+    $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->{FIRST_MAKEFILE}     ||= $self->{MAKEFILE} || 'Makefile';
     $self->{MAKEFILE}           ||= $self->{FIRST_MAKEFILE};
     $self->{MAKEFILE_OLD}       ||= $self->{MAKEFILE}.'.old';
@@ -1979,17 +2042,24 @@ CODE
     $self->{MACROSTART}         ||= '';
     $self->{MACROEND}           ||= '';
 
-    $self->{SHELL}              ||= $Config{sh};
+    return;
+}
 
-    # 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";
+=head3 init_others
 
-    $self->{NOOP}               ||= '$(TRUE)';
-    $self->{NOECHO}             = '@' unless defined $self->{NOECHO};
+    $MM->init_others();
+
+Initializes the macro definitions having to do with compiling and
+linking used by tools_other() and places them in the $MM object.
+
+If there is no description, its the same as the parameter to
+WriteMakefile() documented in ExtUtils::MakeMaker.
+
+=cut
+
+sub init_others {
+    my $self = shift;
 
     $self->{LD_RUN_PATH} = "";
 
@@ -2030,7 +2100,7 @@ CODE
                         : ($Config{usedl} ? 'dynamic' : 'static');
     }
 
-    return 1;
+    return;
 }
 
 
index 2a6bbca..65250c3 100644 (file)
@@ -26,7 +26,7 @@ require ExtUtils::MM_Any;
 require ExtUtils::MM_Unix;
 
 our @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
-our $VERSION = '6.61_01';
+our $VERSION = '6.63_01';
 
 
 =item os_flavor
index 8f327cf..6586d82 100644 (file)
@@ -9,7 +9,7 @@ require ExtUtils::MM_Unix;
 require ExtUtils::MM_Win32;
 our @ISA = qw( ExtUtils::MM_Unix );
 
-our $VERSION = '6.61_01';
+our $VERSION = '6.63_01';
 
 
 =head1 NAME
index 48a9f62..105023c 100644 (file)
@@ -2,7 +2,7 @@ package ExtUtils::MM_DOS;
 
 use strict;
 
-our $VERSION = '6.61_01';
+our $VERSION = '6.63_01';
 
 require ExtUtils::MM_Any;
 require ExtUtils::MM_Unix;
index 748e26e..ab41435 100644 (file)
@@ -7,7 +7,7 @@ BEGIN {
     our @ISA = qw( ExtUtils::MM_Unix );
 }
 
-our $VERSION = '6.61_01';
+our $VERSION = '6.63_01';
 
 
 =head1 NAME
index 39100f6..dbb26af 100644 (file)
@@ -2,7 +2,7 @@ package ExtUtils::MM_MacOS;
 
 use strict;
 
-our $VERSION = '6.61_01';
+our $VERSION = '6.63_01';
 
 sub new {
     die <<'UNSUPPORTED';
index 43d9cf7..e225096 100644 (file)
@@ -22,7 +22,7 @@ use strict;
 use ExtUtils::MakeMaker::Config;
 use File::Basename;
 
-our $VERSION = '6.61_01';
+our $VERSION = '6.63_01';
 
 require ExtUtils::MM_Win32;
 our @ISA = qw(ExtUtils::MM_Win32);
index c84ab5e..a07a4fb 100644 (file)
@@ -5,7 +5,7 @@ use strict;
 use ExtUtils::MakeMaker qw(neatvalue);
 use File::Spec;
 
-our $VERSION = '6.61_01';
+our $VERSION = '6.63_01';
 
 require ExtUtils::MM_Any;
 require ExtUtils::MM_Unix;
index 9f3d87e..0d314eb 100644 (file)
@@ -1,7 +1,7 @@
 package ExtUtils::MM_QNX;
 
 use strict;
-our $VERSION = '6.61_01';
+our $VERSION = '6.63_01';
 
 require ExtUtils::MM_Unix;
 our @ISA = qw(ExtUtils::MM_Unix);
index a2b6cae..d2932f1 100644 (file)
@@ -1,7 +1,7 @@
 package ExtUtils::MM_UWIN;
 
 use strict;
-our $VERSION = '6.61_01';
+our $VERSION = '6.63_01';
 
 require ExtUtils::MM_Unix;
 our @ISA = qw(ExtUtils::MM_Unix);
index 37f523d..a445828 100644 (file)
@@ -15,7 +15,7 @@ use ExtUtils::MakeMaker qw($Verbose neatvalue);
 
 # If we make $VERSION an our variable parse_version() breaks
 use vars qw($VERSION);
-$VERSION = '6.61_01';
+$VERSION = '6.63_01';
 $VERSION = eval $VERSION;
 
 require ExtUtils::MM_Any;
@@ -1739,17 +1739,14 @@ EOP
                $self->{NAME} eq "ExtUtils::MakeMaker";
 }
 
-=item init_others
+=item init_tools
 
-Initializes EXTRALIBS, BSLOADLIBS, LDLOADLIBS, LIBS, LD_RUN_PATH, LD,
-OBJECT, BOOTDEP, PERLMAINCC, LDFROM, LINKTYPE, SHELL, NOOP,
-FIRST_MAKEFILE, MAKEFILE_OLD, NOECHO, RM_F, RM_RF, TEST_F,
-TOUCH, CP, MV, CHMOD, UMASK_NULL, ECHO, ECHO_N
+Initializes tools to use their common (and faster) Unix commands.
 
 =cut
 
-sub init_others {      # --- Initialize Other Attributes
-    my($self) = shift;
+sub init_tools {
+    my $self = shift;
 
     $self->{ECHO}       ||= 'echo';
     $self->{ECHO_N}     ||= 'echo -n';
@@ -1765,13 +1762,13 @@ sub init_others {       # --- Initialize Other Attributes
 
     $self->{LD}         ||= 'ld';
 
-    $self->SUPER::init_others(@_);
+    return $self->SUPER::init_tools(@_);
 
-    # After SUPER::init_others so $Config{shell} has a
+    # After SUPER::init_tools so $Config{shell} has a
     # chance to get set.
     $self->{SHELL}      ||= '/bin/sh';
 
-    return 1;
+    return;
 }
 
 
@@ -2895,8 +2892,13 @@ sub ppd {
     $author =~ s/</&lt;/g;
     $author =~ s/>/&gt;/g;
 
-    my $ppd_xml = sprintf <<'PPD_HTML', $self->{VERSION}, $abstract, $author;
-<SOFTPKG NAME="$(DISTNAME)" VERSION="%s">
+    my $ppd_file = '$(DISTNAME).ppd';
+
+    my @ppd_cmds = $self->echo(<<'PPD_HTML', $ppd_file, { append => 0, allow_variables => 1 });
+<SOFTPKG NAME="$(DISTNAME)" VERSION="$(VERSION)">
+PPD_HTML
+
+    my $ppd_xml = sprintf <<'PPD_HTML', $abstract, $author;
     <ABSTRACT>%s</ABSTRACT>
     <AUTHOR>%s</AUTHOR>
 PPD_HTML
@@ -2958,7 +2960,7 @@ PPD_OUT
 </SOFTPKG>
 PPD_XML
 
-    my @ppd_cmds = $self->echo($ppd_xml, '$(DISTNAME).ppd');
+    push @ppd_cmds, $self->echo($ppd_xml, $ppd_file, { append => 1 });
 
     return sprintf <<'PPD_OUT', join "\n\t", @ppd_cmds;
 # Creates a PPD (Perl Package Description) for a binary distribution.
@@ -3149,12 +3151,15 @@ sub oneliner {
 =cut
 
 sub quote_literal {
-    my($self, $text) = @_;
+    my($self, $text, $opts) = @_;
+    $opts->{allow_variables} = 1 unless defined $opts->{allow_variables};
 
-    # I think all we have to quote is single quotes and I think
-    # this is a safe way to do it.
+    # Quote single quotes
     $text =~ s{'}{'\\''}g;
 
+    $text = $opts->{allow_variables}
+      ? $self->escape_dollarsigns($text) : $self->escape_all_dollarsigns($text);
+
     return "'$text'";
 }
 
index 73c96c3..a63a2a1 100644 (file)
@@ -15,7 +15,7 @@ BEGIN {
 
 use File::Basename;
 
-our $VERSION = '6.61_01';
+our $VERSION = '6.63_01';
 
 require ExtUtils::MM_Any;
 require ExtUtils::MM_Unix;
@@ -447,21 +447,20 @@ sub init_main {
     }
 }
 
-=item init_others (override)
+=item init_tools (override)
 
-Provide VMS-specific forms of various utility commands, then hand
-off to the default MM_Unix method.
+Provide VMS-specific forms of various utility commands.
 
-DEV_NULL should probably be overriden with something.
+Sets DEV_NULL to nothing because I don't know how to do it on VMS.
 
-Also changes EQUALIZE_TIMESTAMP to set revision date of target file to
+Changes EQUALIZE_TIMESTAMP to set revision date of target file to
 one second later than source file, since MMK interprets precisely
 equal revision dates for a source and target file as a sign that the
 target needs to be updated.
 
 =cut
 
-sub init_others {
+sub init_tools {
     my($self) = @_;
 
     $self->{NOOP}               = 'Continue';
@@ -493,17 +492,34 @@ sub init_others {
 install([ from_to => {split(' ', <STDIN>)}, verbose => '$(VERBINST)', uninstall_shadows => '$(UNINST)', dir_mode => '$(PERM_DIR)' ]);
 CODE
 
-    $self->SUPER::init_others;
+    $self->{UMASK_NULL} = '! ';
 
-    $self->{SHELL}    ||= 'Posix';
+    $self->SUPER::init_tools;
 
-    $self->{UMASK_NULL} = '! ';  
+    # Use the default shell
+    $self->{SHELL}    ||= 'Posix';
 
     # Redirection on VMS goes before the command, not after as on Unix.
     # $(DEV_NULL) is used once and its not worth going nuts over making
     # it work.  However, Unix's DEV_NULL is quite wrong for VMS.
     $self->{DEV_NULL}   = '';
 
+    return;
+}
+
+
+=item init_others (override)
+
+Provide VMS-specific forms of various compile and link commands
+
+=cut
+
+sub init_others {
+    my $self = shift;
+
+    # Must come first as we're modifying and deriving from the defaults.
+    $self->SUPER::init_others;
+
     if ($self->{OBJECT} =~ /\s/) {
         $self->{OBJECT} =~ s/(\\)?\n+\s+/ /g;
         $self->{OBJECT} = $self->wraplist(
@@ -514,6 +530,8 @@ CODE
     $self->{LDFROM} = $self->wraplist(
         map $self->fixpath($_,0), split /,?\s+/, $self->{LDFROM}
     );
+
+    return;
 }
 
 
@@ -1771,11 +1789,15 @@ sub echo {
 =cut
 
 sub quote_literal {
-    my($self, $text) = @_;
+    my($self, $text, $opts) = @_;
+    $opts->{allow_variables} = 1 unless defined $opts->{allow_variables};
 
     # I believe this is all we should need.
     $text =~ s{"}{""}g;
 
+    $text = $opts->{allow_variables}
+      ? $self->escape_dollarsigns($text) : $self->escape_all_dollarsigns($text);
+
     return qq{"$text"};
 }
 
index 7e4e22d..7afc0db 100644 (file)
@@ -1,7 +1,7 @@
 package ExtUtils::MM_VOS;
 
 use strict;
-our $VERSION = '6.61_01';
+our $VERSION = '6.63_01';
 
 require ExtUtils::MM_Unix;
 our @ISA = qw(ExtUtils::MM_Unix);
index 46af63c..4592b1e 100644 (file)
@@ -27,7 +27,7 @@ use ExtUtils::MakeMaker qw( neatvalue );
 require ExtUtils::MM_Any;
 require ExtUtils::MM_Unix;
 our @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
-our $VERSION = '6.61_01';
+our $VERSION = '6.63_01';
 
 $ENV{EMXSHELL} = 'sh'; # to run `commands`
 
@@ -141,21 +141,13 @@ sub init_DIRFILESEP {
                                                        : '\\';
 }
 
-=item B<init_others>
+=item init_tools
 
-Override some of the Unix specific commands with portable
-ExtUtils::Command ones.
-
-Also provide defaults for LD and AR in case the %Config values aren't
-set.
-
-LDLOADLIBS's default is changed to $Config{libs}.
-
-Adjustments are made for Borland's quirks needing -L to come first.
+Override some of the slower, portable commands with Windows specific ones.
 
 =cut
 
-sub init_others {
+sub init_tools {
     my ($self) = @_;
 
     $self->{NOOP}     ||= 'rem';
@@ -165,14 +157,33 @@ sub init_others {
       "\$(PERLRUN) $self->{PERL_SRC}/win32/bin/pl2bat.pl" : 
       'pl2bat.bat';
 
+    $self->SUPER::init_tools;
+
+    # Setting SHELL from $Config{sh} can break dmake.  Its ok without it.
+    delete $self->{SHELL};
+
+    return;
+}
+
+
+=item init_others
+
+Override the default link and compile tools.
+
+LDLOADLIBS's default is changed to $Config{libs}.
+
+Adjustments are made for Borland's quirks needing -L to come first.
+
+=cut
+
+sub init_others {
+    my $self = shift;
+
     $self->{LD}     ||= 'link';
     $self->{AR}     ||= 'lib';
 
     $self->SUPER::init_others;
 
-    # Setting SHELL from $Config{sh} can break dmake.  Its ok without it.
-    delete $self->{SHELL};
-
     $self->{LDLOADLIBS} ||= $Config{libs};
     # -Lfoo must come first for Borland, so we put it in LDDLFLAGS
     if ($BORLAND) {
@@ -187,7 +198,7 @@ sub init_others {
         $self->{LDDLFLAGS} .= " $libpath";
     }
 
-    return 1;
+    return;
 }
 
 
@@ -485,7 +496,8 @@ sub oneliner {
 
 
 sub quote_literal {
-    my($self, $text) = @_;
+    my($self, $text, $opts) = @_;
+    $opts->{allow_variables} = 1 unless defined $opts->{allow_variables};
 
     # See: http://www.autohotkey.net/~deleyd/parameters/parameters.htm#CPP
 
@@ -508,6 +520,9 @@ sub quote_literal {
         $text =~ s/}/}}/g;
     }
 
+    $text = $opts->{allow_variables}
+      ? $self->escape_dollarsigns($text) : $self->escape_all_dollarsigns($text);
+
     return $text;
 }
 
index 2da186e..67ca842 100644 (file)
@@ -2,7 +2,7 @@ package ExtUtils::MM_Win95;
 
 use strict;
 
-our $VERSION = '6.61_01';
+our $VERSION = '6.63_01';
 
 require ExtUtils::MM_Win32;
 our @ISA = qw(ExtUtils::MM_Win32);
index 01dda8d..7051e37 100644 (file)
@@ -3,7 +3,7 @@ package ExtUtils::MY;
 use strict;
 require ExtUtils::MM;
 
-our $VERSION = '6.61_01';
+our $VERSION = '6.63_01';
 our @ISA = qw(ExtUtils::MM);
 
 {
index 8d5fd26..4f45b4b 100644 (file)
@@ -18,7 +18,7 @@ our @Overridable;
 my @Prepend_parent;
 my %Recognized_Att_Keys;
 
-our $VERSION = '6.61_01';
+our $VERSION = '6.63_01';
 $VERSION = eval $VERSION;
 
 # Emulate something resembling CVS $Revision$
@@ -613,6 +613,7 @@ END
         $self->catfile($Config{'archlibexp'}, "Config.pm")
     );
 
+    $self->init_tools();
     $self->init_others();
     $self->init_platform();
     $self->init_PERM();
index 0cb12de..b354727 100644 (file)
@@ -2,7 +2,7 @@ package ExtUtils::MakeMaker::Config;
 
 use strict;
 
-our $VERSION = '6.61_01';
+our $VERSION = '6.63_01';
 
 use Config ();
 
index e94d4f0..7b51bf7 100644 (file)
@@ -1,6 +1,6 @@
 package ExtUtils::MakeMaker::FAQ;
 
-our $VERSION = '6.61_01';
+our $VERSION = '6.63_01';
 
 1;
 __END__
index 8db5fdb..72884a6 100644 (file)
@@ -1,6 +1,6 @@
 package ExtUtils::MakeMaker::Tutorial;
 
-our $VERSION = 6.61_01;
+our $VERSION = 6.63_01;
 
 
 =head1 NAME
index b5c8ef5..1b8fc20 100644 (file)
@@ -3,7 +3,7 @@ package ExtUtils::Mkbootstrap;
 # There's just too much Dynaloader incest here to turn on strict vars.
 use strict 'refs';
 
-our $VERSION = '6.61_01';
+our $VERSION = '6.63_01';
 
 require Exporter;
 our @ISA = ('Exporter');
index ce1247c..495424e 100644 (file)
@@ -10,7 +10,7 @@ use Config;
 
 our @ISA = qw(Exporter);
 our @EXPORT = qw(&Mksymlists);
-our $VERSION = '6.61_01';
+our $VERSION = '6.63_01';
 
 sub Mksymlists {
     my(%spec) = @_;
index 007cf0d..3b48232 100644 (file)
@@ -3,7 +3,7 @@ package ExtUtils::testlib;
 use strict;
 use warnings;
 
-our $VERSION = '6.61_01';
+our $VERSION = '6.63_01';
 
 use Cwd;
 use File::Spec;
index 64b3017..fb374c0 100644 (file)
@@ -73,7 +73,6 @@ my $make = make_run();
 
 END { unlink 'MANIFEST'; }
 
-
 my $ppd_out = run("$make ppd");
 is( $?, 0,                      '  exited normally' ) || diag $ppd_out;
 ok( open(PPD, 'Big-Dummy.ppd'), '  .ppd file generated' );
@@ -82,7 +81,8 @@ my $ppd_html;
 close PPD;
 like( $ppd_html, qr{^<SOFTPKG NAME="Big-Dummy" VERSION="0.01">}m, 
                                                            '  <SOFTPKG>' );
-like( $ppd_html, qr{^\s*<ABSTRACT>Try "our" hot dog's</ABSTRACT>}m,         
+like( $ppd_html,
+      qr{^\s*<ABSTRACT>Try "our" hot dog's, \$andwiche\$ and \$\(ub\)\$!</ABSTRACT>}m,
                                                            '  <ABSTRACT>');
 like( $ppd_html, 
       qr{^\s*<AUTHOR>Michael G Schwern &lt;schwern\@pobox.com&gt;</AUTHOR>}m,
@@ -233,8 +233,8 @@ my $mymeta_yml = "$distdir/MYMETA.yml";
 my $meta_json = "$distdir/META.json";
 my $mymeta_json = "$distdir/MYMETA.json";
 
-SKIP: {
-    skip "CPAN::Meta required", 104 unless eval { require CPAN::Meta };
+note "META file validity"; {
+    require CPAN::Meta;
 
     ok( !-f 'META.yml',  'META.yml not written to source dir' );
     ok( -f $meta_yml,    'META.yml written to dist dir' );
@@ -279,7 +279,7 @@ SKIP: {
       };
       $is->( name => "Big-Dummy" );
       $is->( version => "0.01" );
-      $is->( abstract => q{Try "our" hot dog's} );
+      $is->( abstract => q{Try "our" hot dog's, $andwiche$ and $(ub)$!} );
       $is_list->( licenses => [q{unknown}] );
       $is_list->( authors => [ q{Michael G Schwern <schwern@pobox.com>} ] );
       $is_map->( prereqs => {
diff --git a/cpan/ExtUtils-MakeMaker/t/echo.t b/cpan/ExtUtils-MakeMaker/t/echo.t
new file mode 100644 (file)
index 0000000..a4ef9c7
--- /dev/null
@@ -0,0 +1,106 @@
+#!/usr/bin/perl -w
+
+BEGIN {
+    unshift @INC, 't/lib';
+}
+
+use strict;
+use warnings;
+
+use Carp;
+use Config;
+use ExtUtils::MM;
+use MakeMaker::Test::Utils;
+use File::Temp;
+use Cwd 'abs_path';
+
+use Test::More;
+
+
+#--------------------- Setup
+
+my $cwd  = abs_path;
+my $perl = which_perl;
+my $make = make_run();
+my $mm = bless { NAME => "Foo", MAKE => $Config{make} }, "MM";
+$mm->init_tools;  # need ECHO
+
+
+#------------------- Testing functions
+
+sub test_for_echo {
+    my($calls, $want, $name) = @_;
+    my $output_file = $calls->[0][1];
+
+    note "Testing $name";
+
+    my $dir = File::Temp->newdir();
+    chdir $dir;
+    note "Temp dir: $dir";
+
+    # Write a Makefile to test the output of echo
+    {
+        open my $makefh, ">", "Makefile" or croak "Can't open Makefile: $!";
+        print $makefh "FOO=42\n";       # a variable to test with
+        print $makefh "ECHO=$mm->{ECHO}\n\n";
+        print $makefh "all:\n";
+        for my $args (@$calls) {
+            print $makefh map { "\t$_\n" } $mm->echo(@$args);
+        }
+    }
+
+    # Run the Makefile
+    ok run($make), "make: $name";
+
+    # Check it made the file in question
+    ok -e $output_file, "$output_file exists";
+    open my $fh, "<", $output_file or croak "Can't open $output_file: $!";
+    is join("", <$fh>), $want, "contents";
+
+    chdir $cwd;
+}
+
+
+#---------------- Tests begin
+
+test_for_echo(
+    [["Foo", "bar.txt"]],
+    "Foo\n",
+    "simple echo"
+);
+
+test_for_echo(
+    [["Foo\nBar\nBaz Biff\n", "something.txt"]],
+    "Foo\nBar\nBaz Biff\n",
+    "multiline echo"
+);
+
+test_for_echo(
+    [['$something$', "something.txt"]],
+    '$something$'."\n",
+    "dollar signs escaped"
+);
+
+test_for_echo(
+    [['$(something)', "something.txt"]],
+    '$(something)'."\n",
+    "variables escaped"
+);
+
+test_for_echo(
+    [['Answer: $(FOO)', "bar.txt", { allow_variables => 1 }]],
+    "Answer: 42\n",
+    "allow_variables"
+);
+
+test_for_echo(
+    [
+        ["Foo", "bar.txt"],
+        ["Bar", "bar.txt", { append => 1 }],
+        ["Baz", "bar.txt", 1],
+    ],
+    "Foo\nBar\nBaz\n",
+    "append"
+);
+
+done_testing;
index 82dd030..8df77d4 100644 (file)
@@ -19,7 +19,7 @@ $VERSION = 0.01;
 
 =head1 NAME
 
-Big::Dummy - Try "our" hot dog's
+Big::Dummy - Try "our" hot dog's, $andwiche$ and $(ub)$!
 
 =cut
 
index fb19ae1..5d2ac45 100644 (file)
@@ -37,9 +37,7 @@ END {
 ok( chdir 'Min-PerlVers', 'entering dir Min-PerlVers' ) ||
     diag("chdir failed: $!");
 
-{
-    # ----- argument verification -----
-
+note "Argument verification"; {
     my $stdout = tie *STDOUT, 'TieOut';
     ok( $stdout, 'capturing stdout' );
     my $warnings = '';
@@ -110,8 +108,7 @@ END
 }
 
 
-# ----- PREREQ_PRINT output -----
-{
+note "PREREQ_PRINT output"; {
     my $prereq_out = run(qq{$perl Makefile.PL "PREREQ_PRINT=1"});
     is( $?, 0,            'PREREQ_PRINT exiting normally' );
     my $prereq_out_sane = $prereq_out =~ /^\s*\$PREREQ_PM\s*=/;
@@ -135,8 +132,7 @@ END
 }
 
 
-# ----- PRINT_PREREQ output -----
-{
+note "PRINT_PREREQ output"; {
     my $prereq_out = run(qq{$perl Makefile.PL "PRINT_PREREQ=1"});
     is( $?, 0,                      'PRINT_PREREQ exiting normally' );
     ok( $prereq_out !~ /^warning/i, '  and not complaining loudly' );
@@ -146,8 +142,7 @@ END
 }
 
 
-# ----- generated files verification -----
-{
+note "generated files verification"; {
     unlink $makefile;
     my @mpl_out = run(qq{$perl Makefile.PL});
     END { unlink $makefile, makefile_backup() }
@@ -156,8 +151,8 @@ END
     ok( -e $makefile, 'Makefile present' );
 }
 
-# ----- ppd output -----
-{
+
+note "ppd output"; {
     my $ppd_file = 'Min-PerlVers.ppd';
     my @make_out = run(qq{$make ppd});
     END { unlink $ppd_file }
@@ -172,8 +167,7 @@ END
 }
 
 
-# ----- META.yml output -----
-{
+note "META.yml output"; {
     my $distdir  = 'Min-PerlVers-0.05';
     $distdir =~ s{\.}{_}g if $Is_VMS;
 
@@ -182,14 +176,10 @@ END
     my @make_out    = run(qq{$make metafile});
     END { rmtree $distdir }
 
-    SKIP: {
-      skip "CPAN::Meta required", 4
-        unless eval { require CPAN::Meta };
-
-      for my $case (
+    for my $case (
         ['META.yml', $meta_yml],
         ['META.json', $meta_json],
-      ) {
+    ) {
         my ($label, $meta_name) = @$case;
         ok(
           my $obj = eval {
@@ -200,8 +190,6 @@ END
         is( $obj->prereqs->{runtime}{requires}{perl}, '5.005',
           "$label has runtime/requires perl 5.005"
         );
-      }
     }
 }
 
-__END__
index 4fa0720..bf6cdcb 100644 (file)
@@ -37,9 +37,7 @@ END {
 ok( chdir $MakeMaker::Test::Setup::SAS::dirname, "entering dir $MakeMaker::Test::Setup::SAS::dirname" ) ||
     diag("chdir failed: $!");
 
-{
-    # ----- argument verification -----
-
+note "argument verification"; {
     my $stdout = tie *STDOUT, 'TieOut';
     ok( $stdout, 'capturing stdout' );
     my $warnings = '';
@@ -59,9 +57,7 @@ ok( chdir $MakeMaker::Test::Setup::SAS::dirname, "entering dir $MakeMaker::Test:
 }
 
 
-{
-    # ----- argument verification -----
-
+note "argument verification via CONFIGURE"; {
     my $stdout = tie *STDOUT, 'TieOut';
     ok( $stdout, 'capturing stdout' );
     my $warnings = '';
@@ -83,8 +79,7 @@ ok( chdir $MakeMaker::Test::Setup::SAS::dirname, "entering dir $MakeMaker::Test:
 }
 
 
-# ----- generated files verification -----
-{
+note "generated files verification"; {
     unlink $makefile;
     my @mpl_out = run(qq{$perl Makefile.PL});
     END { unlink $makefile, makefile_backup() }
@@ -94,8 +89,7 @@ ok( chdir $MakeMaker::Test::Setup::SAS::dirname, "entering dir $MakeMaker::Test:
 }
 
 
-# ----- ppd output -----
-{
+note "ppd output"; {
     my $ppd_file = 'Multiple-Authors.ppd';
     my @make_out = run(qq{$make ppd});
     END { unlink $ppd_file }
@@ -110,8 +104,7 @@ ok( chdir $MakeMaker::Test::Setup::SAS::dirname, "entering dir $MakeMaker::Test:
 }
 
 
-# ----- META.yml output -----
-{
+note "META.yml output"; {
     my $distdir  = 'Multiple-Authors-0.05';
     $distdir =~ s{\.}{_}g if $Is_VMS;
 
@@ -122,14 +115,10 @@ ok( chdir $MakeMaker::Test::Setup::SAS::dirname, "entering dir $MakeMaker::Test:
 
     cmp_ok( $?, '==', 0, 'Make metafile exiting normally' ) || diag(@make_out);
 
-    SKIP: {
-      skip "CPAN::Meta required", 4
-        unless eval { require CPAN::Meta };
-
-      for my $case (
+    for my $case (
         ['META.yml', $meta_yml],
         ['META.json', $meta_json],
-      ) {
+    ) {
         my ($label, $meta_name) = @$case;
         ok(
           my $obj = eval {
@@ -144,8 +133,5 @@ ok( chdir $MakeMaker::Test::Setup::SAS::dirname, "entering dir $MakeMaker::Test:
           ],
           "$label content good"
         );
-      }
     }
 }
-
-__END__
index 871edb0..78f6b10 100644 (file)
@@ -100,6 +100,10 @@ L<Archive::Extract> has been upgraded from version 0.56 to version 0.58.
 
 =item *
 
+L<ExtUtils::MakeMaker> has been upgraded from version 6.61_01 to version 6.63_01.
+
+=item *
+
 L<HTTP::Tiny> has been upgraded from version 0.013 to version 0.014.
 
 Adds additional shorthand methods for all common HTTP verbs,