git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
DMARC: expand main-config options. Bug 3102
[exim.git]
/
test
/
lib
/
Exim
/
Utils.pm
diff --git
a/test/lib/Exim/Utils.pm
b/test/lib/Exim/Utils.pm
index b744b0b43e19eea645fe50d11d9b51ac05baacc7..1dbd2d0da567b604db74cd6e39759fda3389fc0b 100644
(file)
--- a/
test/lib/Exim/Utils.pm
+++ b/
test/lib/Exim/Utils.pm
@@
-2,8
+2,9
@@
package Exim::Utils;
use v5.10.1;
use strict;
use warnings;
use v5.10.1;
use strict;
use warnings;
+use File::Copy;
use parent 'Exporter';
use parent 'Exporter';
-our @EXPORT_OK = qw(uniq numerically);
+our @EXPORT_OK = qw(uniq numerically
cp
);
sub uniq {
sub uniq {
@@
-13,4
+14,14
@@
sub uniq {
sub numerically { $::a <=> $::b }
sub numerically { $::a <=> $::b }
+sub cp {
+ if ($File::Copy::VERSION >= 2.15) { # since Perl 5.11 we should have >= 2.15
+ return File::Copy::cp(@_);
+ }
+ copy(@_) or return undef;
+ my ($src, $dst) = @_;
+ my @st = stat $src or return undef;
+ chmod($st[2]&07777, $dst);
+}
+
1;
1;