summaryrefslogtreecommitdiff
path: root/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2013-10-15 16:19:53 +0100
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2013-10-15 16:21:48 +0100
commit53d48b8bc3daee9ac6baf1f5eb39e4d9899a6646 (patch)
tree17f353bdcc1609a532f383a0626e335a7e0a242c /cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command
parent0438091222af3f484c50c95c499ee36f03f29f54 (diff)
downloadperl-53d48b8bc3daee9ac6baf1f5eb39e4d9899a6646.tar.gz
Update Extutils-MakeMaker to CPAN version 6.80
[DELTA] 6.80 Tue Oct 15 16:04:50 BST 2013 No changes from 6.79_04 6.79_04 Fri Oct 11 18:57:51 BST 2013 Bug fixes: * Add CP_NONEMPTY to the list of tools in Makefile 6.79_03 Fri Oct 11 13:56:53 BST 2013 Bug fixes: * don't copy .bs portably :) 6.79_02 Fri Oct 11 12:58:01 BST 2013 Bug fixes: * RT#28992 don't copy .bs files if they are empty
Diffstat (limited to 'cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command')
-rw-r--r--cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm39
1 files changed, 37 insertions, 2 deletions
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm
index 880ae24f46..7d004fe359 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm
@@ -9,8 +9,8 @@ require Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw(test_harness pod2man perllocal_install uninstall
- warn_if_old_packlist);
-our $VERSION = '6.79_01';
+ warn_if_old_packlist test_s cp_nonempty);
+our $VERSION = '6.80';
my $Is_VMS = $^O eq 'VMS';
@@ -272,8 +272,43 @@ WARNING
}
+=item B<test_s>
+
+ perl "-MExtUtils::Command::MM" -e test_s <file>
+
+Tests if a file exists and is not empty (size > 0).
+I<Exits> with 0 if it does, 1 if it does not.
+
+=cut
+
+sub test_s {
+ exit(-s $ARGV[0] ? 0 : 1);
+}
+
+=item B<cp_nonempty>
+
+ perl "-MExtUtils::Command::MM" -e cp_nonempty <srcfile> <dstfile> <perm>
+
+Tests if the source file exists and is not empty (size > 0). If it is not empty
+it copies it to the given destination with the given permissions.
+
=back
=cut
+sub cp_nonempty {
+ my @args = @ARGV;
+ return 0 unless -s $args[0];
+ require ExtUtils::Command;
+ {
+ local @ARGV = @args[0,1];
+ ExtUtils::Command::cp(@ARGV);
+ }
+ {
+ local @ARGV = @args[2,1];
+ ExtUtils::Command::chmod(@ARGV);
+ }
+}
+
+
1;